Skip to content

Instantly share code, notes, and snippets.

@fi-tomek-augustyn
Last active December 12, 2015 03:19
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fi-tomek-augustyn/4706145 to your computer and use it in GitHub Desktop.
Save fi-tomek-augustyn/4706145 to your computer and use it in GitHub Desktop.
Gesture detection: Identifying global events
// Add event listeners
surface.addEventListener('MSPointerDown', function(event) {
// Add pointer to track
msGesture.addPointer(event.pointerId);
});
// Reset when gesture starts
surface.addEventListener('MSGestureStart', resetGesture);
// Try to detect when gesture changes
surface.addEventListener('MSGestureChange', detectGesture);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment