switch: log, doc and indentation fix
This commit is contained in:
parent
c544a37434
commit
69a4623dfd
3 changed files with 8 additions and 2 deletions
|
|
@ -9,6 +9,7 @@
|
|||
- widgets
|
||||
- inputs: **new** `keys` widget, for keyboard bindings
|
||||
- property inheritance: new special property name `_value` (retrieve the widget's value, and update when it changes)
|
||||
- switch: added `showValues` to display both values and labels in the buttons
|
||||
|
||||
## 0.22.0
|
||||
|
||||
|
|
|
|||
|
|
@ -78,7 +78,6 @@ Setting the `push`'s value externally (via osc) will toggle it's inner light.
|
|||
// etc
|
||||
}
|
||||
```
|
||||
|
||||
### `values`
|
||||
- type: `array|object`
|
||||
- default: `{"Value 1":1,"Value 2":2}`
|
||||
|
|
@ -86,6 +85,12 @@ Setting the `push`'s value externally (via osc) will toggle it's inner light.
|
|||
- `array` of possible values to switch between : `[1,2,3]`
|
||||
- `object` of `"label":value` pairs
|
||||
|
||||
### `showValues`
|
||||
- type: `boolean`
|
||||
- default: `false`
|
||||
- usage: if `values` is an `object`, set to `true` to display both values and labels instead of labels only
|
||||
|
||||
|
||||
## Dropdown
|
||||
```js
|
||||
{
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ module.exports = class Switch extends _widgets_base {
|
|||
|
||||
this.values = []
|
||||
|
||||
var isArray = Array.isArray(this.getProp('values'))
|
||||
var isArray = Array.isArray(this.getProp('values'))
|
||||
|
||||
for (var k in this.getProp('values')) {
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue