Revert "[Tizen] Pan now possible without a touch down" 35/221335/1 accepted/tizen/5.5/unified/20200102.110125 submit/tizen_5.5/20200102.004531
authorDongsug Song <dongsug.song@samsung.com>
Tue, 31 Dec 2019 07:00:33 +0000 (16:00 +0900)
committerDongsug Song <dongsug.song@samsung.com>
Tue, 31 Dec 2019 07:00:44 +0000 (16:00 +0900)
- some pan senario is not working (for example, scrolling)
- revert temporarily

This reverts commit e647a952be0dce4f90787548874203415b8f9154.

Change-Id: I2a6ea6a137fa1f1a4937a57d4e7b3c4c63e2a505

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

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