From c7c4a595398cd4931232eaf896cbd8cbff34f06c Mon Sep 17 00:00:00 2001 From: u0u0 Date: Mon, 8 Apr 2024 14:14:10 +0800 Subject: [PATCH] =?UTF-8?q?ended=E4=BA=8B=E4=BB=B6=E5=9C=A8move=E4=B9=8B?= =?UTF-8?q?=E5=90=8E=E5=8F=91=E9=80=81.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cocos/ui/UIScrollView.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cocos/ui/UIScrollView.cpp b/cocos/ui/UIScrollView.cpp index b9261f3..5660f7a 100644 --- a/cocos/ui/UIScrollView.cpp +++ b/cocos/ui/UIScrollView.cpp @@ -609,14 +609,13 @@ void ScrollView::processAutoScrolling(float deltaTime) } } + moveInnerContainer(newPosition - getInnerContainerPosition(), reachedEnd); // Finish auto scroll if it ended if(reachedEnd) { _autoScrolling = false; dispatchEvent(EventType::AUTOSCROLL_ENDED); } - - moveInnerContainer(newPosition - getInnerContainerPosition(), reachedEnd); } void ScrollView::jumpToDestination(const Vec2 &des)