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