diff options
| author | yipstanley <stanley_yip@brown.edu> | 2019-02-26 16:33:53 -0500 |
|---|---|---|
| committer | yipstanley <stanley_yip@brown.edu> | 2019-02-26 16:33:53 -0500 |
| commit | 59cc888c8bf0559c50e12fd2774ea5ac4ebb3059 (patch) | |
| tree | 01c88fb348d4431c017d9546f0840f37235dd1ba /src/client/views/nodes/DocumentView.tsx | |
| parent | 8d2dc530854517830dc55d7f7a0f02828bd7f8f6 (diff) | |
basic implementation of prototype/delegate stuff
Diffstat (limited to 'src/client/views/nodes/DocumentView.tsx')
| -rw-r--r-- | src/client/views/nodes/DocumentView.tsx | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/client/views/nodes/DocumentView.tsx b/src/client/views/nodes/DocumentView.tsx index ad1328e5d..bc8bbfef1 100644 --- a/src/client/views/nodes/DocumentView.tsx +++ b/src/client/views/nodes/DocumentView.tsx @@ -96,9 +96,12 @@ export class DocumentView extends React.Component<DocumentViewProps> { this._downX = e.clientX; this._downY = e.clientY; if (e.shiftKey && e.buttons === 1) { + console.log("Hello") + let document = e.ctrlKey ? this.props.Document.CreateAlias() : this.props.Document CollectionDockingView.Instance.StartOtherDrag(this._mainCont.current!, this.props.Document); e.stopPropagation(); - } else { + } + else { this._contextMenuCanOpen = true; if (this.active && !e.isDefaultPrevented()) { e.stopPropagation(); @@ -127,11 +130,12 @@ export class DocumentView extends React.Component<DocumentViewProps> { dragData["document"] = this; dragData["xOffset"] = e.x - left; dragData["yOffset"] = e.y - top; + dragData["alias"] = e.shiftKey DragManager.StartDrag(this._mainCont.current, dragData, { handlers: { dragComplete: action((e: DragManager.DragCompleteEvent) => { }), }, - hideSource: true + hideSource: !e.shiftKey }) } } |
