From df0c30a1f8c1a507be7582a9c97dc5546ae719c8 Mon Sep 17 00:00:00 2001
From: bobzel <zzzman@gmail.com>
Date: Sat, 13 Mar 2021 09:27:25 -0500
Subject: fixed marquee annotations on pdfs from crashing - still need to fix
 offset problem.

---
 src/client/views/pdf/PDFViewer.tsx | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

(limited to 'src/client/views/pdf/PDFViewer.tsx')

diff --git a/src/client/views/pdf/PDFViewer.tsx b/src/client/views/pdf/PDFViewer.tsx
index 1a1bc70b2..1750b526e 100644
--- a/src/client/views/pdf/PDFViewer.tsx
+++ b/src/client/views/pdf/PDFViewer.tsx
@@ -553,8 +553,8 @@ export class PDFViewer extends ViewBoxAnnotatableComponent<IViewerProps, PdfDocu
     contentZoom = () => this._zoomed;
     render() {
         TraceMobx();
-        return <div>
-            <div className={`pdfViewerDash${this.annotationsActive() ? "-interactive" : ""}`} ref={this._mainCont}
+        return <div className="pdfViewer-content" ref={this._mainCont}>
+            <div className={`pdfViewerDash${this.annotationsActive() ? "-interactive" : ""}`}
                 onScroll={this.onScroll} onWheel={this.onZoomWheel} onPointerDown={this.onPointerDown} onClick={this.onClick}
                 style={{
                     overflowX: this._zoomed !== 1 ? "scroll" : undefined,
@@ -571,8 +571,10 @@ export class PDFViewer extends ViewBoxAnnotatableComponent<IViewerProps, PdfDocu
             {!this._marqueeing || !this._mainCont.current || !this._annotationLayer.current ? (null) :
                 <MarqueeAnnotator rootDoc={this.rootDoc} scrollTop={0} down={this._marqueeing}
                     anchorMenuClick={this.props.anchorMenuClick}
-                    addDocument={this.addDocument} finishMarquee={this.finishMarquee}
-                    getPageFromScroll={this.getPageFromScroll} savedAnnotations={this._savedAnnotations}
+                    addDocument={this.addDocument}
+                    finishMarquee={this.finishMarquee}
+                    getPageFromScroll={this.getPageFromScroll}
+                    savedAnnotations={this._savedAnnotations}
                     annotationLayer={this._annotationLayer.current} mainCont={this._mainCont.current} />}
         </div>;
     }
-- 
cgit v1.2.3-70-g09d2

