Merge branch 'refs/heads/develop' into features/starling

This commit is contained in:
Pavel fljot 2012-05-30 20:54:47 +03:00
commit 54cc5d42bd
2 changed files with 5 additions and 4 deletions

View file

@ -135,6 +135,10 @@ package org.gestouch.gestures
if (state == GestureState.POSSIBLE) if (state == GestureState.POSSIBLE)
{ {
prevLocationX = _location.x;
prevLocationY = _location.y;
updateLocation();
// Check if finger moved enough for gesture to be recognized // Check if finger moved enough for gesture to be recognized
var locationOffset:Point = touch.locationOffset; var locationOffset:Point = touch.locationOffset;
if (direction == PanGestureDirection.VERTICAL) if (direction == PanGestureDirection.VERTICAL)
@ -148,9 +152,6 @@ package org.gestouch.gestures
if (locationOffset.length > slop || slop != slop)//faster isNaN(slop) if (locationOffset.length > slop || slop != slop)//faster isNaN(slop)
{ {
prevLocationX = _location.x;
prevLocationY = _location.y;
updateLocation();
offsetX = _location.x - prevLocationX; offsetX = _location.x - prevLocationX;
offsetY = _location.y - prevLocationY; offsetY = _location.y - prevLocationY;
// acummulate begin offsets for the case when this gesture recognition is delayed by requireGestureToFail // acummulate begin offsets for the case when this gesture recognition is delayed by requireGestureToFail

View file

@ -105,6 +105,7 @@ package org.gestouch.gestures
if (touchesCount == numTouchesRequired) if (touchesCount == numTouchesRequired)
{ {
_numTouchesRequiredReached = true; _numTouchesRequiredReached = true;
updateLocation();
} }
} }
@ -135,7 +136,6 @@ package org.gestouch.gestures
if (_tapCounter == numTapsRequired) if (_tapCounter == numTapsRequired)
{ {
updateLocation();
if (setState(GestureState.RECOGNIZED) && hasEventListener(TapGestureEvent.GESTURE_TAP)) if (setState(GestureState.RECOGNIZED) && hasEventListener(TapGestureEvent.GESTURE_TAP))
{ {
dispatchEvent(new TapGestureEvent(TapGestureEvent.GESTURE_TAP, false, false, GestureState.RECOGNIZED, dispatchEvent(new TapGestureEvent(TapGestureEvent.GESTURE_TAP, false, false, GestureState.RECOGNIZED,