From 14e481464f6742420c82cba236aa52ab6a2b7444 Mon Sep 17 00:00:00 2001 From: Steven Bassett Date: Tue, 13 Jan 2015 11:28:50 -0800 Subject: [PATCH] docs(EventController): onGesture and offGesture corrections - updates onGestures and offGesture methods to be correct. --- js/utils/events.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/js/utils/events.js b/js/utils/events.js index 24ca5c3133..c0b197d96f 100644 --- a/js/utils/events.js +++ b/js/utils/events.js @@ -127,6 +127,8 @@ * @param {function(e)} callback The function to call when the gesture * happens. * @param {DOMElement} element The angular element to listen for the event on. + * @param {object} options object. + * @returns {ionic.Gesture} The gesture object (use this to remove the gesture later on). */ onGesture: function(type, callback, element, options) { var gesture = new ionic.Gesture(element, options); @@ -138,10 +140,11 @@ * @ngdoc method * @name ionic.EventController#offGesture * @alias ionic.offGesture - * @description Remove an event listener for a gesture on an element. - * @param {string} eventType The gesture event. - * @param {function(e)} callback The listener that was added earlier. - * @param {DOMElement} element The element the listener was added on. + * @description Remove an event listener for a gesture created on an element. + * @param {ionic.Gesture} gesture The gesture that should be removed. + * @param {string} eventType The gesture event to remove the listener for. + * @param {function(e)} callback The listener to remove. + */ offGesture: function(gesture, type, callback) { gesture.off(type, callback);