mbostock/d3 — pull request #616 by marcneuwirth (2012-04-16 20:22:05+00:00)
Title: Allow users to specify event handlers they do not want attached to Zoom event

This allows users to easily disable the event handlers that they don't want, or separate the handling of zoom events into different functions like:

var zoomTranslate = d3.behavior.zoom({
dblclick: false,
wheel: false
})
.translate(projection.origin())
.on("zoom", translate);

var zoomScale = d3.behavior.zoom({
click: false,
dblclick: false,
touch: false
})
.scale(projection.scale())
.scaleExtent([100, 800])
.on("zoom", scale);

var svg = d3.select("body").append("svg")
.attr("width", width)
.attr("height", height)
.call(zoomTranslate)
.call(zoomScale)

This is very useful if you only want the scroll wheel to scale and not translate as well.