How to temporarily disable the zooming in d3.js
I am searching for a possibility to temporarily disable the zooming functionality provided by the d3 library. I tried to save the cave the current scale/translation values when the zooming is deactivated and set the zoom/translate-values when the zooming is active again. Unfortunately this will not work. Here is a code example I created : var savedTranslation = null; var savedScale = null; var body = d3.select("body"); var svg = body.append("svg"); var svgContainer = svg.append("svg:g"); var circle = svgContainer.append("svg:circle") .attr('cx', 100) .attr('cy', 100) .attr('r',30) .attr('fill'