Clamp scroll position when dragging the scrollbar without animations
This commit is contained in:
parent
9f7c6974ae
commit
a7ea84ae8f
|
@ -135,6 +135,7 @@ function View:on_mouse_moved(x, y, dx, dy)
|
|||
local delta = self:get_scrollable_size() / self.size.y * dy
|
||||
self.scroll.to.y = self.scroll.to.y + delta
|
||||
if not config.animate_drag_scroll then
|
||||
self:clamp_scroll_position()
|
||||
self.scroll.y = self.scroll.to.y
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue