range/xy/multixy: fix touchstate in snap/traversing mode (send /touched before any value)

This commit is contained in:
jean-emmanuel 2018-01-25 12:28:03 +01:00
parent c187a30d88
commit 1d90168c3b
3 changed files with 6 additions and 6 deletions

View file

@ -106,6 +106,8 @@ module.exports = class MultiXy extends _pads_base {
this.padsCoords = []
this.touchMap = {}
touchstate(this, {element: this.wrapper, multitouch: true})
this.on('draginit',(e)=>{
var id
@ -160,8 +162,6 @@ module.exports = class MultiXy extends _pads_base {
}, {element: this.wrapper, multitouch: true})
touchstate(this, {element: this.wrapper, multitouch: true})
this.on('change',(e)=>{
if (e.widget == this) return
e.stopPropagation = true

View file

@ -115,6 +115,8 @@ module.exports = class Xy extends _pads_base {
e.stopPropagation = true
})
touchstate(this, {element: this.wrapper})
this.on('draginit',(e)=>{
e.stopPropagation = true
this.faders.x.trigger('draginit', [e])
@ -137,8 +139,6 @@ module.exports = class Xy extends _pads_base {
}
}, {element: this.wrapper})
touchstate(this, {element: this.wrapper})
if (this.getProp('doubleTap')) {
doubletab(this.wrapper, ()=>{
this.setValue([this.faders.x.springValue,this.faders.y.springValue],{sync:true, send:true, fromLocal:true})

View file

@ -293,6 +293,8 @@ module.exports = class Range extends _widgets_base {
this.touchMap = {}
touchstate(this, {element: this.wrapper, multitouch: true})
this.on('draginit',(e)=>{
var id
@ -350,8 +352,6 @@ module.exports = class Range extends _widgets_base {
}, {element: this.wrapper, multitouch: true})
touchstate(this, {element: this.wrapper, multitouch: true})
if (this.getProp('input')) {
this.input = new Input({