Merge pull request #7069 from shreyash/patch-1

Horizontal scrolling disabled if no overflow
This commit is contained in:
Gabriel Pettier 2020-09-27 12:03:14 +02:00 committed by GitHub
commit d594e1373b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 3 deletions

View File

@ -895,9 +895,10 @@ class ScrollView(StencilView):
and self.effect_x:
width = self.width
if touch.ud.get('in_bar_x', False):
dx = touch.dx / float(width - width * self.hbar[1])
self.scroll_x = min(max(self.scroll_x + dx, 0.), 1.)
self._trigger_update_from_scroll()
if self.hbar[1] != 1:
dx = touch.dx / float(width - width * self.hbar[1])
self.scroll_x = min(max(self.scroll_x + dx, 0.), 1.)
self._trigger_update_from_scroll()
else:
if self.scroll_type != ['bars']:
self.effect_x.update(touch.x)