+ if( panEvent.state == Gesture::Started )
+ {
+ // Find the focusable actor at the event position
+ Dali::HitTestAlgorithm::Results results;
+ AccessibilityManager manager = AccessibilityManager::Get();
+
+ Dali::HitTestAlgorithm::HitTest( Stage::GetCurrent(), panEvent.currentPosition, results, IsActorFocusableFunction );
+ mCurrentGesturedActor = results.actor;
+
+ if(!mCurrentGesturedActor)
+ {
+ DALI_LOG_ERROR("Gesture detected, but no hit actor");
+ }
+ }
+
+ // Gesture::Finished (Up) events are delivered with previous (Motion) event position
+ // Use the real previous position; otherwise we may incorrectly get a ZERO velocity
+ if ( Gesture::Finished != panEvent.state )
+ {
+ // Store the previous position for next Gesture::Finished iteration.
+ mPreviousPosition = panEvent.previousPosition;
+ }
+