mbostock/d3 — pull request #1418 by jasondavies (2013-07-23 18:59:46+00:00)
Title: Avoid binding multiple touch listeners for zoom.

For a two-finger pinch, if two touchstart events fire, this results in
two touchmove and touchend listeners. The first will have a single
location in the locations variable, but its touchmove listener will
fire with two touches, causing it to fail due to not finding the
location of the second touch.

If the first listener fires before the second, this exception breaks
touch zooming (as no further listeners will be called), but the order is
undefined so may be browser/device dependent (for reproducing the bug).

Since zooming only ever involves a single gesture at a time, it makes
more sense to only have one listener of each type at a time, unlike
dragging, which involves multiple drag gestures at once.