diff options
Diffstat (limited to 'src/client/view')
| -rw-r--r-- | src/client/view/graph_view.js | 13 | ||||
| -rw-r--r-- | src/client/view/selection.js | 2 |
2 files changed, 8 insertions, 7 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); diff --git a/src/client/view/selection.js b/src/client/view/selection.js index a45f4b2b..2f2c20fb 100644 --- a/src/client/view/selection.js +++ b/src/client/view/selection.js @@ -59,7 +59,7 @@ function updateSelectedNodesBus(new_selected_nodes) } function byVisitors(node_selector, link_selector) { - var new_selected_nodes = get_rz_core().main_graph.findByVisitors(node_selector, link_selector); + var new_selected_nodes = get_rz_core().main_graph.find__by_visitors(node_selector, link_selector); clear(); connectedComponent(new_selected_nodes); |
