aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/linking/LinkMenuItem.tsx
diff options
context:
space:
mode:
authorMelissa Zhang <mzhang19096@gmail.com>2020-07-08 21:11:35 -0700
committerMelissa Zhang <mzhang19096@gmail.com>2020-07-08 21:11:35 -0700
commit467ddce06a4cf9e3b61abf733f20c60b257c94db (patch)
tree6a719948e8cb7b930f7a40a9f52547f9f7dafbec /src/client/views/linking/LinkMenuItem.tsx
parent876437db1f7347787badbdd48ac751dba111a752 (diff)
implemented much more link functionality, redirects to annotation URL when link followed
Diffstat (limited to 'src/client/views/linking/LinkMenuItem.tsx')
-rw-r--r--src/client/views/linking/LinkMenuItem.tsx3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/client/views/linking/LinkMenuItem.tsx b/src/client/views/linking/LinkMenuItem.tsx
index 76f802c0c..9c21bca35 100644
--- a/src/client/views/linking/LinkMenuItem.tsx
+++ b/src/client/views/linking/LinkMenuItem.tsx
@@ -153,8 +153,7 @@ export class LinkMenuItem extends React.Component<LinkMenuItemProps> {
LinkDocPreview.LinkInfo = undefined;
const redirectUrl = StrCast(this.props.linkDoc.annotationUrl, null);
- redirectUrl && (this.props.destinationDoc.data = new WebField(redirectUrl)); // If the link is to an annotation, go to annotation
- console.log(redirectUrl, "redirectUrl");
+ redirectUrl && (Doc.GetProto(this.props.destinationDoc).data = new WebField(redirectUrl)); // if destination is a Hypothes.is annotation, redirect website to the annotation's URL to scroll to the annotation
if (this.props.linkDoc.follow) {
if (this.props.linkDoc.follow === "Default") {