diff options
| author | Alon Levy <alon@pobox.com> | 2015-02-27 08:13:38 +0200 |
|---|---|---|
| committer | Alon Levy <alon@pobox.com> | 2015-02-27 08:14:11 +0200 |
| commit | 2bc33ca6a4303fe7febbc48a5aab7228a380516b (patch) | |
| tree | c3d9f8d54eb345c34c118ae8b683778a6e5e2885 /src/client/rz_core.js | |
| parent | 0a179c6b01c8be2677e89d159ce25dc742836555 (diff) | |
client: graph_view: handle zoom correctly for bubble effect
Diffstat (limited to 'src/client/rz_core.js')
| -rw-r--r-- | src/client/rz_core.js | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/client/rz_core.js b/src/client/rz_core.js index bc2b6eb0..00cfe535 100644 --- a/src/client/rz_core.js +++ b/src/client/rz_core.js @@ -24,9 +24,15 @@ var zoomBus = new Bacon.Bus(); var zoom_property = zoomBus.toProperty(zoomProgress); var svgInput; +function updateZoomProgress(val) +{ + zoomProgress = val; + zoomBus.push(val); +} + function svg_click_handler(e) { if (zoomProgress) { - zoomProgress = false; + updateZoomProgress(false); return; } if (e.originalEvent.target.nodeName != 'svg') { @@ -48,9 +54,9 @@ edit_graph = new model_graph.Graph({temporary: true, base: main_graph}); var initDrawingArea = function () { function zoom() { - zoomProgress = true; zoom_g.attr("transform", "translate(" + d3.event.translate + ")scale(" + d3.event.scale + ")"); d3.event.sourceEvent.stopPropagation(); + updateZoomProgress(true); } // TODO: we are listening both on graph.diffBus and selection.selectionChangedBus, |
