diff options
| author | Alon Levy <alon@pobox.com> | 2015-04-07 19:44:40 +0300 |
|---|---|---|
| committer | Alon Levy <alon@pobox.com> | 2015-04-09 06:38:17 +0300 |
| commit | 85d20659bc170577e6df5d5875755aae516b8cf0 (patch) | |
| tree | 934eb7b271c7c7578a384c3e193b3d147d50cac9 /src/client/view/graph_view.js | |
| parent | 144e0a6047b90343fe0531f588dcab2cb99168e7 (diff) | |
client: graph_view,layouts: use atomic nodes_links
Diffstat (limited to 'src/client/view/graph_view.js')
| -rw-r--r-- | src/client/view/graph_view.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/client/view/graph_view.js b/src/client/view/graph_view.js index 564c3a25..cdf98ba2 100644 --- a/src/client/view/graph_view.js +++ b/src/client/view/graph_view.js @@ -733,9 +733,10 @@ function GraphView(spec) { } function layout__load_graph() { - layout - .nodes(graph.nodes().filter(node__is_shown)) - .links(graph.links().filter(link__is_shown)); + var nodes_subset = graph.nodes().filter(node__is_shown), + links_subset = graph.links().filter(link__is_shown); + + layout.nodes_links(nodes_subset, links_subset); } function segment_in_segment(inner_low, inner_high, outer_low, outer_high) @@ -1231,8 +1232,7 @@ function GraphView(spec) { .size([w, h]) .on("tick", pushRedraw) .on("end", record_position_to_local_storage) - .nodes(graph.nodes()) - .links(graph.links()) + .nodes_links(graph.nodes(), graph.links()) .restore() .start(); } |
