From 9411a0ef68045fc1ab5a3d312709ae47080e8f27 Mon Sep 17 00:00:00 2001 From: bobzel Date: Tue, 7 Jan 2025 02:55:11 -0500 Subject: yet another fix to marquee annotations on PDFs that are scrolled. --- src/client/views/pdf/PDFViewer.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/client/views/pdf/PDFViewer.tsx b/src/client/views/pdf/PDFViewer.tsx index 48df66031..8728ce99c 100644 --- a/src/client/views/pdf/PDFViewer.tsx +++ b/src/client/views/pdf/PDFViewer.tsx @@ -148,7 +148,7 @@ export class PDFViewer extends ObservableReactComponent { }; @computed get _scrollHeight() { - return this._pageSizes.reduce((size, page) => size + page.height, 0) * Pdfjs.PixelsPerInch.PDF_TO_CSS_UNITS; + return this._pageSizes.reduce((size, page) => size + page.height, 0); } initialLoad = () => { @@ -530,7 +530,7 @@ export class PDFViewer extends ObservableReactComponent { } getScrollHeight = () => this._scrollHeight; - scrollXf = () => this._props.ScreenToLocalTransform().translate(0, this._mainCont.current ? NumCast(this._props.layoutDoc._layout_scrollTop) : 0); + scrollXf = () => this._props.ScreenToLocalTransform().translate(0, this._mainCont.current ? NumCast(this._props.layoutDoc._layout_scrollTop) / 1.333 : 0); overlayTransform = () => this.scrollXf().scale(1 / NumCast(this._props.layoutDoc._freeform_scale, 1)); panelWidth = () => this._props.PanelWidth() / (this._props.NativeDimScaling?.() || 1); panelHeight = () => this._props.PanelHeight() / (this._props.NativeDimScaling?.() || 1); -- cgit v1.2.3-70-g09d2