diff options
| author | geireann <geireann.lindfield@gmail.com> | 2021-10-14 15:01:19 -0400 |
|---|---|---|
| committer | geireann <geireann.lindfield@gmail.com> | 2021-10-14 15:01:19 -0400 |
| commit | 5bbd1b35d2c3855eae8405e26deb0c6679cc7c26 (patch) | |
| tree | c9d999f36b078d7fd8f55a74c94ce495c9fa8d4e /src/client/views/pdf/Annotation.tsx | |
| parent | be4fd2492ad706f30af28f33133a4df0e8049e12 (diff) | |
| parent | ed68bbec549dedeb89bcb584151b097863b52d0d (diff) | |
Merge branch 'master' into schema-view-En-Hua
Diffstat (limited to 'src/client/views/pdf/Annotation.tsx')
| -rw-r--r-- | src/client/views/pdf/Annotation.tsx | 5 |
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>); |
