diff options
| author | Alon Levy <alon@pobox.com> | 2014-12-03 19:13:14 +0200 |
|---|---|---|
| committer | Alon Levy <alon@pobox.com> | 2014-12-04 00:04:48 +0200 |
| commit | 73007f53f46718ec6ee2c31504ae439afd046b7d (patch) | |
| tree | e78d6e5013793a116323024282eb1cb931c5b468 | |
| parent | 7dc78649f57f9cd7db25abf35fece19680a80a84 (diff) | |
rz_core: use selection.update (more to come)
| -rw-r--r-- | src/rz_core.js | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/rz_core.js b/src/rz_core.js index eaa26f63..47aa4295 100644 --- a/src/rz_core.js +++ b/src/rz_core.js @@ -225,8 +225,7 @@ function update_view__graph(no_relayout) { view.edge_info.hide(); }); view.edge_info.show(d); - selection.clear(); - selection.connectedComponent([src, dst]); + selection.update([src, dst]); src.state = 'chosen'; dst.state = 'chosen'; update_view__graph(true); @@ -346,11 +345,9 @@ function update_view__graph(no_relayout) { return; } d3.event.stopPropagation(); - if(d.state!=="temp") { - selection.clear(); - showInfo(d, i); - } else { - selection.clear(); + selection.update([d]); + if(d.state !== "temp") { + showNodeInfo(d, i); } update_view__graph(true); }); |
