diff options
author | bob <bcz@cs.brown.edu> | 2020-03-09 13:49:21 -0400 |
---|---|---|
committer | bob <bcz@cs.brown.edu> | 2020-03-09 13:49:21 -0400 |
commit | cabb2cf9065d85112f1bd89e31b41dafdbc4ba54 (patch) | |
tree | 03ba4354fcaa0cdbd12db1e2a06bedb1421a0b7e /src/client/views/linking/LinkMenuItem.tsx | |
parent | d46ff869dcbb3d5cadeeb9ad6251ef5f9a5c3b2d (diff) |
fixed showing links only to doculink boxes. changed field names for links to be more readable.
Diffstat (limited to 'src/client/views/linking/LinkMenuItem.tsx')
-rw-r--r-- | src/client/views/linking/LinkMenuItem.tsx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/client/views/linking/LinkMenuItem.tsx b/src/client/views/linking/LinkMenuItem.tsx index 5fd6e4630..d091e06ef 100644 --- a/src/client/views/linking/LinkMenuItem.tsx +++ b/src/client/views/linking/LinkMenuItem.tsx @@ -12,12 +12,14 @@ import './LinkMenuItem.scss'; import React = require("react"); import { DocumentManager } from '../../util/DocumentManager'; import { setupMoveUpEvents, emptyFunction } from '../../../Utils'; +import { DocumentView } from '../nodes/DocumentView'; library.add(faEye, faEdit, faTimes, faArrowRight, faChevronDown, faChevronUp); interface LinkMenuItemProps { groupType: string; linkDoc: Doc; + docView: DocumentView; sourceDoc: Doc; destinationDoc: Doc; showEditor: (linkDoc: Doc) => void; @@ -81,7 +83,7 @@ export class LinkMenuItem extends React.Component<LinkMenuItemProps> { document.removeEventListener("pointerup", this.onLinkButtonUp); this._eleClone.style.transform = `translate(${e.x}px, ${e.y}px)`; - DragManager.StartLinkTargetsDrag(this._eleClone, e.x, e.y, this.props.sourceDoc, [this.props.linkDoc]); + DragManager.StartLinkTargetsDrag(this._eleClone, this.props.docView, e.x, e.y, this.props.sourceDoc, [this.props.linkDoc]); } e.stopPropagation(); } |