All examples By author By category About

mbostock

Zoom vs. Click

This example demonstrates how to disambiguate a click from a zoom gesture using d3.event.defaultPrevented. Click and drag to pan, mousewheel to zoom, or click the background to briefly highlight it.