#148 remove scroll inertion after scroll animate or set_to

This commit is contained in:
Insality 2021-11-20 11:11:24 +02:00
parent dbb883b1b8
commit 154d9fc166

View File

@ -531,6 +531,9 @@ end
--- Cancel animation on other animation or input touch
function Scroll._cancel_animate(self)
self.inertion.x = 0
self.inertion.y = 0
if self.is_animate then
self.target_position = gui.get_position(self.content_node)
self.position.x = self.target_position.x