summaryrefslogtreecommitdiff
path: root/src
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:05:07 +0300
commit0243bb87155f7312c63957eccb226a87c1044c4a (patch)
tree72b608b7ef4ce5f8b848017771b851d9346cd174 /src
parent04aadca7d11089cdd483d04f508db035a752be77 (diff)
client: reduce force initial alpha - less jittering, but less likely to reach minimum
Diffstat (limited to 'src')
-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;
}