diff options
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, |
