Skip to content

Commit 7679690

Browse files
donnycrashperrygovier
authored andcommitted
feat(gestures): add dragstart and dragend gestures
1 parent 43f03ee commit 7679690

File tree

1 file changed

+30
-1
lines changed

1 file changed

+30
-1
lines changed

Diff for: js/angular/directive/gesture.js

+30-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
var GESTURE_DIRECTIVES = 'onHold onTap onDoubleTap onTouch onRelease onDrag onDragUp onDragRight onDragDown onDragLeft onSwipe onSwipeUp onSwipeRight onSwipeDown onSwipeLeft'.split(' ');
1+
var GESTURE_DIRECTIVES = 'onHold onTap onDoubleTap onTouch onRelease onDragStart onDrag onDragEnd onDragUp onDragRight onDragDown onDragLeft onSwipe onSwipeUp onSwipeRight onSwipeDown onSwipeLeft'.split(' ');
22

33
GESTURE_DIRECTIVES.forEach(function(name) {
44
IonicModule.directive(name, gestureDirective(name));
@@ -86,6 +86,21 @@ GESTURE_DIRECTIVES.forEach(function(name) {
8686
* ```
8787
*/
8888

89+
/**
90+
* @ngdoc directive
91+
* @name onDragStart
92+
* @module ionic
93+
* @restrict A
94+
*
95+
* @description
96+
* Called when a drag gesture has started.
97+
*
98+
* @usage
99+
* ```html
100+
* <button on-drag-start="onDragStart()" class="button">Test</button>
101+
* ```
102+
*/
103+
89104

90105
/**
91106
* @ngdoc directive
@@ -104,6 +119,20 @@ GESTURE_DIRECTIVES.forEach(function(name) {
104119
* ```
105120
*/
106121

122+
/**
123+
* @ngdoc directive
124+
* @name onDragEnd
125+
* @module ionic
126+
* @restrict A
127+
*
128+
* @description
129+
* Called when a drag gesture has ended.
130+
*
131+
* @usage
132+
* ```html
133+
* <button on-drag-end="onDragEnd()" class="button">Test</button>
134+
* ```
135+
*/
107136

108137
/**
109138
* @ngdoc directive

0 commit comments

Comments
 (0)