MapBoard.py 文件源码

python
阅读 25 收藏 0 点赞 0 评论 0

项目:KivyTrek 作者: peterLaurence 项目源码 文件源码
def update(self, obj, value, delay=UPDATE_DELAY):
        """
        To prevent overuse of update_map, each change of position triggers an update of the map after UPDATE_DELAY sec.
        For instance, the position of the reticule has to be updated.
        """
        if self.map is None:
            return

        # Pause the Loader, to prevent ui blocking
        Loader.pause()

        # Reposition widgets that need to be repositioned
        self.reposition_executor.execute()

        # Trigger the map update
        if self.idle:
            self.idle = False
        else:
            Clock.unschedule(self.update_map)
        Clock.schedule_once(self.update_map, delay)

        # Resume the Loader after a short time
        Clock.schedule_once(MapViewer.resume_loading, 0.1)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号