aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/pdf
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2024-01-03 13:23:14 -0500
committerbobzel <zzzman@gmail.com>2024-01-03 13:23:14 -0500
commit3f7b73ee8a3f75cd688ee7ddc7b54d90b00bee67 (patch)
tree7334d2d4ce886b4ba990cab45d3945fc62502eef /src/client/views/pdf
parentaf42d3061bd85907e3d987f0d794c250cfaded1c (diff)
fixed marquee annotator for lightbox with pdf and rotated documents.
Diffstat (limited to 'src/client/views/pdf')
-rw-r--r--src/client/views/pdf/PDFViewer.tsx5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/client/views/pdf/PDFViewer.tsx b/src/client/views/pdf/PDFViewer.tsx
index b6d027d30..f41094010 100644
--- a/src/client/views/pdf/PDFViewer.tsx
+++ b/src/client/views/pdf/PDFViewer.tsx
@@ -419,7 +419,7 @@ export class PDFViewer extends ObservableReactComponent<IViewerProps> {
@action
createTextAnnotation = (sel: Selection, selRange: Range) => {
if (this._mainCont.current) {
- this._mainCont.current.style.transform = `rotate(${NumCast(this._props.DocumentView!().screenToLocalTransform().RotateDeg)}deg)`;
+ this._mainCont.current.style.transform = `rotate(${NumCast(this._props.DocumentView!().screenToNativeLocalTransform().RotateDeg)}deg)`;
const boundingRect = this._mainCont.current.getBoundingClientRect();
const clientRects = selRange.getClientRects();
for (let i = 0; i < clientRects.length; i++) {
@@ -585,6 +585,7 @@ export class PDFViewer extends ObservableReactComponent<IViewerProps> {
getPageFromScroll={this.getPageFromScroll}
anchorMenuClick={this._props.anchorMenuClick}
scrollTop={0}
+ isNativeScaled={true}
annotationLayerScrollTop={NumCast(this._props.Document._layout_scrollTop)}
addDocument={this.addDocumentWrapper}
docView={this._props.DocumentView!}
@@ -592,7 +593,7 @@ export class PDFViewer extends ObservableReactComponent<IViewerProps> {
savedAnnotations={this.savedAnnotations}
selectionText={this.selectionText}
annotationLayer={this._annotationLayer.current}
- mainCont={this._mainCont.current}
+ marqueeContainer={this._mainCont.current}
anchorMenuCrop={this._textSelecting ? undefined : this.crop}
/>
)}