From 7e4d793eaa7e5b6b564355a11fa02a5611645f20 Mon Sep 17 00:00:00 2001
From: bobzel <zzzman@gmail.com>
Date: Fri, 21 Mar 2025 18:58:21 -0400
Subject: trying to improve how data / layout / root and templtae docs are
 accessed.

---
 src/client/views/MarqueeAnnotator.tsx | 22 ++++++++++------------
 1 file changed, 10 insertions(+), 12 deletions(-)

(limited to 'src/client/views/MarqueeAnnotator.tsx')

diff --git a/src/client/views/MarqueeAnnotator.tsx b/src/client/views/MarqueeAnnotator.tsx
index 3f4200dce..e4811a902 100644
--- a/src/client/views/MarqueeAnnotator.tsx
+++ b/src/client/views/MarqueeAnnotator.tsx
@@ -97,7 +97,6 @@ export class MarqueeAnnotator extends ObservableReactComponent<MarqueeAnnotatorP
             presentation_zoomText: true,
             title: '>' + this.props.Document.title,
         });
-        const textRegionAnnoProto = textRegionAnno[DocData];
         let minX = Number.MAX_VALUE;
         let maxX = -Number.MAX_VALUE;
         let minY = Number.MAX_VALUE;
@@ -118,15 +117,15 @@ export class MarqueeAnnotator extends ObservableReactComponent<MarqueeAnnotatorP
             })
         );
 
-        textRegionAnnoProto.y = Math.max(minY, 0);
-        textRegionAnnoProto.x = Math.max(minX, 0);
-        textRegionAnnoProto.height = Math.max(maxY, 0) - Math.max(minY, 0);
-        textRegionAnnoProto.width = Math.max(maxX, 0) - Math.max(minX, 0);
-        textRegionAnnoProto.backgroundColor = color;
+        textRegionAnno.$y = Math.max(minY, 0);
+        textRegionAnno.$x = Math.max(minX, 0);
+        textRegionAnno.$height = Math.max(maxY, 0) - Math.max(minY, 0);
+        textRegionAnno.$width = Math.max(maxX, 0) - Math.max(minX, 0);
+        textRegionAnno.$backgroundColor = color;
         // mainAnnoDocProto.text = this._selectionText;
-        textRegionAnnoProto.text_inlineAnnotations = new List<string>(annoRects);
-        textRegionAnnoProto.opacity = 0;
-        textRegionAnnoProto.layout_unrendered = true;
+        textRegionAnno.$text_inlineAnnotations = new List<string>(annoRects);
+        textRegionAnno.$opacity = 0;
+        textRegionAnno.$layout_unrendered = true;
         savedAnnoMap.clear();
         return textRegionAnno;
     };
@@ -226,9 +225,8 @@ export class MarqueeAnnotator extends ObservableReactComponent<MarqueeAnnotatorP
                   DragManager.StartAnchorAnnoDrag([ele], new DragManager.AnchorAnnoDragData(this.props.docView(), sourceAnchorCreator, targetCreator), e.pageX, e.pageY, {
                       dragComplete: dragEx => {
                           if (!dragEx.aborted && dragEx.linkDocument) {
-                              const linkDocData = dragEx.linkDocument[DocData];
-                              linkDocData.link_relationship = 'cropped image';
-                              linkDocData.title = 'crop: ' + this.props.Document.title;
+                              dragEx.linkDocument.$link_relationship = 'cropped image';
+                              dragEx.linkDocument.$title = 'crop: ' + this.props.Document.title;
                           }
                       },
                   });
-- 
cgit v1.2.3-70-g09d2

