diff options
| author | Alon Levy <alon@pobox.com> | 2015-01-05 13:23:35 +0200 |
|---|---|---|
| committer | Alon Levy <alon@pobox.com> | 2015-01-05 13:24:27 +0200 |
| commit | 92425b0dcd17c7dbca92552d0c03fa8b96b6a13f (patch) | |
| tree | 7eca451cf36f83f9870ca350300e65a22dddb1d0 /src/client/view/graph_view.js | |
| parent | 99b80264f20ce722e958a7ee11b1aea9c06b4da5 (diff) | |
client: renames (find - all are lower case underscore separates) plus clone+input-to-diff to db and back flow working
Diffstat (limited to 'src/client/view/graph_view.js')
| -rw-r--r-- | src/client/view/graph_view.js | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/client/view/graph_view.js b/src/client/view/graph_view.js index 37d8a052..334f4624 100644 --- a/src/client/view/graph_view.js +++ b/src/client/view/graph_view.js @@ -100,7 +100,7 @@ function GraphView(spec) { }) .onValue(function (r) { bubble_radius = r; - update_view(false); + tick(); }); } @@ -503,7 +503,6 @@ function GraphView(spec) { } else { r = 60 + newnodes * 20; a = -Math.PI + Math.PI * 2 * (tempcounter-1) / newnodes + 0.3; - console.log(tempcounter); d.x = cx + r * Math.cos(a); d.y = cy + r * Math.sin(a); } @@ -554,10 +553,12 @@ function GraphView(spec) { var d_val, ghost; - var dx = d.__dst.x - d.__src.x, - dy = d.__dst.y - d.__src.y, - dr = Math.sqrt(dx * dx + dy * dy); - d_val = "M" + d.__src.x + "," + d.__src.y + "L" + d.__dst.x + "," + d.__dst.y; + util.assert(d.__src && d.__dst && d.__src.x && d.__src.y && + d.__dst.x && d.__dst.y, "missing src and dst points"); + + var src = bubble_transform(d.__src), + dst = bubble_transform(d.__dst); + d_val = "M" + src.x + "," + src.y + "L" + dst.x + "," + dst.y; // update ghostlink position ghost = $(this.nextElementSibling); ghost.attr("d", d_val); |
