diff options
author | geireann <60007097+geireann@users.noreply.github.com> | 2021-07-22 15:25:37 -0400 |
---|---|---|
committer | geireann <60007097+geireann@users.noreply.github.com> | 2021-07-22 15:25:37 -0400 |
commit | b4ad8cc62c51648c41f4b0ea2816f9086ed5c711 (patch) | |
tree | a4486669d6850fa0137e15beb1abce4d933cfd7d /src/client/views/pdf/PDFViewer.tsx | |
parent | af33c5a46f0680dad41532a86557193bf8af3b08 (diff) | |
parent | 491fb6fc41792b1dfe7e3f9210b07a6b8e1eb0a7 (diff) |
Merge branch 'master' into Ashley
Diffstat (limited to 'src/client/views/pdf/PDFViewer.tsx')
-rw-r--r-- | src/client/views/pdf/PDFViewer.tsx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/client/views/pdf/PDFViewer.tsx b/src/client/views/pdf/PDFViewer.tsx index 85cf5abd7..4a50dccf3 100644 --- a/src/client/views/pdf/PDFViewer.tsx +++ b/src/client/views/pdf/PDFViewer.tsx @@ -133,10 +133,10 @@ export class PDFViewer extends React.Component<IViewerProps> { this._disposers.selected = reaction(() => this.props.isSelected(), selected => { - if (!selected) { - Array.from(this._savedAnnotations.values()).forEach(v => v.forEach(a => a.remove())); - Array.from(this._savedAnnotations.keys()).forEach(k => this._savedAnnotations.set(k, [])); - } + // if (!selected) { + // Array.from(this._savedAnnotations.values()).forEach(v => v.forEach(a => a.remove())); + // Array.from(this._savedAnnotations.keys()).forEach(k => this._savedAnnotations.set(k, [])); + // } (SelectionManager.Views().length === 1) && this.setupPdfJsViewer(); }, { fireImmediately: true }); @@ -372,7 +372,7 @@ export class PDFViewer extends React.Component<IViewerProps> { if ((e.button !== 0 || e.altKey) && this.props.isContentActive(true)) { this._setPreviewCursor?.(e.clientX, e.clientY, true); } - if (!e.altKey && e.button === 0 && this.props.isContentActive(true)) { + if (!e.altKey && e.button === 0 && this.props.isContentActive(true) && ![InkTool.Highlighter, InkTool.Pen].includes(CurrentUserUtils.SelectedTool)) { this.props.select(false); this._marqueeing = [e.clientX, e.clientY]; if (e.target && ((e.target as any).className.includes("endOfContent") || ((e.target as any).parentElement.className !== "textLayer"))) { |