summaryrefslogtreecommitdiffstats
path: root/ecomp-portal-FE/client/bower_components/angular-gestures/README.md
diff options
context:
space:
mode:
authortalasila <talasila@research.att.com>2017-02-07 15:03:57 -0500
committertalasila <talasila@research.att.com>2017-02-07 15:05:15 -0500
commit4ad39a5c96dd99acf819ce189b13fec946d7506b (patch)
treea1449286441947cc3d07a45227fa0d6f978e1a7d /ecomp-portal-FE/client/bower_components/angular-gestures/README.md
parent5500448cbd1f374d0ac743ee2fd636fe2d3c0027 (diff)
Initial OpenECOMP Portal commit
Change-Id: I804b80e0830c092e307da1599bd9fbb5c3e2da77 Signed-off-by: talasila <talasila@research.att.com>
Diffstat (limited to 'ecomp-portal-FE/client/bower_components/angular-gestures/README.md')
-rw-r--r--ecomp-portal-FE/client/bower_components/angular-gestures/README.md82
1 files changed, 82 insertions, 0 deletions
diff --git a/ecomp-portal-FE/client/bower_components/angular-gestures/README.md b/ecomp-portal-FE/client/bower_components/angular-gestures/README.md
new file mode 100644
index 00000000..89e74389
--- /dev/null
+++ b/ecomp-portal-FE/client/bower_components/angular-gestures/README.md
@@ -0,0 +1,82 @@
+# 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 containers the same way you use `ng-click`: e.g. `hm-tap`
+```HTML
+<button hm-tap="add_something()">Tap me</button>
+```
+* 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}"`
+
+### Event data
+
+Pass the `$event` object in the usual way e.g. `hm-drag="myDrag($event)"` then access its internals like so:
+```JS
+$scope.myDrag = function(event) {
+ console.log(event.gesture);
+}
+```
+Refer to the [Hammer.js docs](https://github.com/EightMedia/hammer.js/wiki/Getting-Started) for more details on the properties of `event`.
+
+## 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',
+* hmTransformend : 'transformend'
+
+
+All [Hammerjs events](https://github.com/EightMedia/hammer.js/wiki/Getting-Started) are supported. The corresponding Angularjs attribute has `hm-` prepended to the name. So for example, the 'doubletap' event becomes `hm-double-tap` etc.
+
+*Attention* : *end and *start events are NOT CamelCased because of issues caused by $animate interference.
+
+## Default options
+To set recognizer default options you can use `hammerDefaultOptsProvider`. Access it like in the demo:
+
+```
+angular.module('angularGesturesDemoApp', ['angular-gestures', 'ngRoute'])
+ .config(function ($routeProvider, hammerDefaultOptsProvider) {
+ $routeProvider
+ .when('/', {
+ templateUrl: 'views/main.html',
+ controller: 'MainCtrl'
+ })
+ .otherwise({
+ redirectTo: '/'
+ });
+ hammerDefaultOptsProvider.set({
+ recognizers: [[Hammer.Tap, {time: 250}]]
+ });
+ });
+```
+
+## Bower
+If you want to use angular-momentum-scroll with bower, add the following dependency to your component.json
+
+`"angular-gestures": "latest"`