mirror of
https://github.com/scratchfoundation/Gestouch.git
synced 2025-02-16 23:40:14 -05:00
Minor performance fix for SwipeGesture
This commit is contained in:
parent
3dcc78c267
commit
895e662bd5
1 changed files with 6 additions and 1 deletions
|
@ -102,7 +102,12 @@ package org.gestouch.gestures
|
|||
var absVel:Number = vel > 0 ? vel : -vel;//faster Math.abs()
|
||||
// trace(_offset, _offset.length, ".....velocity:", vel);
|
||||
|
||||
if (offsetLength > Gesture.DEFAULT_SLOP && absVel < velocityThreshold)
|
||||
if (offsetLength < Gesture.DEFAULT_SLOP)
|
||||
{
|
||||
// no need in processing - we're in the very beginning of movement
|
||||
return;
|
||||
}
|
||||
else if (absVel < velocityThreshold)
|
||||
{
|
||||
setState(GestureState.FAILED);
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue