aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/linking/LinkMenuGroup.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2020-09-11 18:07:08 -0400
committerbobzel <zzzman@gmail.com>2020-09-11 18:07:08 -0400
commit1aacedfa3f558e243f2bca92c62fc0d0cfdce58a (patch)
treeaafcbac134fdaccd8b26908d0fb40c12052eeff2 /src/client/views/linking/LinkMenuGroup.tsx
parent1b8eb5a59edfcef36e8f6450aca82de46d2044eb (diff)
parente3c8534e129a3ce70a2673c92cadccec26f6cdc7 (diff)
Merge branch 'master' into bug_fixes
Diffstat (limited to 'src/client/views/linking/LinkMenuGroup.tsx')
-rw-r--r--src/client/views/linking/LinkMenuGroup.tsx8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/client/views/linking/LinkMenuGroup.tsx b/src/client/views/linking/LinkMenuGroup.tsx
index 8e09052a3..29e1d921c 100644
--- a/src/client/views/linking/LinkMenuGroup.tsx
+++ b/src/client/views/linking/LinkMenuGroup.tsx
@@ -48,7 +48,7 @@ export class LinkMenuGroup extends React.Component<LinkMenuGroupProps> {
document.removeEventListener("pointermove", this.onLinkButtonMoved);
document.removeEventListener("pointerup", this.onLinkButtonUp);
- const targets = this.props.group.map(l => LinkManager.Instance.getOppositeAnchor(l, this.props.sourceDoc)).filter(d => d) as Doc[];
+ const targets = this.props.group.map(l => LinkManager.getOppositeAnchor(l, this.props.sourceDoc)).filter(d => d) as Doc[];
StartLinkTargetsDrag(this._drag.current, this.props.docView, e.x, e.y, this.props.sourceDoc, targets);
}
e.stopPropagation();
@@ -68,10 +68,10 @@ export class LinkMenuGroup extends React.Component<LinkMenuGroupProps> {
render() {
const set = new Set<Doc>(this.props.group);
const groupItems = Array.from(set.keys()).map(linkDoc => {
- const destination = LinkManager.Instance.getOppositeAnchor(linkDoc, this.props.sourceDoc) ||
- LinkManager.Instance.getOppositeAnchor(linkDoc, Cast(linkDoc.anchor2, Doc, null).annotationOn === this.props.sourceDoc ? Cast(linkDoc.anchor2, Doc, null) : Cast(linkDoc.anchor1, Doc, null));
+ const destination = LinkManager.getOppositeAnchor(linkDoc, this.props.sourceDoc) ||
+ LinkManager.getOppositeAnchor(linkDoc, Cast(linkDoc.anchor2, Doc, null).annotationOn === this.props.sourceDoc ? Cast(linkDoc.anchor2, Doc, null) : Cast(linkDoc.anchor1, Doc, null));
if (destination && this.props.sourceDoc) {
- return <LinkMenuItem key={destination[Id] + this.props.sourceDoc[Id]}
+ return <LinkMenuItem key={linkDoc[Id]}
groupType={this.props.groupType}
addDocTab={this.props.addDocTab}
docView={this.props.docView}