do not mark all nodes on empty string

This commit is contained in:
Nils Schneider 2012-06-04 18:27:57 +02:00
parent b79c338d2c
commit 1a5f5f745b

View file

@ -45,6 +45,9 @@ cp.append("input")
function show_node(mac) { function show_node(mac) {
d3.selectAll("#chart .node").classed("marked", false); d3.selectAll("#chart .node").classed("marked", false);
if (mac.length == 0)
return;
d3.selectAll("#chart .node").each( function(d) { d3.selectAll("#chart .node").each( function(d) {
if (d.id == mac) if (d.id == mac)
d3.select(this).classed("marked", true); d3.select(this).classed("marked", true);