mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-06-23 15:30:45 -04:00
...
This commit is contained in:
parent
3b924ecb04
commit
bd24c88f8c
@ -180,7 +180,9 @@ class TouchHandler:
|
||||
self.start_hold_timer()
|
||||
|
||||
def handle_touchstart(self, ev):
|
||||
ev.preventDefault(), ev.stopPropagation()
|
||||
if ev.cancelable:
|
||||
ev.preventDefault()
|
||||
ev.stopPropagation()
|
||||
self.prune_expired_touches()
|
||||
for touch in ev.changedTouches:
|
||||
self.ongoing_touches[touch_id(touch)] = copy_touch(touch)
|
||||
@ -193,7 +195,9 @@ class TouchHandler:
|
||||
self.start_hold_timer()
|
||||
|
||||
def handle_touchmove(self, ev):
|
||||
ev.preventDefault(), ev.stopPropagation()
|
||||
if ev.cancelable:
|
||||
ev.preventDefault()
|
||||
ev.stopPropagation()
|
||||
for touch in ev.changedTouches:
|
||||
t = self.ongoing_touches[touch_id(touch)]
|
||||
if t:
|
||||
@ -201,7 +205,9 @@ class TouchHandler:
|
||||
self.dispatch_gesture()
|
||||
|
||||
def handle_touchend(self, ev):
|
||||
ev.preventDefault(), ev.stopPropagation()
|
||||
if ev.cancelable:
|
||||
ev.preventDefault()
|
||||
ev.stopPropagation()
|
||||
for touch in ev.changedTouches:
|
||||
t = self.ongoing_touches[touch_id(touch)]
|
||||
if t:
|
||||
@ -214,7 +220,8 @@ class TouchHandler:
|
||||
|
||||
def handle_touchcancel(self, ev):
|
||||
if ev.cancelable:
|
||||
ev.preventDefault(), ev.stopPropagation()
|
||||
ev.preventDefault()
|
||||
ev.stopPropagation()
|
||||
for touch in ev.changedTouches:
|
||||
tid = touch_id(touch) # noqa: unused-local
|
||||
v'delete self.ongoing_touches[tid]'
|
||||
|
Loading…
x
Reference in New Issue
Block a user