update flags for existing nodes

This commit is contained in:
Nils Schneider 2012-09-12 20:39:52 +02:00
parent 018b6d162b
commit c7479774df

View file

@ -508,14 +508,16 @@ function update() {
.call(node_drag) .call(node_drag)
nodeEnter.append("ellipse") 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") node.selectAll("ellipse")
.attr("rx", function(d) { .attr("rx", function(d) {