diff options
| author | Alon Levy <alon@pobox.com> | 2015-03-15 22:34:47 +0200 |
|---|---|---|
| committer | Alon Levy <alon@pobox.com> | 2015-03-15 22:40:15 +0200 |
| commit | 73b40eebd8c6194b2669eab69341721262f97012 (patch) | |
| tree | 8fc2ae22be865803f19b6e7410a4178ed0771188 /src/client/view | |
| parent | edeaf3bc8751cefe2fdd949f444e1ca3e650ecd0 (diff) | |
client/graph_view: extract force__load_graph
Diffstat (limited to 'src/client/view')
| -rw-r--r-- | src/client/view/graph_view.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/client/view/graph_view.js b/src/client/view/graph_view.js index 392faf1e..f5766b67 100644 --- a/src/client/view/graph_view.js +++ b/src/client/view/graph_view.js @@ -550,8 +550,7 @@ function GraphView(spec) { if (force_enabled) { if (!temporary) { - force.nodes(graph.nodes().filter(node__is_shown)) - .links(graph.links().filter(link__is_shown)); + force__load_graph(); } if (relayout) { @@ -566,6 +565,11 @@ function GraphView(spec) { } } + function force__load_graph() { + force.nodes(graph.nodes().filter(node__is_shown)) + .links(graph.links().filter(link__is_shown)); + } + function segment_in_segment(inner_low, inner_high, outer_low, outer_high) { return (inner_low >= outer_low && inner_low < outer_high && |
