diff options
| author | bobzel <zzzman@gmail.com> | 2025-06-26 16:41:14 -0400 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2025-06-26 16:41:14 -0400 |
| commit | fc423eed6aa81aedfad4ee74f2e05e385858801d (patch) | |
| tree | a19bf2a9a3533788de5f583b633ae3502fb63c66 /src/client/views/MarqueeAnnotator.tsx | |
| parent | 2b7b12a9212de3bdce518d885dd739038ee14901 (diff) | |
| parent | 2d70a3bc17fe94d0bf92d8362b8fda8a2e4a82e1 (diff) | |
Merge branch 'master' into agent-paper-main
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); }) ); |
