From 73b40eebd8c6194b2669eab69341721262f97012 Mon Sep 17 00:00:00 2001 From: Alon Levy Date: Sun, 15 Mar 2015 22:34:47 +0200 Subject: client/graph_view: extract force__load_graph --- src/client/view/graph_view.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/client') 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 && -- cgit v1.3.1