From c7479774df6ecd79160a95e781b5c8337d43620a Mon Sep 17 00:00:00 2001 From: Nils Schneider Date: Wed, 12 Sep 2012 20:39:52 +0200 Subject: [PATCH] update flags for existing nodes --- html/force.js | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/html/force.js b/html/force.js index a2dc43b..ff3862a 100644 --- a/html/force.js +++ b/html/force.js @@ -508,14 +508,16 @@ function update() { .call(node_drag) nodeEnter.append("ellipse") - .attr("class", function(d) { - var s = [] - for (var key in d.flags) - if (d.flags.hasOwnProperty(key) && d.flags[key]) - s.push(key) - return s.join(" ") - }) + node.selectAll("ellipse") + .attr("class", function(d) { + var s = [] + for (var key in d.flags) + if (d.flags.hasOwnProperty(key) && d.flags[key]) + s.push(key) + + return s.join(" ") + }) node.selectAll("ellipse") .attr("rx", function(d) {