summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Levy <alon@pobox.com>2015-07-30 18:04:00 +0300
committerAlon Levy <alon@pobox.com>2015-07-30 18:04:00 +0300
commit9daec7c753f122225243767406700a47c7ef98d9 (patch)
tree72b608b7ef4ce5f8b848017771b851d9346cd174
parented3d0f6239fc755edd006a1460182c5f0f692a0e (diff)
client: reduce force initial alpha - less jittering, but less likely to reach minimum
-rw-r--r--src/client/view/graph_view.js7
1 files 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;
}