aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/pdf/PDFViewer.tsx
diff options
context:
space:
mode:
authordinhanhtruong <70963346+dinhanhtruong@users.noreply.github.com>2021-07-24 15:22:16 -0400
committerdinhanhtruong <70963346+dinhanhtruong@users.noreply.github.com>2021-07-24 15:22:16 -0400
commit98d01d622bb4f7093967d7040021f316d2faeaf8 (patch)
tree9a7cbe27663461b754da053003af433fc6b4bb44 /src/client/views/pdf/PDFViewer.tsx
parent7b6de64a1244ba0944edf8301a7adc2cb1445f8a (diff)
parentc7a0a346238c55b8c223798f75cef758418aa051 (diff)
Merge branch 'master' into linking-anh
Diffstat (limited to 'src/client/views/pdf/PDFViewer.tsx')
-rw-r--r--src/client/views/pdf/PDFViewer.tsx10
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"))) {