From: huiyu.eun Date: Fri, 28 May 2021 03:22:56 +0000 (+0900) Subject: [NUI] Fix ScrollableBase animation issue X-Git-Tag: accepted/tizen/unified/20231205.024657~1819 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cc4c6e2a02b0e6e408fda3e6a7e9665d46a45f54;hp=f648c71496552d45351230bd98632d442d6be366;p=platform%2Fcore%2Fcsapi%2Ftizenfx.git [NUI] Fix ScrollableBase animation issue https://github.sec.samsung.net/dotnet/NUIBackend/issues/56 - Stop scroll animation when ScrollTo() is called during scrolling - Stop scroll animation when changing ScrollDirection Signed-off-by: huiyu.eun --- diff --git a/src/Tizen.NUI.Components/Controls/ScrollableBase.cs b/src/Tizen.NUI.Components/Controls/ScrollableBase.cs index a0796c5..93381a7 100755 --- a/src/Tizen.NUI.Components/Controls/ScrollableBase.cs +++ b/src/Tizen.NUI.Components/Controls/ScrollableBase.cs @@ -260,6 +260,9 @@ namespace Tizen.NUI.Components { if (value != mScrollingDirection) { + //Reset scroll position and stop scroll animation + ScrollTo(0, false); + mScrollingDirection = value; mPanGestureDetector.ClearAngles(); mPanGestureDetector.AddDirection(value == Direction.Horizontal ? @@ -987,6 +990,7 @@ namespace Tizen.NUI.Components } else { + StopScroll(); finalTargetPosition = BoundScrollPosition(childTargetPosition); // Set position of scrolling child without an animation