multixy: spring behavior not working until all points are released (#689)

This commit is contained in:
jean-emmanuel 2021-02-22 07:34:54 +01:00
parent c2350ccf4f
commit 4fa1b46db0
3 changed files with 4 additions and 2 deletions

View file

@ -5,6 +5,7 @@
- bug fixes
- script: issue when using the `options` argument in `set()` (options leaked to subsequent set() calls in the script)
- multixy: `decimals` property not applied
- multixy: spring behavior not working until all points are released
# 1.8.8

View file

@ -154,6 +154,7 @@ module.exports = class MultiXy extends Pad {
this.on('change',(e)=>{
if (e.widget == this) return
e.stopPropagation = true
if (e.options.spring) e.options.dragged = true
this.setValue(this.getValue(), e.options)
})

View file

@ -104,7 +104,7 @@ module.exports = class Xy extends Pad {
this.faders.x.trigger('dragend', {...e, stopPropagation: true})
this.faders.y.trigger('dragend', {...e, stopPropagation: true})
if (this.getProp('spring')) {
this.setValue([this.faders.x.getSpringValue(),this.faders.y.getSpringValue()],{sync:true,send:true})
this.setValue([this.faders.x.getSpringValue(),this.faders.y.getSpringValue()],{sync:true, send:true, spring:true})
} else {
this.batchDraw()
}
@ -123,7 +123,7 @@ module.exports = class Xy extends Pad {
doubletab(this.widget, ()=>{
this.faders.x.setValue(this.faders.x.getSpringValue(), {sync: false, send:false, dragged:true})
this.faders.y.setValue(this.faders.y.getSpringValue(), {sync: false, send:false, dragged:true})
this.setValue([this.faders.x.getSpringValue(),this.faders.y.getSpringValue()],{sync:true, send:true})
this.setValue([this.faders.x.getSpringValue(),this.faders.y.getSpringValue()],{sync:true, send:true, spring:true})
})
}