From 038e4ed146e5a29933cc8dc34004f0962d1c9987 Mon Sep 17 00:00:00 2001 From: Owen Date: Thu, 7 Aug 2014 15:22:31 +0300 Subject: Issue #26 nodes didn't appear because the type selection index was undefined in the 0 to N_1 loop --- scripts/rhizicore.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'scripts/rhizicore.js') diff --git a/scripts/rhizicore.js b/scripts/rhizicore.js index 481a8ed7..6937201c 100644 --- a/scripts/rhizicore.js +++ b/scripts/rhizicore.js @@ -347,13 +347,15 @@ function myGraph(el) { } function dragged(d) { + + d3.select(this).classed("fixed", true); d3.select(this).attr("cx", d.x = d3.event.x).attr("cy", d.y = d3.event.y); } function dragended(d) { d3.select(this).classed("dragging", false); d3.select(this).classed("fixed", true); - d3.select(this).attr("dx", d3.event.x).attr("dy", d3.event.y); + //d3.select(this).attr("cx", d.x = d3.event.x).attr("cy", d.y = d3.event.y); } var force = d3.layout.force() -- cgit v1.3.1