diff options
| author | Alon Levy <alon@pobox.com> | 2015-02-05 19:57:34 +0200 |
|---|---|---|
| committer | Alon Levy <alon@pobox.com> | 2015-02-05 19:57:47 +0200 |
| commit | d55107e131e1a8cd318fb2a07443383036bce95f (patch) | |
| tree | da0b5ecb8c4923d8b879b1f86f28b9fcd65dc4f7 /src/client/view | |
| parent | 5c891198fb43f036911ac24a5cd053c00249544d (diff) | |
client: fix fallout from main/edit zoom difference
Diffstat (limited to 'src/client/view')
| -rw-r--r-- | src/client/view/graph_view.js | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/client/view/graph_view.js b/src/client/view/graph_view.js index c4ceefbd..57897819 100644 --- a/src/client/view/graph_view.js +++ b/src/client/view/graph_view.js @@ -67,6 +67,8 @@ function GraphView(spec) { start: 0, }, }, + zoom_obj: spec.zoom_obj, + parent_graph_zoom_obj: spec.parent_graph_zoom_obj, }, temporary = spec.temporary, force_enabled = !spec.temporary, @@ -333,15 +335,15 @@ function GraphView(spec) { var nodeEnter = node.enter() .append("g") - .each(function (d) { - d.zoom_obj = zoom_obj; // FIXME new object NodeView pointing to Node and Zoom - }) .attr('id', function(d){ return d.id; }) // append node id to enable data->visual mapping .attr('visibility', 'hidden') // made visible on first tick .call(drag); node.attr('class', function(d) { return ['node', selection.selected_class__node(d, temporary)].join(' '); + }) + .each(function (d) { + d.zoom_obj = zoom_obj; // FIXME new object NodeView pointing to Node and Zoom }); // reorder nodes so selected are last, and so rendered last, and so on top. // FIXME: with b-ubble removed this is probably broken. actually also before. links are not correctly ordered. @@ -674,7 +676,7 @@ function GraphView(spec) { node.attr("transform", transform); function same_zoom(d) { - if (d.zoom_obj === null) { + if (d.zoom_obj === null || parent_graph_zoom_obj === null) { return [d.bx, d.by]; } else { return apply_node_zoom_obj(d); |
