summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/client/view/graph_view.js9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/client/view/graph_view.js b/src/client/view/graph_view.js
index 7cdd0d30..cdfbc063 100644
--- a/src/client/view/graph_view.js
+++ b/src/client/view/graph_view.js
@@ -837,7 +837,7 @@ function GraphView(spec) {
}
if (relayout) {
- layout.alpha(0.1).start();
+ layout__reset(0.1);
} else {
// XXX If we are stopped we need to update the text of the links at least,
// and this is the simplest way
@@ -1306,6 +1306,13 @@ function GraphView(spec) {
});
}
+ function layout__reset(alpha) {
+ alpha = alpha | 0.1;
+ layout.nodes_links(nodes__visible(), links__visible())
+ .alpha(alpha)
+ .start();
+ }
+
function set_layout(new_layout) {
if (layout !== undefined) {
layout.save();