aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/pdf/PDFViewer.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2025-06-26 16:41:14 -0400
committerbobzel <zzzman@gmail.com>2025-06-26 16:41:14 -0400
commitfc423eed6aa81aedfad4ee74f2e05e385858801d (patch)
treea19bf2a9a3533788de5f583b633ae3502fb63c66 /src/client/views/pdf/PDFViewer.tsx
parent2b7b12a9212de3bdce518d885dd739038ee14901 (diff)
parent2d70a3bc17fe94d0bf92d8362b8fda8a2e4a82e1 (diff)
Merge branch 'master' into agent-paper-main
Diffstat (limited to 'src/client/views/pdf/PDFViewer.tsx')
-rw-r--r--src/client/views/pdf/PDFViewer.tsx8
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));
}
}