diff options
author | bobzel <zzzman@gmail.com> | 2021-02-23 20:42:49 -0500 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2021-02-23 20:42:49 -0500 |
commit | 5a2589c766ace01908a6b151f7170a90f425610c (patch) | |
tree | 4dc96394bbc1492805eea7c4266ada23001bd28f /src/client/views/pdf/PDFViewer.tsx | |
parent | 684faaab165681c34fe824e1b6ac887d25b73f36 (diff) |
fixed pdfs so that if you activate and immediately start selecting text it works. cleaned up some more in collectionFreeFormView by improving layoutDocsInGrid
Diffstat (limited to 'src/client/views/pdf/PDFViewer.tsx')
-rw-r--r-- | src/client/views/pdf/PDFViewer.tsx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/client/views/pdf/PDFViewer.tsx b/src/client/views/pdf/PDFViewer.tsx index 7687690b2..ca6dc87ae 100644 --- a/src/client/views/pdf/PDFViewer.tsx +++ b/src/client/views/pdf/PDFViewer.tsx @@ -385,10 +385,12 @@ export class PDFViewer extends ViewBoxAnnotatableComponent<IViewerProps, PdfDocu this._setPreviewCursor?.(e.clientX, e.clientY, true); } if (!e.altKey && e.button === 0 && this.active(true)) { + this._marqueeing = [e.clientX, e.clientY]; if (e.target && ((e.target as any).className.includes("endOfContent") || ((e.target as any).parentElement.className !== "textLayer"))) { - this._marqueeing = [e.clientX, e.clientY]; // if texLayer is hit, then we select text instead of using a marquee document.addEventListener("pointermove", this.onSelectMove); // need this to prevent document from being dragged if stopPropagation doesn't get called } else { + // if textLayer is hit, then we select text instead of using a marquee so clear out the marquee. + setTimeout(action(() => this._marqueeing = undefined), 100); // bcz: hack .. anchor menu is setup within MarqueeAnnotator so we need to at least create the marqueeAnnotator even though we aren't using it. // clear out old marquees and initialize menu for new selection AnchorMenu.Instance.Status = "marquee"; this._savedAnnotations.values().forEach(v => v.forEach(a => a.remove())); |