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/nodes/WebBox.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/nodes/WebBox.tsx')
| -rw-r--r-- | src/client/views/nodes/WebBox.tsx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/client/views/nodes/WebBox.tsx b/src/client/views/nodes/WebBox.tsx index 881cdae37..992b1ff89 100644 --- a/src/client/views/nodes/WebBox.tsx +++ b/src/client/views/nodes/WebBox.tsx @@ -267,10 +267,10 @@ export class WebBox extends ViewBoxAnnotatableComponent<FieldViewProps>() { annoBox.className = 'marqueeAnnotator-annotationBox'; const scale = this._url ? 1 : this.ScreenToLocalBoxXf().Scale; // transforms the positions from screen onto the pdf div - annoBox.style.top = ((rect.top - mainrect.translateY) * scale + (this._url ? this._mainCont.current.scrollTop : NumCast(this.layoutDoc.layout_scrollTop))).toString(); - annoBox.style.left = ((rect.left - mainrect.translateX) * scale).toString(); - annoBox.style.width = (rect.width * scale).toString(); - annoBox.style.height = (rect.height * scale).toString(); + annoBox.style.top = ((rect.top - mainrect.translateY) * scale + (this._url ? this._mainCont.current.scrollTop : NumCast(this.layoutDoc.layout_scrollTop))).toString() + 'px'; + annoBox.style.left = ((rect.left - mainrect.translateX) * scale).toString() + 'px'; + annoBox.style.width = (rect.width * scale).toString() + 'px'; + annoBox.style.height = (rect.height * scale).toString() + 'px'; this._annotationLayer.current && MarqueeAnnotator.previewNewAnnotation(this._savedAnnotations, this._annotationLayer.current, annoBox, 1); } } |
