do not mark all nodes on empty string

alfred-data
Nils Schneider 2012-06-04 18:27:57 +02:00
parent b79c338d2c
commit 1a5f5f745b
1 changed files with 3 additions and 0 deletions

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);