Skip to content

Commit

Permalink
swipe did not reset its state after ending the gesture cycle
Browse files Browse the repository at this point in the history
  • Loading branch information
ppcano committed Jan 8, 2012
1 parent 11ecc96 commit d3fa0e3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Improvements, issues, bugs, contributions.....

# How to Run Unit Tests

run __rackup__
run __bundle exec rackup__

Test the whole suite http://localhost:9292/tests/index.html

Expand Down
5 changes: 2 additions & 3 deletions packages/ember-touch/lib/gesture_recognizers/swipe.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ Em.SwipeGestureRecognizer = Em.Gesture.extend({

var isValidMovement = false;

//if ( this.direction === Em.SwipeGestureDirection.Right ) {
if ( ( this.direction & Em.SwipeGestureDirection.Right ) != 0 ) {

isValidMovement = ( (x0-x) > this.swipeThreshold);
Expand Down Expand Up @@ -155,7 +154,7 @@ Em.SwipeGestureRecognizer = Em.Gesture.extend({
var view = get(this, 'onBeganGestureView');
var eventName = get(this, 'name')+'End';
this.attemptGestureEventDelivery(view, eventName);
//this._resetState(); // let be executed on touchEnd
this._resetState();

}

Expand All @@ -177,7 +176,7 @@ Em.SwipeGestureRecognizer = Em.Gesture.extend({
var view = get(this, 'onBeganGestureView');
var eventName = get(this, 'name')+'Cancel';
this.attemptGestureEventDelivery(view, eventName);
//this._resetState(); // let be executed on touchEnd
this._resetState();

},

Expand Down

0 comments on commit d3fa0e3

Please sign in to comment.