[Tizen] Pan now possible without a touch down
authorJoogab Yun <joogab.yun@samsung.com>
Fri, 27 Dec 2019 08:22:13 +0000 (17:22 +0900)
committerJoogab Yun <joogab.yun@samsung.com>
Fri, 27 Dec 2019 08:22:16 +0000 (17:22 +0900)
This reverts commit 0a72415bb97cde52df6ae8139b60691df4f32ed4.

Change-Id: Ifefd45959dab4380a542a24b684c1150a7716b8f

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;