From d30f5b4855a0ad500cc5784260128ecc269f6450 Mon Sep 17 00:00:00 2001 From: bobzel Date: Fri, 12 Feb 2021 13:33:36 -0500 Subject: streamlined double-clicking to always open lightbox no matter what document you click on (except webbox's in native selection mode). shift -double-click re-centers a freeform view. --- src/client/views/pdf/PDFViewer.tsx | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'src/client/views/pdf') diff --git a/src/client/views/pdf/PDFViewer.tsx b/src/client/views/pdf/PDFViewer.tsx index c1ec7fcbb..0ba08685a 100644 --- a/src/client/views/pdf/PDFViewer.tsx +++ b/src/client/views/pdf/PDFViewer.tsx @@ -363,9 +363,11 @@ export class PDFViewer extends ViewBoxAnnotatableComponent { const hit = document.elementFromPoint(e.clientX, e.clientY); - if (hit && hit.localName === "span" && this.annotationsActive(true)) { // drag selecting text stops propagation - e.button === 0 && e.stopPropagation(); - } + // bcz: Change. drag selecting requires that preventDefault is NOT called. This used to happen in DocumentView, + // but that's changed, so this shouldn't be needed. + // if (hit && hit.localName === "span" && this.annotationsActive(true)) { // drag selecting text stops propagation + // e.button === 0 && e.stopPropagation(); + // } // if alt+left click, drag and annotate this._downX = e.clientX; this._downY = e.clientY; @@ -376,6 +378,7 @@ export class PDFViewer extends ViewBoxAnnotatableComponent void) => this._setPreviewCursor = func; -- cgit v1.2.3-70-g09d2