|
@ -282,8 +282,6 @@ class InteractionHandler { |
|
|
this.drag.translation = util.extend({},this.body.view.translation); // copy the object
|
|
|
this.drag.translation = util.extend({},this.body.view.translation); // copy the object
|
|
|
this.drag.nodeId = undefined; |
|
|
this.drag.nodeId = undefined; |
|
|
|
|
|
|
|
|
this.selectionHandler._generateClickEvent('dragStart', event, this.drag.pointer); |
|
|
|
|
|
|
|
|
|
|
|
if (node !== undefined && this.options.dragNodes === true) { |
|
|
if (node !== undefined && this.options.dragNodes === true) { |
|
|
this.drag.nodeId = node.id; |
|
|
this.drag.nodeId = node.id; |
|
|
// select the clicked node if not yet selected
|
|
|
// select the clicked node if not yet selected
|
|
@ -292,6 +290,9 @@ class InteractionHandler { |
|
|
this.selectionHandler.selectObject(node); |
|
|
this.selectionHandler.selectObject(node); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// after select to contain the node
|
|
|
|
|
|
this.selectionHandler._generateClickEvent('dragStart', event, this.drag.pointer); |
|
|
|
|
|
|
|
|
let selection = this.selectionHandler.selectionObj.nodes; |
|
|
let selection = this.selectionHandler.selectionObj.nodes; |
|
|
// create an array with the selected nodes and their original location and status
|
|
|
// create an array with the selected nodes and their original location and status
|
|
|
for (let nodeId in selection) { |
|
|
for (let nodeId in selection) { |
|
@ -315,6 +316,10 @@ class InteractionHandler { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
else { |
|
|
|
|
|
// fallback if no node is selected and thus the view is dragged.
|
|
|
|
|
|
this.selectionHandler._generateClickEvent('dragStart', event, this.drag.pointer); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|