browsingcard.py 文件源码

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

项目:iotdm-pyclient 作者: peterchauyw 项目源码 文件源码
def on_touch_move(self, touch):
        if self._get_uid('cavoid') in touch.ud:
            return
        if self._touch is not touch:
            super(BrowsingCard, self).on_touch_move(touch)
            return self._get_uid() in touch.ud
        if touch.grab_current is not self:
            return True
        ud = touch.ud[self._get_uid()]
        if ud['mode'] == 'unknown':
            distance = abs(touch.ox - touch.x)
            if distance > self.scroll_distance:
                Clock.unschedule(self._change_touch_mode)
                ud['mode'] = 'scroll'
        else:
            self._offset += touch.dx
        return True
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号