在缩放行为上手动设置比例后,如何触发缩放事件?
var zoom = d3.behavior.zoom()
.scaleExtent([0.5, 4])
.on('zoom', onzoom);
// later on
zoom.scale(2);
https://github.com/mbostock/d3/wiki/Zoom-Behavior#wiki-scale
在缩放行为上手动设置比例后,如何触发缩放事件?
var zoom = d3.behavior.zoom()
.scaleExtent([0.5, 4])
.on('zoom', onzoom);
// later on
zoom.scale(2);
https://github.com/mbostock/d3/wiki/Zoom-Behavior#wiki-scale