drag: force inertia = 1 for multitouch widgets (#292)
This commit is contained in:
parent
9ae5c2f58a
commit
5f107c613b
1 changed files with 14 additions and 4 deletions
|
|
@ -20,9 +20,10 @@ module.exports = {
|
|||
button: e.button,
|
||||
ctrlKey: e.ctrlKey,
|
||||
shiftKey: e.shiftKey,
|
||||
inertia: e.inertia,
|
||||
inertia: e.multitouch ? 1 : e.inertia,
|
||||
traversing: e.traversing,
|
||||
traversingContainer: e.traversingContainer,
|
||||
multitouch: e.multitouch,
|
||||
isTouch: e instanceof Touch
|
||||
}
|
||||
},
|
||||
|
|
@ -55,13 +56,22 @@ module.exports = {
|
|||
|
||||
}
|
||||
|
||||
if (previousEvent && previousEvent.traversing) {
|
||||
if (previousEvent) {
|
||||
|
||||
event.traversing = previousEvent.traversing
|
||||
event.traversingContainer = previousEvent.traversingContainer
|
||||
if (previousEvent.traversing) {
|
||||
event.traversing = previousEvent.traversing
|
||||
event.traversingContainer = previousEvent.traversingContainer
|
||||
}
|
||||
|
||||
if (previousEvent.multitouch) {
|
||||
event.multitouch = previousEvent.multitouch
|
||||
event.inertia = 1
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
return event
|
||||
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue