if true_point[0] >= self.view.size[0]:
self.view.scroll_x += self.x_scroll_margin
true_point = self.to_parent(*check_point)
+ # Avoid an infinite loop that can happen we
+ # changing screens
+ if self.view.scroll_x > 0.99:
+ return
elif true_point[0] < 0:
self.view.scroll_x -= self.x_scroll_margin
true_point = self.to_parent(*check_point)
+ # See above
+ if self.view.scroll_x < 0.01:
+ return
elif true_point[1] >= self.view.size[1]:
self.view.scroll_y += self.y_scroll_margin
true_point = self.to_parent(*check_point)
+ # See above
+ if self.view.scroll_y > 0.99:
+ return
elif true_point[1] < 0:
self.view.scroll_y -= self.y_scroll_margin
true_point = self.to_parent(*check_point)
+ # See above
+ if self.view.scroll_y < 0.01:
+ return
def included(self, point, margin):
if point[0] < margin: