diff options
author | bob <bcz@cs.brown.edu> | 2019-05-13 16:21:28 -0400 |
---|---|---|
committer | bob <bcz@cs.brown.edu> | 2019-05-13 16:21:28 -0400 |
commit | 3be42131bc08024f06e0daec8d09e45bf3f1ddab (patch) | |
tree | 4ed0606fb7439f1b6c9f70b128f9e89f80ad5f4c /src/client/views/nodes/DocumentView.tsx | |
parent | 48b0f98ea2519d861a0eecee541dc0986a2c2f12 (diff) |
a bunch of fixes to schemas, marquees, and an experimental feature to set a document's data with linking UI
Diffstat (limited to 'src/client/views/nodes/DocumentView.tsx')
-rw-r--r-- | src/client/views/nodes/DocumentView.tsx | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/client/views/nodes/DocumentView.tsx b/src/client/views/nodes/DocumentView.tsx index edc2158f0..b7ad9249a 100644 --- a/src/client/views/nodes/DocumentView.tsx +++ b/src/client/views/nodes/DocumentView.tsx @@ -243,8 +243,17 @@ export class DocumentView extends DocComponent<DocumentViewProps, Document>(Docu const protoDest = destDoc.proto; const protoSrc = sourceDoc.proto; - Doc.MakeLink(protoSrc ? protoSrc : sourceDoc, protoDest ? protoDest : destDoc); - de.data.droppedDocuments.push(destDoc); + if (de.mods == "Control") { + let src = protoSrc ? protoSrc : sourceDoc; + let dst = protoDest ? protoDest : destDoc; + dst.data = src; + dst.nativeWidth = src.nativeWidth; + dst.nativeHeight = src.nativeHeight; + } + else { + Doc.MakeLink(protoSrc ? protoSrc : sourceDoc, protoDest ? protoDest : destDoc); + de.data.droppedDocuments.push(destDoc); + } e.stopPropagation(); } } |