aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/pdf/Annotation.tsx
diff options
context:
space:
mode:
authorgeireann <geireann.lindfield@gmail.com>2021-10-14 14:30:47 -0400
committergeireann <geireann.lindfield@gmail.com>2021-10-14 14:30:47 -0400
commit0f83dfd2aa9738509fdb09cd54005d1ccf5c552c (patch)
treea9032715c1ca3b9eb3dadbb17776ed158c30b4a5 /src/client/views/pdf/Annotation.tsx
parent53019659c2335906ac9e42d755548ea35dfc0365 (diff)
parent662176f25e25d3bf31cfb8ec6e3792d18f77f37d (diff)
Merge branch 'master' into splash-screen-3-Anh-En-Hua
Diffstat (limited to 'src/client/views/pdf/Annotation.tsx')
-rw-r--r--src/client/views/pdf/Annotation.tsx5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/client/views/pdf/Annotation.tsx b/src/client/views/pdf/Annotation.tsx
index 07b734405..b1d1d8293 100644
--- a/src/client/views/pdf/Annotation.tsx
+++ b/src/client/views/pdf/Annotation.tsx
@@ -16,17 +16,19 @@ interface IAnnotationProps extends FieldViewProps {
dataDoc: Doc;
fieldKey: string;
showInfo: (anno: Opt<Doc>) => void;
+ pointerEvents?: string;
}
@observer
export
class Annotation extends React.Component<IAnnotationProps> {
render() {
- return DocListCast(this.props.anno.textInlineAnnotations).map(a => <RegionAnnotation {...this.props} document={a} key={a[Id]} />);
+ return DocListCast(this.props.anno.textInlineAnnotations).map(a => <RegionAnnotation pointerEvents={this.props.pointerEvents} {...this.props} document={a} key={a[Id]} />);
}
}
interface IRegionAnnotationProps extends IAnnotationProps {
document: Doc;
+ pointerEvents?: string;
}
@observer
class RegionAnnotation extends React.Component<IRegionAnnotationProps> {
@@ -96,6 +98,7 @@ class RegionAnnotation extends React.Component<IRegionAnnotationProps> {
width: NumCast(this.props.document._width),
height: NumCast(this.props.document._height),
opacity: this._brushed ? 0.5 : undefined,
+ pointerEvents: this.props.pointerEvents as any,
backgroundColor: this._brushed ? "orange" : StrCast(this.props.document.backgroundColor),
}} >
</div>);