diff options
| author | usodhi <61431818+usodhi@users.noreply.github.com> | 2021-03-30 11:00:02 -0400 |
|---|---|---|
| committer | usodhi <61431818+usodhi@users.noreply.github.com> | 2021-03-30 11:00:02 -0400 |
| commit | 479dff344ff2cf92ace9c68c3ce6d03e6e6dce22 (patch) | |
| tree | 85db5d0f69dc8afaae4c5ea5e6d1492d831fc7f1 /src/client/views/pdf | |
| parent | 4df769e20b9588fea61b602ec67ca2208fc3d747 (diff) | |
| parent | 47f4f4ce91bd7deacaa04526418341d1f6006404 (diff) | |
merging
Diffstat (limited to 'src/client/views/pdf')
| -rw-r--r-- | src/client/views/pdf/Annotation.scss | 2 | ||||
| -rw-r--r-- | src/client/views/pdf/Annotation.tsx | 2 | ||||
| -rw-r--r-- | src/client/views/pdf/PDFViewer.tsx | 8 |
3 files changed, 6 insertions, 6 deletions
diff --git a/src/client/views/pdf/Annotation.scss b/src/client/views/pdf/Annotation.scss index 8b242854d..e98f071c3 100644 --- a/src/client/views/pdf/Annotation.scss +++ b/src/client/views/pdf/Annotation.scss @@ -1,4 +1,4 @@ -.pdfAnnotation { +.htmlAnnotation { pointer-events: all; user-select: none; position: absolute; diff --git a/src/client/views/pdf/Annotation.tsx b/src/client/views/pdf/Annotation.tsx index 1e574b9c0..07b734405 100644 --- a/src/client/views/pdf/Annotation.tsx +++ b/src/client/views/pdf/Annotation.tsx @@ -89,7 +89,7 @@ class RegionAnnotation extends React.Component<IRegionAnnotationProps> { } render() { - return (<div className="pdfAnnotation" onPointerEnter={() => this.props.showInfo(this.props.anno)} onPointerLeave={() => this.props.showInfo(undefined)} onPointerDown={this.onPointerDown} ref={this._mainCont} + return (<div className="htmlAnnotation" onPointerEnter={() => this.props.showInfo(this.props.anno)} onPointerLeave={() => this.props.showInfo(undefined)} onPointerDown={this.onPointerDown} ref={this._mainCont} style={{ left: NumCast(this.props.document.x), top: NumCast(this.props.document.y), diff --git a/src/client/views/pdf/PDFViewer.tsx b/src/client/views/pdf/PDFViewer.tsx index 68b1452f8..84006f722 100644 --- a/src/client/views/pdf/PDFViewer.tsx +++ b/src/client/views/pdf/PDFViewer.tsx @@ -55,7 +55,7 @@ interface IViewerProps extends FieldViewProps { setPdfViewer: (view: PDFViewer) => void; ContentScaling?: () => number; sidebarWidth: () => number; - anchorMenuClick: (anchor: Doc) => void; + anchorMenuClick?: (anchor: Doc) => void; } /** @@ -391,7 +391,7 @@ export class PDFViewer extends ViewBoxAnnotatableComponent<IViewerProps, PdfDocu AnchorMenu.Instance.Status = "marquee"; Array.from(this._savedAnnotations.values()).forEach(v => v.forEach(a => a.remove())); this._savedAnnotations.clear(); - this._styleRule = addStyleSheetRule(PDFViewer._annotationStyle, "pdfAnnotation", { "pointer-events": "none" }); + this._styleRule = addStyleSheetRule(PDFViewer._annotationStyle, "htmlAnnotation", { "pointer-events": "none" }); document.addEventListener("pointerup", this.onSelectEnd); document.addEventListener("pointermove", this.onSelectMove); } @@ -532,13 +532,13 @@ export class PDFViewer extends ViewBoxAnnotatableComponent<IViewerProps, PdfDocu ContentScaling={this.contentZoom} bringToFront={emptyFunction} whenActiveChanged={this.whenActiveChanged} - childPointerEvents={true} removeDocument={this.removeDocument} moveDocument={this.moveDocument} addDocument={this.addDocument} CollectionView={undefined} ScreenToLocalTransform={this.overlayTransform} - renderDepth={this.props.renderDepth + 1} /> + renderDepth={this.props.renderDepth + 1} + childPointerEvents={true} /> </div>; } @computed get pdfViewerDiv() { |
