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

Commit 27a1294

Browse files
committed
Always call addEventListener with addGesture
Can probably remove public PolymerGestures.activateGesture and PolymerGestures.deactivateGesture
1 parent 25c530d commit 27a1294

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/dispatcher.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,8 @@
339339
* @param {Function} handler
340340
*/
341341
scope.addGesture = function(node, gesture, handler) {
342-
if (handler && scope.activateGesture(node, gesture)) {
342+
if (handler) {
343+
scope.activateGesture(node, gesture);
343344
node.addEventListener(gesture, handler);
344345
}
345346
};
@@ -380,7 +381,8 @@
380381
* @param {Function} handler
381382
*/
382383
scope.removeGesture = function(node, gesture, handler) {
383-
if (handler && scope.deactivateGesture(node, gesture)) {
384+
if (handler) {
385+
scope.deactivateGesture(node, gesture);
384386
node.removeEventListener(gesture, handler);
385387
}
386388
};

0 commit comments

Comments
 (0)