Skip to content

Commit

Permalink
feat(gestures): add dragstart and dragend gestures
Browse files Browse the repository at this point in the history
  • Loading branch information
donnycrash authored and perrygovier committed May 12, 2015
1 parent 43f03ee commit 7679690
Showing 1 changed file with 30 additions and 1 deletion.
31 changes: 30 additions & 1 deletion js/angular/directive/gesture.js
@@ -1,4 +1,4 @@
var GESTURE_DIRECTIVES = 'onHold onTap onDoubleTap onTouch onRelease onDrag onDragUp onDragRight onDragDown onDragLeft onSwipe onSwipeUp onSwipeRight onSwipeDown onSwipeLeft'.split(' ');
var GESTURE_DIRECTIVES = 'onHold onTap onDoubleTap onTouch onRelease onDragStart onDrag onDragEnd onDragUp onDragRight onDragDown onDragLeft onSwipe onSwipeUp onSwipeRight onSwipeDown onSwipeLeft'.split(' ');

GESTURE_DIRECTIVES.forEach(function(name) {
IonicModule.directive(name, gestureDirective(name));
Expand Down Expand Up @@ -86,6 +86,21 @@ GESTURE_DIRECTIVES.forEach(function(name) {
* ```
*/

/**
* @ngdoc directive
* @name onDragStart
* @module ionic
* @restrict A
*
* @description
* Called when a drag gesture has started.
*
* @usage
* ```html
* <button on-drag-start="onDragStart()" class="button">Test</button>
* ```
*/


/**
* @ngdoc directive
Expand All @@ -104,6 +119,20 @@ GESTURE_DIRECTIVES.forEach(function(name) {
* ```
*/

/**
* @ngdoc directive
* @name onDragEnd
* @module ionic
* @restrict A
*
* @description
* Called when a drag gesture has ended.
*
* @usage
* ```html
* <button on-drag-end="onDragEnd()" class="button">Test</button>
* ```
*/

/**
* @ngdoc directive
Expand Down

0 comments on commit 7679690

Please sign in to comment.