Fixed regression with tap and touch

This commit is contained in:
Max Lynch
2013-08-26 19:15:58 -05:00
parent 2db29fb35b
commit b6a4f42885

View File

@ -98,7 +98,8 @@
gestures: [ gestures: [
framework.Gesture.Touch, framework.Gesture.Touch,
framework.Gesture.Tap, framework.Gesture.Tap,
framework.Gesture.Swipe framework.Gesture.Swipe,
framework.Gesture.Release,
], ],
_annotateGestureEvent: function(e) { _annotateGestureEvent: function(e) {
@ -147,7 +148,7 @@
timeStamp : new Date().getTime(), timeStamp : new Date().getTime(),
target : e.target, target : e.target,
touches : e.touches, touches : e.touches,
eventType : e.type, type: e.type,
srcEvent : e, srcEvent : e,
/* /*
@ -206,10 +207,9 @@
} }
var eventData = this._annotateGestureEvent(e); var eventData = this._annotateGestureEvent(e);
console.log("Event velocity:", eventData.velocityX, eventData.velocityY);
for(i = 0; i < this.gestures.length; i++) { for(i = 0; i < this.gestures.length; i++) {
if(this.gestures[i].handle(eventData) == false) { if(this.gestures[i].handle(eventData) === false) {
console.log('GESTURECONTROLLER: Gesture handled and stopped.'); console.log('GESTURECONTROLLER: Gesture handled and stopped.');
this.endGesture(eventData); this.endGesture(eventData);
return; return;