diff options
author | bobzel <zzzman@gmail.com> | 2022-07-06 17:26:26 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2022-07-06 17:26:26 -0400 |
commit | 85e290ee7a666412570f2bae43a9b62d35b425f2 (patch) | |
tree | 65b2d2a72a57b122a5d23148eb863cd1f1d4054b /src/client/views/nodes/PDFBox.tsx | |
parent | b09e8c624884f8cd1ef98f4d93bc00f4fc7db333 (diff) |
fixed pushpin behavior to work with notes in annotation sidebar. fixed right-clicking on text anchors to bring up anchor menu
Diffstat (limited to 'src/client/views/nodes/PDFBox.tsx')
-rw-r--r-- | src/client/views/nodes/PDFBox.tsx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/client/views/nodes/PDFBox.tsx b/src/client/views/nodes/PDFBox.tsx index 4eb07fd8d..1fb3cef2a 100644 --- a/src/client/views/nodes/PDFBox.tsx +++ b/src/client/views/nodes/PDFBox.tsx @@ -179,12 +179,14 @@ export class PDFBox extends ViewBoxAnnotatableComponent<ViewBoxAnnotatableProps } scrollFocus = (doc: Doc, smooth: boolean) => { + let didToggle = false; if (DocListCast(this.props.Document[this.fieldKey + "-sidebar"]).includes(doc) && !this.SidebarShown) { this.toggleSidebar(!smooth); + didToggle = true; } if (this._sidebarRef?.current?.makeDocUnfiltered(doc)) return 1; this._initialScrollTarget = doc; - return this._pdfViewer?.scrollFocus(doc, smooth); + return this._pdfViewer?.scrollFocus(doc, smooth) ?? (didToggle ? 1 : undefined); } getAnchor = () => { const anchor = |