drag: pass event.multitouch to each touchevent (#292)
This commit is contained in:
parent
66fcd48015
commit
9ae5c2f58a
2 changed files with 17 additions and 11 deletions
|
|
@ -1,12 +1,17 @@
|
|||
# Changelog
|
||||
|
||||
## 0.30.5
|
||||
|
||||
- bug fixes
|
||||
- regression breaking multitouch widgets
|
||||
|
||||
## 0.30.4
|
||||
|
||||
- bug fixes
|
||||
- regression breaking touch traversing gestures
|
||||
- clone widgets becomming unselectable for edition
|
||||
- `preArgs` property still being coerced to an array
|
||||
|
||||
|
||||
## 0.30.3
|
||||
|
||||
- bug fixes
|
||||
|
|
|
|||
|
|
@ -97,15 +97,15 @@ function pointerUpFilter(event) {
|
|||
|
||||
// Mouse events wrappers
|
||||
|
||||
function mouseDownCapture(event) {
|
||||
if ((event.sourceCapabilities && event.sourceCapabilities.firesTouchEvents) || event.button == 2) return
|
||||
event.pointerId = 'mouse'
|
||||
pointerDownHandler(event)
|
||||
function mouseMultiWrapper(event) {
|
||||
mouseDownCapture(event, true)
|
||||
}
|
||||
|
||||
function mouseMultiWrapper(event) {
|
||||
event.multitouch = true
|
||||
mouseDownCapture(event)
|
||||
function mouseDownCapture(event, multitouch) {
|
||||
if ((event.sourceCapabilities && event.sourceCapabilities.firesTouchEvents) || event.button == 2) return
|
||||
event.pointerId = 'mouse'
|
||||
event.multitouch = multitouch
|
||||
pointerDownHandler(event)
|
||||
}
|
||||
|
||||
function mouseMoveCapture(event) {
|
||||
|
|
@ -124,11 +124,10 @@ function mouseUpCapture(event){
|
|||
// Touch events wrappers
|
||||
|
||||
function touchMultiWrapper(event) {
|
||||
event.multitouch = true
|
||||
touchDownCapture(event)
|
||||
touchDownCapture(event, true)
|
||||
}
|
||||
|
||||
function touchDownCapture(event) {
|
||||
function touchDownCapture(event, multitouch) {
|
||||
event.preventDefault()
|
||||
for (var i in event.changedTouches) {
|
||||
if (isNaN(i) || !event.changedTouches[i]) continue
|
||||
|
|
@ -140,6 +139,8 @@ function touchDownCapture(event) {
|
|||
}
|
||||
|
||||
touchEvent.pointerId = touchEvent.identifier
|
||||
touchEvent.multitouch = multitouch
|
||||
|
||||
pointerDownHandler(touchEvent)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue