Minor fix for Gesture state machine

to dispatch STATE_CHANGE even when cycling around CHANGED state
This commit is contained in:
Pavel fljot 2012-08-07 17:46:53 +03:00
parent 2678e12de8
commit 3acafd1dfb

View file

@ -430,6 +430,12 @@ package org.gestouch.gestures
{ {
if (_state == newState && _state == GestureState.CHANGED) 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; return true;
} }