summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlon Levy <alon@pobox.com>2015-07-30 12:29:11 +0300
committerAlon Levy <alon@pobox.com>2015-07-30 18:05:06 +0300
commitb3b6f63c180e815cd827fef49123ad7f54b57b98 (patch)
treed660e52505331cc4bb530f69bf9643313fca057c /src
parent37493ae16e0c1477f0991e5a04988a7204db6a2a (diff)
client/view/graph_view: no relayout on clone position load if all nodes loaded
Diffstat (limited to 'src')
-rw-r--r--src/client/view/graph_view.js5
1 files changed, 4 insertions, 1 deletions
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);