Skip to content

Commit f4e9156

Browse files
author
Alfonso Presa
committed
docs(ngTouch): Document event parameter for $swipe handlers
Document that the event handlers provided by $swipe do receive the raw event as their last parameter. Closes angular#11983
1 parent ed27e0e commit f4e9156

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/ngTouch/swipe.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,8 @@ ngTouch.factory('$swipe', [function() {
7474
* `$swipe` will listen for `mouse` and `touch` events.
7575
*
7676
* The four events are `start`, `move`, `end`, and `cancel`. `start`, `move`, and `end`
77-
* receive as a parameter a coordinates object of the form `{ x: 150, y: 310 }`.
77+
* receive as a parameter a coordinates object of the form `{ x: 150, y: 310 }` and the raw
78+
* event. `cancel` receives the raw event as it's single parameter.
7879
*
7980
* `start` is called on either `mousedown` or `touchstart`. After this event, `$swipe` is
8081
* watching for `touchmove` or `mousemove` events. These events are ignored until the total

0 commit comments

Comments
 (0)