diff options
author | Bob Zeleznik <zzzman@gmail.com> | 2020-06-25 14:29:27 -0400 |
---|---|---|
committer | Bob Zeleznik <zzzman@gmail.com> | 2020-06-25 14:29:27 -0400 |
commit | ce98e69b0030eff0fbb1bf09137571e7b37ef77c (patch) | |
tree | 58e5ef019f25682a40703932af62aaa4b3fa8ee9 /src | |
parent | d0e20b86d1236f99f58b0241b61af15e39561c66 (diff) |
fixed linkicon dragging feedback
Diffstat (limited to 'src')
-rw-r--r-- | src/client/views/nodes/DocumentLinksButton.tsx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/client/views/nodes/DocumentLinksButton.tsx b/src/client/views/nodes/DocumentLinksButton.tsx index f35b48ce4..4f4f12521 100644 --- a/src/client/views/nodes/DocumentLinksButton.tsx +++ b/src/client/views/nodes/DocumentLinksButton.tsx @@ -82,16 +82,16 @@ export class DocumentLinksButton extends React.Component<DocumentLinksButtonProp get linkButton() { const links = DocListCast(this.props.View.props.Document.links); return (!links.length || links[0].hidden) && !this.props.AlwaysOn ? (null) : - <div title="Drag(create link) Tap(view links)" ref={this._linkButton} style={{ position: "absolute", left: this.props.Offset?.[0] }}> + <div title="Drag(create link) Tap(view links)" ref={this._linkButton} style={{ minWidth: 20, minHeight: 20, position: "absolute", left: this.props.Offset?.[0] }}> <div className={"documentLinksButton"} style={{ backgroundColor: DocumentLinksButton.StartLink ? "transparent" : "" }} onPointerDown={this.onLinkButtonDown} onPointerLeave={action(() => LinkDocPreview.LinkInfo = undefined)} - onPointerEnter={action(e => LinkDocPreview.LinkInfo = { + onPointerEnter={action(e => links.length && (LinkDocPreview.LinkInfo = { addDocTab: this.props.View.props.addDocTab, linkSrc: this.props.View.props.Document, linkDoc: links[0], Location: [e.clientX, e.clientY + 20] - })} > + }))} > {links.length ? links.length : <FontAwesomeIcon className="documentdecorations-icon" icon="link" size="sm" />} </div> {DocumentLinksButton.StartLink && DocumentLinksButton.StartLink !== this.props.View ? <div className={"documentLinksButton-endLink"} onPointerDown={this.completeLink} /> : (null)} |