aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/PDFBox.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2022-07-06 17:26:26 -0400
committerbobzel <zzzman@gmail.com>2022-07-06 17:26:26 -0400
commit85e290ee7a666412570f2bae43a9b62d35b425f2 (patch)
tree65b2d2a72a57b122a5d23148eb863cd1f1d4054b /src/client/views/nodes/PDFBox.tsx
parentb09e8c624884f8cd1ef98f4d93bc00f4fc7db333 (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.tsx4
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 =