Skip to content

Commit

Permalink
make sure the end events are emitted as the final events. fix #616
Browse files Browse the repository at this point in the history
  • Loading branch information
jtangelder committed Jul 24, 2014
1 parent 94482e9 commit 57b0cbe
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/recognizers/pan.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
});
4 changes: 2 additions & 2 deletions src/recognizers/swipe.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
});

0 comments on commit 57b0cbe

Please sign in to comment.