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/pdf/PDFViewer.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/pdf/PDFViewer.tsx')
-rw-r--r-- | src/client/views/pdf/PDFViewer.tsx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/client/views/pdf/PDFViewer.tsx b/src/client/views/pdf/PDFViewer.tsx index 616e2119f..1de945d69 100644 --- a/src/client/views/pdf/PDFViewer.tsx +++ b/src/client/views/pdf/PDFViewer.tsx @@ -985,10 +985,10 @@ export class PDFViewer extends ObservableReactComponent<IViewerProps> { const annoBox = document.createElement('div'); annoBox.className = 'marqueeAnnotator-annotationBox'; // transforms the positions from screen onto the pdf div - annoBox.style.left = (((rect.left - boundingRect.left) * scaleX) / pdfScale).toString(); - annoBox.style.top = (((rect.top - boundingRect.top) * scaleY) / pdfScale + this._mainCont.current.scrollTop).toString(); - annoBox.style.width = ((rect.width * scaleX) / pdfScale).toString(); - annoBox.style.height = ((rect.height * scaleY) / pdfScale).toString(); + annoBox.style.left = (((rect.left - boundingRect.left) * scaleX) / pdfScale).toString() + 'px'; + annoBox.style.top = (((rect.top - boundingRect.top) * scaleY) / pdfScale + this._mainCont.current.scrollTop).toString() + 'px'; + annoBox.style.width = ((rect.width * scaleX) / pdfScale).toString() + 'px'; + annoBox.style.height = ((rect.height * scaleY) / pdfScale).toString() + 'px'; this._annotationLayer.current && MarqueeAnnotator.previewNewAnnotation(this._savedAnnotations, this._annotationLayer.current, annoBox, this.getPageFromScroll(rect.top)); } } |