multixy: fix touch state vs feedback filtering order (dragend event handler sorting)
This commit is contained in:
parent
c0a331ece6
commit
973654b2d7
1 changed files with 17 additions and 17 deletions
|
|
@ -111,6 +111,23 @@ class MultiXy extends Pad {
|
|||
this.padsCoords = []
|
||||
this.touchMap = {}
|
||||
|
||||
this.on('dragend',(e)=>{
|
||||
|
||||
var i = this.touchMap[e.pointerId]
|
||||
|
||||
if (!i) return
|
||||
|
||||
e.stopPropagation = true
|
||||
|
||||
this.pads[i].touched = 0
|
||||
this.pads[i].trigger('dragend', e)
|
||||
|
||||
this.trigger('touch', {stopPropagation: true, touch: [parseInt(this.touchMap[e.pointerId]), 0]})
|
||||
|
||||
delete this.touchMap[e.pointerId]
|
||||
|
||||
}, {element: this.widget, multitouch: true})
|
||||
|
||||
touchstate(this, {element: this.widget, multitouch: true})
|
||||
|
||||
this.on('draginit',(e)=>{
|
||||
|
|
@ -148,23 +165,6 @@ class MultiXy extends Pad {
|
|||
|
||||
}, {element: this.widget, multitouch: true})
|
||||
|
||||
this.on('dragend',(e)=>{
|
||||
|
||||
var i = this.touchMap[e.pointerId]
|
||||
|
||||
if (!i) return
|
||||
|
||||
e.stopPropagation = true
|
||||
|
||||
this.pads[i].touched = 0
|
||||
this.pads[i].trigger('dragend', e)
|
||||
|
||||
this.trigger('touch', {stopPropagation: true, touch: [parseInt(this.touchMap[e.pointerId]), 0]})
|
||||
|
||||
delete this.touchMap[e.pointerId]
|
||||
|
||||
}, {element: this.widget, multitouch: true})
|
||||
|
||||
this.on('value-changed',(e)=>{
|
||||
if (e.widget == this) return
|
||||
e.stopPropagation = true
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue