hammerjs/hammer.js — pull request #668 by bumbu (2014-09-15 23:42:38+00:00)
Title: Add support for multitouch over separate child elements. Fixes #600

_This fix requires hammerjs/simulator#2_

The fix is based on recalculating targetTouches based on available touches. Only touches that correspond to observable element or to its child elements are marked as targetTouches.

It may be not the best place to check for touches (or naming of targetTouches should be changed) but because library heavily relies on targetTouches it was the easiest place to make the change.

Tests pass in Chrome 37, Firefox 32, Safari 7 (OS X).
Live testing works in Safari (iOS 7).

Added 3 tests that cover following use-cases:
* Pinching and rotating
* Both touches are over child elements
* One touch is over observed element and one touch is over child element

Fixed an older test by adding a target attribute to each touch.