我激活和停用缩放行为,如http://bl.ocks.org/benzguo/4370043所示:
var zoom = d3.behavior.zoom().on("zoom", rescale)
// after adding the handler, the mouse wheel will still scroll the page
// activate
svg_g_element.call(zoom)
// now, the mouse wheel zoom
// desactivate
svg_g_element.call(d3.behavior.zoom().on("zoom")
// now, the mouse wheel will neither zoom nor scroll while over the svg_g_element
如何建立默认的鼠标滚轮行为来滚动页面?或者示例中显示的方式不是停用缩放行为的最佳方式?