This interactive page perfectly explains how the different mouse handlers work: http://bl.ocks.org/mbostock/5247027.