ended事件在move之后发送.

This commit is contained in:
u0u0
2024-04-08 14:13:32 +08:00
parent 81921d575f
commit 6669a879e7

View File

@@ -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)