diff options
| author | Alon Levy <alon@pobox.com> | 2015-07-30 12:29:11 +0300 |
|---|---|---|
| committer | Alon Levy <alon@pobox.com> | 2015-07-30 18:05:06 +0300 |
| commit | b3b6f63c180e815cd827fef49123ad7f54b57b98 (patch) | |
| tree | d660e52505331cc4bb530f69bf9643313fca057c /src/client | |
| parent | 37493ae16e0c1477f0991e5a04988a7204db6a2a (diff) | |
client/view/graph_view: no relayout on clone position load if all nodes loaded
Diffstat (limited to 'src/client')
| -rw-r--r-- | src/client/view/graph_view.js | 5 |
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); |
