From 3acafd1dfb5208407755528eeace21eb3db8663c Mon Sep 17 00:00:00 2001 From: Pavel fljot Date: Tue, 7 Aug 2012 17:46:53 +0300 Subject: [PATCH] Minor fix for Gesture state machine to dispatch STATE_CHANGE even when cycling around CHANGED state --- src/org/gestouch/gestures/Gesture.as | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/org/gestouch/gestures/Gesture.as b/src/org/gestouch/gestures/Gesture.as index 5da26ca..bd12afb 100644 --- a/src/org/gestouch/gestures/Gesture.as +++ b/src/org/gestouch/gestures/Gesture.as @@ -430,6 +430,12 @@ package org.gestouch.gestures { if (_state == newState && _state == GestureState.CHANGED) { + // shortcut for better performance + if (hasEventListener(GestureStateEvent.STATE_CHANGE)) + { + dispatchEvent(new GestureStateEvent(GestureStateEvent.STATE_CHANGE, _state, _state)); + } + return true; }