From 4e02d4ae63dddcbaccdde8cb4d4d918706497bdc Mon Sep 17 00:00:00 2001 From: Pavel fljot Date: Tue, 6 Mar 2012 23:27:39 +0200 Subject: [PATCH] Reformat condition --- src/org/gestouch/gestures/LongPressGesture.as | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/org/gestouch/gestures/LongPressGesture.as b/src/org/gestouch/gestures/LongPressGesture.as index 0b9a488..1318fa6 100644 --- a/src/org/gestouch/gestures/LongPressGesture.as +++ b/src/org/gestouch/gestures/LongPressGesture.as @@ -110,13 +110,9 @@ package org.gestouch.gestures override protected function onTouchMove(touch:Touch):void { - if (state == GestureState.POSSIBLE && slop > 0) + if (state == GestureState.POSSIBLE && slop > 0 && touch.locationOffset.length > slop) { - if (touch.locationOffset.length > slop) - { - setState(GestureState.FAILED); - return; - } + setState(GestureState.FAILED); } else if (state == GestureState.BEGAN || state == GestureState.CHANGED) {