diff options
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); }) ); |
