Damn d3.js... Finally it doesn't bug out.

pull/762/head
iglocska 2015-10-19 02:00:39 +02:00
parent 593f166386
commit a59a68366a
1 changed files with 3 additions and 3 deletions

View File

@ -143,6 +143,8 @@ function zoomhandler() {
function update() {
var nodes = root['nodes'], links = root['links'];
// Restart the force layout.
force.nodes(nodes).links(links).start();
@ -150,14 +152,12 @@ function update() {
link = link.data(links);
link.exit().remove();
link.enter().insert("line", ".node").attr("class", "link");
// Update nodes.
node = node.data(nodes, function(d) { return d.id; });
node = node.data(nodes);
node.exit().remove();
var nodeEnter = node.enter().append("g").attr("class", "node").call(drag1);
nodeEnter.append("svg:image")
.attr("class", "circle")
.attr("xlink:href", function(d) {