aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/linking
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2022-06-06 13:13:49 -0400
committerbobzel <zzzman@gmail.com>2022-06-06 13:13:49 -0400
commitc99825362f4a221af728f1dcee139c7403a7916f (patch)
tree2ea3c97039e239869851a4edfd51ed4ccf865fa6 /src/client/views/linking
parent23fb3e44ff9eb9cb4df677cff93ea3be19d2ede9 (diff)
added auto links from recordings to pdfs when they scroll. opened audio links on right by default instead of in lightbox. focus on pdf/coponent anchor when following link from it (via the LinkMenu)
Diffstat (limited to 'src/client/views/linking')
-rw-r--r--src/client/views/linking/LinkMenuItem.tsx4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/client/views/linking/LinkMenuItem.tsx b/src/client/views/linking/LinkMenuItem.tsx
index 3ddcf803d..a75e7a0c4 100644
--- a/src/client/views/linking/LinkMenuItem.tsx
+++ b/src/client/views/linking/LinkMenuItem.tsx
@@ -102,6 +102,10 @@ export class LinkMenuItem extends React.Component<LinkMenuItemProps> {
this.props.itemHandler?.(this.props.linkDoc);
} else {
+ const focusDoc = Cast(this.props.linkDoc.anchor1, Doc, null)?.annotationOn === this.props.sourceDoc ? Cast(this.props.linkDoc.anchor1, Doc, null) :
+ Cast(this.props.linkDoc.anchor2, Doc, null)?.annotationOn === this.props.sourceDoc ? Cast(this.props.linkDoc.anchor12, Doc, null) : undefined;
+
+ if (focusDoc) this.props.docView.ComponentView?.scrollFocus?.(focusDoc, true);
LinkManager.FollowLink(this.props.linkDoc, this.props.sourceDoc, this.props.docView.props, false);
}
});