script: add optionnal send arg in scriptSend to prevent osc sending

This commit is contained in:
jean-emmanuel 2018-08-04 15:19:36 +02:00
parent 1e459ecc31
commit cbd5833c8e
2 changed files with 4 additions and 3 deletions

View file

@ -96,6 +96,7 @@
- `address` (`string`): a valid osc address
- `arg`: one or several osc arguments to be sent. The script's `preArgs` property is ignored
#### `set(id, value)`
#### `set(id, value, send)`
- `id` (`string`): a widget's id
- `value`: the widget's new value
- `send` (`boolean`): `true` by default, set to `false` to prevent osc sendings

View file

@ -50,7 +50,7 @@ class Script extends Widget {
}
static scriptSet(id, value) {
static scriptSet(id, value, send = true) {
var widgets = widgetManager.getWidgetById(id)
@ -58,7 +58,7 @@ class Script extends Widget {
return widgets[i].setValue(value, {
sync: true,
send: true
send: send
})
}