From 65179e8b0519aa4ccf28afc4c429262ecf7a62f3 Mon Sep 17 00:00:00 2001
From: "A.J. Shulman" <Shulman.aj@gmail.com>
Date: Tue, 16 Jul 2024 11:11:53 -0400
Subject: attempting annotations for image chunks

---
 src/client/views/pdf/PDFViewer.tsx | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

(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 6c1617c38..2d6ed57d5 100644
--- a/src/client/views/pdf/PDFViewer.tsx
+++ b/src/client/views/pdf/PDFViewer.tsx
@@ -406,6 +406,30 @@ export class PDFViewer extends ObservableReactComponent<IViewerProps> {
         }
     };
 
+    // @action
+    // createMarquee = (coords: [x1: number, x2: number, y1: number, y2: number]): void => {
+    //     // const hit = document.elementFromPoint(e.clientX, e.clientY);
+    //     // bcz: Change. drag selecting requires that preventDefault is NOT called.  This used to happen in DocumentView,
+    //     //      but that's changed, so this shouldn't be needed.
+    //     // if (hit && hit.localName === "span" && this.annotationsActive(true)) {  // drag selecting text stops propagation
+    //     //     e.button === 0 && e.stopPropagation();
+    //     // }
+    //     // if alt+left click, drag and annotate
+    //     this._downX = coords[0];
+    //     this._downY = coords[2];
+
+    //     if ((this._props.Document._freeform_scale || 1) !== 1) return;
+    //     this._props.select(false);
+    //     MarqueeAnnotator.clearAnnotations(this._savedAnnotations);
+    //     this.isAnnotating = true;
+    //     this._textSelecting = false;
+    //     // if textLayer is hit, then we select text instead of using a marquee so clear out the marquee.
+    //     this._styleRule = addStyleSheetRule(PDFViewer._annotationStyle, 'htmlAnnotation', { 'pointer-events': 'none' });
+
+    //     this._marqueeref.current?.onInitiateSelection([coords[0], coords[2]]);
+    //     this._marqueeref.current?.onTerminateSelection();
+    // };
+
     @action
     finishMarquee = (/* x?: number, y?: number */) => {
         this._getAnchor = AnchorMenu.Instance?.GetAnchor;
-- 
cgit v1.2.3-70-g09d2

