From b3b6f63c180e815cd827fef49123ad7f54b57b98 Mon Sep 17 00:00:00 2001 From: Alon Levy Date: Thu, 30 Jul 2015 12:29:11 +0300 Subject: client/view/graph_view: no relayout on clone position load if all nodes loaded --- src/client/view/graph_view.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/client') diff --git a/src/client/view/graph_view.js b/src/client/view/graph_view.js index 94bb13ff..0f7c1eaf 100644 --- a/src/client/view/graph_view.js +++ b/src/client/view/graph_view.js @@ -221,7 +221,10 @@ function GraphView(spec) { if (have_position > 0) { console.log('loading layout last position from database for layout ' + layout.name); layout__load_graph(); - relayout = false; + if (have_position === graph.nodes().length) { + console.log('no relayout because diff contains all graph nodes'); + relayout = false; + } } } update_view(relayout); -- cgit v1.3.1