diff options
| author | Alon Levy <alon@pobox.com> | 2015-03-31 18:48:35 +0300 |
|---|---|---|
| committer | Alon Levy <alon@pobox.com> | 2015-04-02 00:33:37 +0300 |
| commit | b151af9366c260b4ed0676998ef98c4f206f4f56 (patch) | |
| tree | b921fea3c2606362face257ab93e763ffb9ce49e /src/client/view | |
| parent | fe2e19857439c9b55afe48065538829f25cf38fb (diff) | |
client/view/graph_view: small bug fix plus indentation
Diffstat (limited to 'src/client/view')
| -rw-r--r-- | src/client/view/graph_view.js | 17 |
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) { |
