Skip to content
This repository has been archived by the owner on Mar 13, 2018. It is now read-only.

Commit

Permalink
Rename addGesture and removeGesture to addEventListener and removeEve…
Browse files Browse the repository at this point in the history
…ntListener

This more accurately reflects that all event listeners can be added with these functions
  • Loading branch information
dfreedm committed Jul 31, 2014
1 parent 27a1294 commit 1e8dfd5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/dispatcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@
* @param {string} gesture
* @param {Function} handler
*/
scope.addGesture = function(node, gesture, handler) {
scope.addEventListener = function(node, gesture, handler) {
if (handler) {
scope.activateGesture(node, gesture);
node.addEventListener(gesture, handler);
Expand Down Expand Up @@ -380,7 +380,7 @@
* @param {string} gesture
* @param {Function} handler
*/
scope.removeGesture = function(node, gesture, handler) {
scope.removeEventListener = function(node, gesture, handler) {
if (handler) {
scope.deactivateGesture(node, gesture);
node.removeEventListener(gesture, handler);
Expand Down

0 comments on commit 1e8dfd5

Please sign in to comment.