[NUI] Make Scrollable finish when Gesture.StateType is Cancelled (#2029)
authorbshsqa <32317749+bshsqa@users.noreply.github.com>
Fri, 18 Sep 2020 06:48:29 +0000 (15:48 +0900)
committerGitHub <noreply@github.com>
Fri, 18 Sep 2020 06:48:29 +0000 (15:48 +0900)
- Current implementation, the scroll of ScrollableBase will be finished only when Gesture.StateType is Finished.
 - However, by the hw, it can be Cancelled.

Signed-off-by: seungho <seungho@seungho.tn.corp.samsungelectronics.net>
Co-authored-by: seungho <seungho@seungho.tn.corp.samsungelectronics.net>
src/Tizen.NUI.Components/Controls/ScrollableBase.cs

index 0c072d51fdb9cfb84ac4276693b2de4baa8c233e..e9fbe358c2193573cfc94248bf72b2dc27fb9baa 100755 (executable)
@@ -967,7 +967,7 @@ namespace Tizen.NUI.Components
                 }
                 Debug.WriteLineIf(LayoutDebugScrollableBase, "OnPanGestureDetected Continue totalDisplacementForPan:" + totalDisplacementForPan);
             }
-            else if (panGesture.State == Gesture.StateType.Finished)
+            else if (panGesture.State == Gesture.StateType.Finished || panGesture.State == Gesture.StateType.Cancelled)
             {
                 OnScrollDragEnded();
                 StopScroll(); // Will replace previous animation so will stop existing one.