aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/linking/LinkMenuItem.tsx
diff options
context:
space:
mode:
authorMelissa Zhang <mzhang19096@gmail.com>2020-07-08 23:13:11 -0700
committerMelissa Zhang <mzhang19096@gmail.com>2020-07-08 23:13:11 -0700
commit1e988c7c6d927630059645ebee05261619aba7b4 (patch)
treef5050b519de0309c3e5d4bdb4b1a2ac153cea64c /src/client/views/linking/LinkMenuItem.tsx
parent467ddce06a4cf9e3b61abf733f20c60b257c94db (diff)
added multiple links capability, linking bug fixes
Diffstat (limited to 'src/client/views/linking/LinkMenuItem.tsx')
-rw-r--r--src/client/views/linking/LinkMenuItem.tsx5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/client/views/linking/LinkMenuItem.tsx b/src/client/views/linking/LinkMenuItem.tsx
index 9c21bca35..ad3c12122 100644
--- a/src/client/views/linking/LinkMenuItem.tsx
+++ b/src/client/views/linking/LinkMenuItem.tsx
@@ -152,8 +152,7 @@ export class LinkMenuItem extends React.Component<LinkMenuItemProps> {
DocumentLinksButton.EditLink = undefined;
LinkDocPreview.LinkInfo = undefined;
- const redirectUrl = StrCast(this.props.linkDoc.annotationUrl, null);
- 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
+ this.props.linkDoc.linksToAnnotation && (Doc.GetProto(this.props.destinationDoc).data = new WebField(StrCast(this.props.linkDoc.annotationUrl))); // 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") {
@@ -196,7 +195,7 @@ export class LinkMenuItem extends React.Component<LinkMenuItemProps> {
<div className="linkMenu-text">
<p className="linkMenu-destination-title"
onPointerDown={this.followDefault}>
- {StrCast(this.props.destinationDoc.title)}</p>
+ {(this.props.linkDoc.linksToAnnotation ? "Annotation in " : "") + StrCast(this.props.destinationDoc.title)}</p>
{this.props.linkDoc.description !== "" ? <p className="linkMenu-description">
{StrCast(this.props.linkDoc.description)}</p> : null} </div>