[Tizen] Revert "Changes after touch consumed behaviour change"
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / drag-drop-detector / drag-and-drop-detector-impl.cpp
old mode 100644 (file)
new mode 100755 (executable)
index 6687e89..d1ad520
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2018 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -123,9 +123,9 @@ void DragAndDropDetector::OnPan(Dali::Actor actor, const PanGesture& gesture)
 {
   Dali::Toolkit::Control control = Dali::Toolkit::Control::DownCast(actor);
 
-  Gesture::State state = gesture.GetState();
+  GestureState state = gesture.GetState();
 
-  if(state == Gesture::Started)
+  if(state == GestureState::STARTED)
   {
     mDragLocalPosition = gesture.GetPosition();
     mPointDown = true;
@@ -149,13 +149,13 @@ void DragAndDropDetector::OnPan(Dali::Actor actor, const PanGesture& gesture)
     SetPosition(gesture.GetScreenPosition());
     EmitStartedSignal(control);
   }
-  if(state == Gesture::Continuing)
+  if(state == GestureState::CONTINUING)
   {
       Vector2 screenPosition = gesture.GetScreenPosition();
       control.GetParent().ScreenToLocal(mLocalPosition.x, mLocalPosition.y, screenPosition.x, screenPosition.y);
       mShadowControl.SetProperty( Actor::Property::POSITION, Vector2(mLocalPosition.x - mDragLocalPosition.x, mLocalPosition.y - mDragLocalPosition.y));
   }
-  if(state == Gesture::Finished)
+  if(state == GestureState::FINISHED)
   {
     mDragControl.GetParent().Remove(mShadowControl);
     EmitEndedSignal(control);
@@ -211,7 +211,7 @@ bool DragAndDropDetector::OnDrag(Dali::Actor actor, const Dali::TouchEvent& data
     }
     mPointDown = false;
   }
-  return false;
+  return true;
 }
 
 const std::string& DragAndDropDetector::GetContent() const