pads: send value when setting spring to true, but only if there's a value change

This commit is contained in:
jean-emmanuel 2025-06-12 12:41:09 +02:00
parent faba19e94c
commit 69c52921c4
3 changed files with 7 additions and 2 deletions

View file

@ -4,6 +4,7 @@
- bug fixes
- matrix: prevent error when `quantity` is invalid
- multixy/xy: send value when setting `spring` to `true` (only if current value is different than spring value)
## 1.29.5

View file

@ -402,7 +402,7 @@ class MultiXy extends Pad {
case 'spring':
case 'pointSize':
case 'axisLock':
this.updatePadsAttr()
this.updatePadsAttr(options)
return
}

View file

@ -281,7 +281,11 @@ module.exports = class Xy extends Pad {
this.batchDraw()
return
case 'spring':
if (this.getProp('spring') && !this.touched) this.setValue([this.faders.x.getSpringValue(),this.faders.y.getSpringValue()], {...options})
if (this.getProp('spring') && !this.touched) {
var x = this.faders.x.getSpringValue(),
y = this.faders.y.getSpringValue()
if (x !== this.value[0] || y !== this.value[1]) this.setValue([x, y], {...options})
}
return
}