Closed mbostock closed 4 years ago
For example, in Zoomable Map Tiles, it would be great if double-clicking zoomed to the nearest power of two. But doing this requires overriding the dblclick.zoom listener to replace the default behavior, and it’s difficult to implement the desired behavior on top of zoom.scaleTo because that only zooms around the viewport’s centroid rather than the mouse location.
Currently these functions all use the viewport centroid as the reference point, but it would be nice to be able to specify the point explicitly.