summaryrefslogtreecommitdiff
path: root/src/client/view
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/view')
-rw-r--r--src/client/view/graph_view.js17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/client/view/graph_view.js b/src/client/view/graph_view.js
index 12aeba48..b3e1b0a1 100644
--- a/src/client/view/graph_view.js
+++ b/src/client/view/graph_view.js
@@ -1231,8 +1231,8 @@ function GraphView(spec) {
count = nodes.length,
line = Math.floor(Math.sqrt(count)) + 1,
rows = Math.ceil(count / line),
- wspace = layout.wh[0] / (line + 2),
- hspace = layout.wh[1] / (rows + 1);
+ wspace = this.wh[0] / (line + 2),
+ hspace = this.wh[1] / (rows + 1);
for (var i = 0 ; i < nodes.length ; ++i) {
var node = nodes[i];
@@ -1279,12 +1279,13 @@ function GraphView(spec) {
if (layout !== undefined) {
layout.stop();
}
- layout = layout_creator().size([w, h])
- .on("tick", pushRedraw)
- .on("end", record_position_to_local_storage)
- .nodes(graph.nodes())
- .links(graph.links())
- .start();
+ layout = layout_creator()
+ .size([w, h])
+ .on("tick", pushRedraw)
+ .on("end", record_position_to_local_storage)
+ .nodes(graph.nodes())
+ .links(graph.links())
+ .start();
}
if (!temporary) {