Skip to content

Latest commit

 

History

History
37 lines (33 loc) · 1.19 KB

README.md

File metadata and controls

37 lines (33 loc) · 1.19 KB

angular-gestures

AngularJS directive that adds support for multi touch gestures to your app. Based on hammer.js.

Usage

  • Include gestures.js or gestures.min.js into your page
  • Declare 'angular-gestures' as a dependency for your angular app: angular.module('myApp', ['angular-gestures']);
  • Use attributes on you containers in the same way you use ng-click e.g. hm-tap="add_something()"
  • You can use angular interpolations like this : hm-swipe="remove_something({{ id }})"
  • You can also use Hammer.js options by e.g. hm-tap-opts="{hold: false}"

Supported events

  • hmDoubleTap : 'doubletap',
  • hmDragStart : 'dragstart',
  • hmDrag : 'drag',
  • hmDragUp : 'dragup',
  • hmDragDown : 'dragdown',
  • hmDragLeft : 'dragleft',
  • hmDragRight : 'dragright',
  • hmDragEnd : 'dragend',
  • hmHold : 'hold',
  • hmPinch : 'pinch',
  • hmPinchIn : 'pinchin',
  • hmPinchOut : 'pinchout',
  • hmRelease : 'release',
  • hmRotate : 'rotate',
  • hmSwipe : 'swipe',
  • hmSwipeUp : 'swipeup',
  • hmSwipeDown : 'swipedown',
  • hmSwipeLeft : 'swipeleft',
  • hmSwipeRight : 'swiperight',
  • hmTap : 'tap',
  • hmTouch : 'touch',
  • hmTransformStart : 'transformstart',
  • hmTransform : 'transform',
  • hmTransforEnd : 'transformend'