Add event listeners to G.zoom
https://github.com/mbostock/d3/wiki/Zoom-Behavior#on
Need to support callbacks that'll be executed on zoomstart
and zoomend
.
Example:
G.zoom({
selector: '#to-be-selected',
zoomstart: function() {
return 'Oooh, I can do some preparatory functions before zooming in!'
},
zoomend: function() {
return 'Yay! zoomend event, i.e., zoom complete!!!'
}
})