[Tizen] Pan now possible without a touch down 55/220755/2 submit/tizen_5.5/20191226.075037
authorAdeel Kazmi <adeel.kazmi@samsung.com>
Thu, 12 Dec 2019 17:54:50 +0000 (17:54 +0000)
committerMinho Sun <minho.sun@samsung.com>
Mon, 23 Dec 2019 03:53:59 +0000 (03:53 +0000)
Before you had to be listening to pan gestures before the touch-down
event arrives.

Change-Id: Id9fa1164ab43c038ab407950a5b794ab4976241e

dali/internal/event/events/pan-gesture/pan-gesture-processor.cpp
dali/internal/event/events/pan-gesture/pan-gesture-recognizer.cpp

index 05589ef..3aadc05 100644 (file)
@@ -161,13 +161,8 @@ void PanGestureProcessor::Process( Scene& scene, const PanGestureEvent& panEvent
       mCurrentPanEmitters.clear();
       ResetActor();
 
-      HitTestAlgorithm::Results hitTestResults;
-      if( HitTest( scene, panEvent.currentPosition, hitTestResults ) )
-      {
-        SetActor( &GetImplementation( hitTestResults.actor ) );
-        mPossiblePanPosition = panEvent.currentPosition;
-      }
-
+      // It's only possible on touch-down, which is the position we want to hit-test against when the pan actually starts
+      mPossiblePanPosition = panEvent.currentPosition;
       break;
     }
 
@@ -184,7 +179,7 @@ void PanGestureProcessor::Process( Scene& scene, const PanGestureEvent& panEvent
         HitTestAlgorithm::Results hitTestResults;
         HitTest( scene, mPossiblePanPosition, hitTestResults ); // Hit test original possible position...
 
-        if ( hitTestResults.actor && ( GetCurrentGesturedActor() == &GetImplementation( hitTestResults.actor ) ) )
+        if ( hitTestResults.actor )
         {
           // Record the current render-task for Screen->Actor coordinate conversions
           mCurrentRenderTask = hitTestResults.renderTask;
index 0256821..0b56574 100644 (file)
@@ -99,7 +99,7 @@ void PanGestureRecognizer::SendEvent(const Integration::TouchEvent& event)
     {
       case Clear:
       {
-        if ( ( primaryPointState == PointState::DOWN ) || ( primaryPointState == PointState::STATIONARY ) )
+        if ( ( primaryPointState == PointState::DOWN ) || ( primaryPointState == PointState::STATIONARY ) || ( primaryPointState == PointState::MOTION ))
         {
           mPrimaryTouchDownLocation = event.points[0].GetScreenPosition();
           mPrimaryTouchDownTime = event.time;