forcegraph: improve dragging of nodes

This commit is contained in:
Nils Schneider 2015-07-08 18:03:19 +02:00
parent a774b91bc1
commit 68de68fd25

View file

@ -60,6 +60,9 @@ define(["d3"], function (d3) {
d3.event.sourceEvent.stopPropagation()
d3.event.sourceEvent.preventDefault()
draggedNode.fixed |= 2
draggedNode.px = draggedNode.x
draggedNode.py = draggedNode.y
}
function dragmove() {
@ -76,7 +79,7 @@ define(["d3"], function (d3) {
if (draggedNode) {
d3.event.sourceEvent.stopPropagation()
d3.event.sourceEvent.preventDefault()
draggedNode.fixed &= 1
draggedNode.fixed &= ~2
draggedNode = undefined
}
}