From 3be92fb21fcc43be5e50c45aaa2cb91c7966791b Mon Sep 17 00:00:00 2001 From: Pavel fljot Date: Thu, 5 May 2011 19:15:22 +0300 Subject: [PATCH] Small slop calculation optimization in MovingGestureBase --- src/org/gestouch/gestures/MovingGestureBase.as | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/org/gestouch/gestures/MovingGestureBase.as b/src/org/gestouch/gestures/MovingGestureBase.as index 8a52a88..ae55d1d 100644 --- a/src/org/gestouch/gestures/MovingGestureBase.as +++ b/src/org/gestouch/gestures/MovingGestureBase.as @@ -131,6 +131,11 @@ package org.gestouch.gestures protected function _checkSlop(moveDelta:Point):Boolean { var slopPassed:Boolean = false; + if (!(slop > 0)) + { + // return true immideately if slop is 0 or NaN + return true; + } if (_canMoveHorizontally && _canMoveVertically) {