touch/drag: only prevent draginit for additionnal fingers, but store the touch reference
This commit is contained in:
parent
471a7ce01e
commit
7ec41c599a
1 changed files with 9 additions and 7 deletions
|
|
@ -134,7 +134,14 @@
|
|||
if (isNaN(i)) continue
|
||||
|
||||
var touch = oE.changedTouches[i],
|
||||
id = touch.identifier
|
||||
id = touch.identifier,
|
||||
emit = true
|
||||
|
||||
for (j in targets) {
|
||||
if (targets[j][0].isSameNode(touch.target)) {
|
||||
emit = false
|
||||
}
|
||||
}
|
||||
|
||||
targets[id] = $(touch.target)
|
||||
previousTouches[id] = touch
|
||||
|
|
@ -149,13 +156,8 @@
|
|||
touch.offsetX = touch.pageX-off.left
|
||||
touch.offsetY = touch.pageY-off.top
|
||||
|
||||
for (j in targets) {
|
||||
if (targets[j][0].isSameNode(touch.target)) {
|
||||
continue touches
|
||||
}
|
||||
}
|
||||
|
||||
targets[id].triggerHandler('draginit',[touch,e.originalEvent.traversing])
|
||||
if (emit) targets[id].triggerHandler('draginit',[touch,e.originalEvent.traversing])
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue