aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/DocumentView.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/views/nodes/DocumentView.tsx')
-rw-r--r--src/client/views/nodes/DocumentView.tsx8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/client/views/nodes/DocumentView.tsx b/src/client/views/nodes/DocumentView.tsx
index 41e93df35..e109f2a38 100644
--- a/src/client/views/nodes/DocumentView.tsx
+++ b/src/client/views/nodes/DocumentView.tsx
@@ -22,6 +22,7 @@ import { WebBox } from "../nodes/WebBox";
import { PDFBox } from "../nodes/PDFBox";
import "./DocumentView.scss";
import React = require("react");
+import { props } from "bluebird";
const JsxParser = require('react-jsx-parser').default; //TODO Why does this need to be imported like this?
@@ -96,7 +97,8 @@ export class DocumentView extends React.Component<DocumentViewProps> {
this._downX = e.clientX;
this._downY = e.clientY;
if (e.shiftKey && e.buttons === 1) {
- CollectionDockingView.Instance.StartOtherDrag(this.props.Document, e);
+ let document = e.ctrlKey ? this.props.Document.CreateAlias() : this.props.Document
+ CollectionDockingView.Instance.StartOtherDrag(document, e);
e.stopPropagation();
} else {
if (this.active && !e.isDefaultPrevented()) {
@@ -122,13 +124,15 @@ export class DocumentView extends React.Component<DocumentViewProps> {
const [left, top] = this.props.ScreenToLocalTransform().inverse().transformPoint(0, 0);
let dragData: { [id: string]: any } = {};
dragData["documentView"] = this;
+ dragData["document"] = e.ctrlKey ? this.props.Document.CreateAlias() : this.props.Document
dragData["xOffset"] = e.x - left;
dragData["yOffset"] = e.y - top;
+ dragData["alias"] = e.ctrlKey
DragManager.StartDrag(this._mainCont.current, dragData, {
handlers: {
dragComplete: action(() => { }),
},
- hideSource: true
+ hideSource: !e.ctrlKey
})
}
}