encoder: fix 0 value for back property (& fix default release value)
This commit is contained in:
parent
a459ec0f0a
commit
1aa6b7d8d8
2 changed files with 4 additions and 2 deletions
|
|
@ -6,6 +6,7 @@
|
|||
- midi: `path` option not applied to launcher's `list` contextual action
|
||||
- midi: pitchbend messages not received correctly
|
||||
- style: layout issues in recent chromium
|
||||
- encoder: `0` value in `back` property not working
|
||||
|
||||
## 0.47.1
|
||||
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ module.exports = class Encoder extends Widget {
|
|||
ticks: {type: 'number', value: 360, help: 'defines the granularity / verbosity of the encoder (number of step for a 360° arc)'},
|
||||
back: {type: '*', value: -1, help: 'Defines which value is sent when rotating the encoder anticlockwise'},
|
||||
forth: {type: '*', value: 1, help: 'Defines which value is sent when rotating the encoder clockwise'},
|
||||
release: {type: 'number', value: 'auto', help: [
|
||||
release: {type: 'number', value: '', help: [
|
||||
'Defines which value is sent when releasing the encoder:',
|
||||
'- Set to `null` to send send no argument in the osc message',
|
||||
'- Can be an `object` if the type needs to be specified'
|
||||
|
|
@ -127,7 +127,8 @@ module.exports = class Encoder extends Widget {
|
|||
direction = this.getProp('forth')
|
||||
|
||||
|
||||
if (direction && (Math.round(value) != Math.round(this.previousValue))) this.setValue(direction, {sync:true, send:true, dragged: e.options.dragged, draginit: e.options.draginit})
|
||||
if (direction !== undefined && (Math.round(value) != Math.round(this.previousValue))) this.setValue(direction, {sync:true, send:true, dragged: e.options.dragged, draginit: e.options.draginit})
|
||||
|
||||
this.previousValue = value
|
||||
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue