diff options
author | Geireann Lindfield Roberts <60007097+geireann@users.noreply.github.com> | 2020-11-06 00:32:16 +0800 |
---|---|---|
committer | Geireann Lindfield Roberts <60007097+geireann@users.noreply.github.com> | 2020-11-06 00:32:16 +0800 |
commit | 13d1925c12539949f5bf26113f4c4599d9c98e7f (patch) | |
tree | 3bd9dc7e41834e77e48629ac805f37d1bd4c8acf /src/client/views/linking/LinkMenuItem.tsx | |
parent | 14132f488b29641302fe10711a938b1bbdecc4fa (diff) | |
parent | 5910435416fea88d81d1868977a421c28ef05b2a (diff) |
Merge branch 'master' into presentation_v1
Diffstat (limited to 'src/client/views/linking/LinkMenuItem.tsx')
-rw-r--r-- | src/client/views/linking/LinkMenuItem.tsx | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/client/views/linking/LinkMenuItem.tsx b/src/client/views/linking/LinkMenuItem.tsx index 1ba724889..5c9123876 100644 --- a/src/client/views/linking/LinkMenuItem.tsx +++ b/src/client/views/linking/LinkMenuItem.tsx @@ -109,6 +109,7 @@ export class LinkMenuItem extends React.Component<LinkMenuItemProps> { onLinkButtonUp = (e: PointerEvent): void => { document.removeEventListener("pointermove", this.onLinkButtonMoved); document.removeEventListener("pointerup", this.onLinkButtonUp); + DocumentView.followLinkClick(this.props.linkDoc, this.props.sourceDoc, this.props.docView.props, false, false); e.stopPropagation(); } @@ -228,18 +229,17 @@ export class LinkMenuItem extends React.Component<LinkMenuItemProps> { onPointerDown={this.onLinkButtonDown}> <div className="linkMenu-text"> - {source ? <p className="linkMenu-source-title"> - <b>Source: {source}</b></p> : null} + {source ? <p className="linkMenu-source-title"> <b>Source: {source}</b></p> : null} <div className="linkMenu-title-wrapper"> <div className="destination-icon-wrapper" > - <FontAwesomeIcon className="destination-icon" icon={destinationIcon} size="sm" /></div> - <p className="linkMenu-destination-title" - onPointerDown={() => DocumentView.followLinkClick(this.props.linkDoc, this.props.sourceDoc, this.props.docView.props, false, false)}> + <FontAwesomeIcon className="destination-icon" icon={destinationIcon} size="sm" /> + </div> + <p className="linkMenu-destination-title"> {this.props.linkDoc.linksToAnnotation && Cast(this.props.destinationDoc.data, WebField)?.url.href === this.props.linkDoc.annotationUri ? "Annotation in" : ""} {title} </p> </div> - {this.props.linkDoc.description !== "" ? <p className="linkMenu-description"> - {StrCast(this.props.linkDoc.description)}</p> : null} </div> + {!this.props.linkDoc.description ? (null) : <p className="linkMenu-description">{StrCast(this.props.linkDoc.description)}</p>} + </div> <div className="linkMenu-item-buttons" ref={this._buttonRef} > |