diff options
author | bobzel <zzzman@gmail.com> | 2025-06-26 16:41:01 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2025-06-26 16:41:01 -0400 |
commit | 2d70a3bc17fe94d0bf92d8362b8fda8a2e4a82e1 (patch) | |
tree | a9b733e4318f18890459a10ad50d393abf76f6e1 /src/client/views/pdf/PDFViewer.tsx | |
parent | 0093370a04348ef38b91252d02ab850f25d753b2 (diff) |
fixed rendering pdfs, text selections on pdfs,
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 97fe183dd..bb4485712 100644 --- a/src/client/views/pdf/PDFViewer.tsx +++ b/src/client/views/pdf/PDFViewer.tsx @@ -443,10 +443,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)); } } |