keyboards: toggles options (#520)
This commit is contained in:
parent
2f3516812e
commit
7bcb9dc331
2 changed files with 4 additions and 1 deletions
|
|
@ -5,6 +5,8 @@
|
|||
- bug fixes
|
||||
- image: `cache` option inverted
|
||||
- image: allow whitespaces in url
|
||||
- widgets
|
||||
- keyboard: `toggles` options
|
||||
|
||||
## 0.45.6
|
||||
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@ module.exports = class Keyboard extends _matrix_base {
|
|||
'Set to `null` to send send no argument in the osc message',
|
||||
'Can be an `object` if the type needs to be specified (see preArgs)'
|
||||
]},
|
||||
toggles: {type: 'boolean', value: false, help: 'Set to `true` to make keys bahave like toggle buttons'}
|
||||
|
||||
}, ['_value', 'default', 'value'], {
|
||||
|
||||
|
|
@ -68,7 +69,7 @@ module.exports = class Keyboard extends _matrix_base {
|
|||
var data = JSON.parse(strData)
|
||||
|
||||
data.top = data.left = data.height = data.width = 'auto'
|
||||
data.type = 'push'
|
||||
data.type = this.getProp('toggles') ? 'toggle' : 'push'
|
||||
data.id = this.getProp('id') + '/' + i
|
||||
data.label = false
|
||||
data.css = ''
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue