From 57b0cbe7021cae19f05bf964f2bc1015e0fc2f47 Mon Sep 17 00:00:00 2001 From: "J. Tangelder" Date: Thu, 24 Jul 2014 08:57:59 +0200 Subject: [PATCH] make sure the end events are emitted as the final events. fix #616 --- src/recognizers/pan.js | 4 ++-- src/recognizers/swipe.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/recognizers/pan.js b/src/recognizers/pan.js index f8b0a8abc..b5db35a6a 100644 --- a/src/recognizers/pan.js +++ b/src/recognizers/pan.js @@ -73,11 +73,11 @@ inherit(PanRecognizer, AttrRecognizer, { this.pX = input.deltaX; this.pY = input.deltaY; - this._super.emit.call(this, input); - var direction = directionStr(input.direction); if (direction) { this.manager.emit(this.options.event + direction, input); } + + this._super.emit.call(this, input); } }); diff --git a/src/recognizers/swipe.js b/src/recognizers/swipe.js index d3a7d1875..05ed603b2 100644 --- a/src/recognizers/swipe.js +++ b/src/recognizers/swipe.js @@ -43,11 +43,11 @@ inherit(SwipeRecognizer, AttrRecognizer, { }, emit: function(input) { - this.manager.emit(this.options.event, input); - var direction = directionStr(input.direction); if (direction) { this.manager.emit(this.options.event + direction, input); } + + this.manager.emit(this.options.event, input); } });