diff options
| author | bobzel <zzzman@gmail.com> | 2025-06-26 16:41:01 -0400 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2025-06-26 16:41:01 -0400 |
| commit | 2d70a3bc17fe94d0bf92d8362b8fda8a2e4a82e1 (patch) | |
| tree | a9b733e4318f18890459a10ad50d393abf76f6e1 /src/client/views/MarqueeAnnotator.tsx | |
| parent | 0093370a04348ef38b91252d02ab850f25d753b2 (diff) | |
fixed rendering pdfs, text selections on pdfs,
Diffstat (limited to 'src/client/views/MarqueeAnnotator.tsx')
| -rw-r--r-- | src/client/views/MarqueeAnnotator.tsx | 16 |
1 files changed, 8 insertions, 8 deletions
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); }) ); |
