xy: fix doubleTap not setting value correctly (issue #143)

This commit is contained in:
jean-emmanuel 2018-02-07 13:20:54 +01:00
parent 8c24f5e1a6
commit c6207cacd2

View file

@ -135,13 +135,15 @@ module.exports = class Xy extends Pad {
this.faders.x.trigger('dragend', [e])
this.faders.y.trigger('dragend', [e])
if (this.getProp('spring')) {
this.setValue([this.faders.x.springValue,this.faders.y.springValue],{sync:true,send:true,fromLocal:true})
this.setValue([this.faders.x.springValue,this.faders.y.springValue],{sync:true,send:true})
}
}, {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})
this.faders.x.setValue(this.faders.x.springValue, {sync: false, send:false, dragged:true})
this.faders.y.setValue(this.faders.y.springValue, {sync: false, send:false, dragged:true})
this.setValue([this.faders.x.springValue,this.faders.y.springValue],{sync:true, send:true})
})
}