Reduce the scroll boundary bounce

kivy_mainline_and_py3.8
Tyler Goodlet 2018-11-22 19:39:40 -05:00
parent 0f53cbbd95
commit 0f3faec35d
1 changed files with 1 additions and 1 deletions

View File

@ -184,5 +184,5 @@ class PagerView(ScrollView):
_, yscale = self.convert_distance_to_scroll(0, pxs)
new = self.scroll_y + (yscale * {'u': 1, 'd': -1}[direction])
# bound to near [0, 1] to avoid "over-scrolling"
limited = max(-0.03, min(new, 1.03))
limited = max(-0.01, min(new, 1.01))
self.scroll_y = limited