From 2d70a3bc17fe94d0bf92d8362b8fda8a2e4a82e1 Mon Sep 17 00:00:00 2001
From: bobzel <zzzman@gmail.com>
Date: Thu, 26 Jun 2025 16:41:01 -0400
Subject: fixed rendering pdfs, text selections on pdfs,

---
 src/client/views/MarqueeAnnotator.tsx | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

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

diff --git a/src/client/views/MarqueeAnnotator.tsx b/src/client/views/MarqueeAnnotator.tsx
index d354dd2c0..7bb14c01e 100644
--- a/src/client/views/MarqueeAnnotator.tsx
+++ b/src/client/views/MarqueeAnnotator.tsx
@@ -104,16 +104,16 @@ export class MarqueeAnnotator extends ObservableReactComponent<MarqueeAnnotatorP
         const annoRects: string[] = [];
         savedAnnoMap.forEach((value: HTMLDivElement[]) =>
             value.forEach(anno => {
-                const x = parseInt(anno.style.left ?? '0');
-                const y = parseInt(anno.style.top ?? '0');
-                const height = parseInt(anno.style.height ?? '0');
-                const width = parseInt(anno.style.width ?? '0');
+                const x = parseInt(anno.style.left || '0');
+                const y = parseInt(anno.style.top || '0');
+                const height = parseInt(anno.style.height || '0');
+                const width = parseInt(anno.style.width || '0');
                 annoRects.push(`${x}:${y}:${width}:${height}`);
                 anno.remove();
-                minY = Math.min(NumCast(y), minY);
-                minX = Math.min(NumCast(x), minX);
-                maxY = Math.max(NumCast(y) + NumCast(height), maxY);
-                maxX = Math.max(NumCast(x) + NumCast(width), maxX);
+                minY = Math.min(y, minY);
+                minX = Math.min(x, minX);
+                maxY = Math.max(y + height, maxY);
+                maxX = Math.max(x + width, maxX);
             })
         );
 
-- 
cgit v1.2.3-70-g09d2

