Fixed container that is scrolled down getting stuck being 'overscrolled' when resized

This commit is contained in:
2024-01-18 14:08:33 -06:00
parent 00e47d61a2
commit d0e1772f33

View File

@@ -236,6 +236,11 @@ module CyberarmEngine
self.scroll_top = -@scroll_position.y
@scroll_target_position.y = @scroll_position.y
# Fixes resized container that is scrolled down from being stuck overscrolled when resized
if scroll_height < height
@scroll_target_position.y = 0
end
# NOTE: Experiment for removing need to explicitly call gui_state#recalculate at least 3 times for layout to layout...
if old_width != @width || old_height != @height
if @parent