I recently migrated to D3 v4.10.2. I am calling the zoom behavior as instructed in the documentation, however the callback is not executed when zooming with the mouse-wheel or touch-screen. I am using the latest version of chrome:
var some_svg = d3.select('body').select("#some-svg");
var some_svg_rect = some_svg.append("g").append("rect")
.attr("fill","none")
.attr("width",900)
.attr("height",400);
some_svg_rect.call(d3.zoom()
.on("zoom", function () {/*this code fails to execute*/}));
Thanks the zooming is working after setting "pointer-events" to "all" however the drag behavior only works on drag "start" is something missing there?:
some_svg_rect.call(d3.drag()
.on("start", function () {/*this code works*/})
.on("drag", function () {/*this code fails toexecute*/})
.on("end", function () {/*this code fails to execute*/}));