forcegraph: improve dragging of nodes
This commit is contained in:
parent
a774b91bc1
commit
68de68fd25
@ -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
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user