def set_scale(self):
if self.manager.current_screen.ids.get('scalar'):
scale_amount = Window.size[0] / 233
print('scaling factor', scale_amount)
animation = Animation(scale=scale_amount, duration=.2)
scalar = self.manager.current_screen.ids.scalar
# TODO - when we resize the screen, we want to focus on the map's focus target coordinates in the Scalar
scalar.center = scalar.parent.center
self.current_instance.map.recenter(*Window.size)
animation.start(scalar)
评论列表
文章目录