summaryrefslogtreecommitdiff
path: root/src/client
diff options
context:
space:
mode:
authorAlon Levy <alon@pobox.com>2015-03-23 13:28:09 +0200
committerAlon Levy <alon@pobox.com>2015-03-23 13:28:09 +0200
commit7a6703319e952c56fec630ef80857840c93d700d (patch)
tree80e01bd8b9e924a870cb6e59c94ae7ff2a3a742c /src/client
parentbff9b45ebd8ae2fcb43077dd52bbd54337e5b358 (diff)
client: dragging a node fixes it's position; unfixing needs to be thought out
Diffstat (limited to 'src/client')
-rw-r--r--src/client/view/graph_view.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/client/view/graph_view.js b/src/client/view/graph_view.js
index 9a0b78d1..82e25ff7 100644
--- a/src/client/view/graph_view.js
+++ b/src/client/view/graph_view.js
@@ -247,6 +247,9 @@ function GraphView(spec) {
d3.select(this).classed("fixed", true); // TODO: this is broken since we override all the classes. Need to switch to class addition/removal (i.e. use classed for everything) or set class in one location (so here just set a value on the node, not the element)
if (d.dragstart.clientX - d3.event.sourceEvent.clientX != 0 ||
d.dragstart.clientY - d3.event.sourceEvent.clientY != 0) {
+ d.fixed = true;
+ d.px = d.x;
+ d.py = d.y;
tick();
if (force_enabled) {
force.resume();