diff options
| author | Joanne <zehan_ding@brown.edu> | 2025-06-27 10:45:25 -0400 |
|---|---|---|
| committer | Joanne <zehan_ding@brown.edu> | 2025-06-27 10:45:25 -0400 |
| commit | 729f9ed22961af566e903fe651d0cde6401c9fc0 (patch) | |
| tree | 1711613b083a5e56890143f75906b33cf5656957 /src/client/views/MarqueeAnnotator.tsx | |
| parent | c990c71e52b238a43c3877386429132d57cc0bfd (diff) | |
| parent | 2d70a3bc17fe94d0bf92d8362b8fda8a2e4a82e1 (diff) | |
Merge branch 'master' of https://github.com/brown-dash/Dash-Web into joanne-tutorialagent
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); }) ); |
