From 9daec7c753f122225243767406700a47c7ef98d9 Mon Sep 17 00:00:00 2001 From: Alon Levy Date: Thu, 30 Jul 2015 18:04:00 +0300 Subject: client: reduce force initial alpha - less jittering, but less likely to reach minimum --- src/client/view/graph_view.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/client/view/graph_view.js b/src/client/view/graph_view.js index f1cf1d81..96269689 100644 --- a/src/client/view/graph_view.js +++ b/src/client/view/graph_view.js @@ -795,7 +795,7 @@ function GraphView(spec) { } if (relayout) { - layout__reset(0.1); + layout__reset(0.01); } else { layout.start().alpha(0.0001); tick(); // this will be called before the end event is triggered by layout completing. @@ -1224,7 +1224,7 @@ function GraphView(spec) { } function layout__reset(alpha) { - alpha = alpha || 0.1; + alpha = alpha || 0.01; layout.nodes_links(nodes__visible(), links__visible()) .alpha(alpha) .start(); @@ -1250,7 +1250,8 @@ function GraphView(spec) { .nodes_links(nodes__visible(), links__visible()) .restore() .zen_mode(zen_mode) - .start(); + .start() + .alpha(0.01); gv.layout = layout; } -- cgit v1.3.1