ui: ensure auto-scroll stops correctly near target (#36686)

ensure auto-scroll stops correctly near target
This commit is contained in:
Dean Lee
2025-11-27 19:22:15 +08:00
committed by GitHub
parent 0a0fadb16a
commit f8d0f22344
+1
View File
@@ -88,6 +88,7 @@ class GuiScrollPanel2:
# Steady once we are close enough to the target
if abs(dist) < 1 and abs(self._velocity) < MIN_VELOCITY:
self.set_offset(target)
self._velocity = 0.0
self._state = ScrollState.STEADY
elif abs(self._velocity) < MIN_VELOCITY: