diff options
author | bob <bcz@cs.brown.edu> | 2019-10-17 16:02:37 -0400 |
---|---|---|
committer | bob <bcz@cs.brown.edu> | 2019-10-17 16:02:37 -0400 |
commit | dcdefb2a5a80d3c4d5451d6c7fc7213565d5ea5f (patch) | |
tree | dc0d50ed9d9f5d3b5e34e12c3782dcf779d105d6 /src/client/util/DragManager.ts | |
parent | 17042f9598e20615668830a7c139a8a31dc6c109 (diff) |
initial working version of draggable link anchors.
Diffstat (limited to 'src/client/util/DragManager.ts')
-rw-r--r-- | src/client/util/DragManager.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client/util/DragManager.ts b/src/client/util/DragManager.ts index 06dab024e..576b16bc8 100644 --- a/src/client/util/DragManager.ts +++ b/src/client/util/DragManager.ts @@ -87,12 +87,12 @@ export async function DragLinkAsDocument(dragEle: HTMLElement, x: number, y: num } } -export async function DragLinksAsDocuments(dragEle: HTMLElement, x: number, y: number, sourceDoc: Doc) { +export async function DragLinksAsDocuments(dragEle: HTMLElement, x: number, y: number, sourceDoc: Doc, singleLink?: Doc) { let srcTarg = sourceDoc.proto; let draggedDocs: Doc[] = []; if (srcTarg) { - let linkDocs = LinkManager.Instance.getAllRelatedLinks(srcTarg); + let linkDocs = singleLink ? [singleLink] : LinkManager.Instance.getAllRelatedLinks(srcTarg); if (linkDocs) { draggedDocs = linkDocs.map(link => { let opp = LinkManager.Instance.getOppositeAnchor(link, sourceDoc); |