diff --git a/resources/docs/widgets-reference.md b/resources/docs/widgets-reference.md index ea12ca1b..9fa9b58a 100644 --- a/resources/docs/widgets-reference.md +++ b/resources/docs/widgets-reference.md @@ -452,7 +452,7 @@ | --- | --- | --- | --- | |

script

|||| |

condition

| `string` | 1 | When the widget receives a value, if this property return a falsy value, the script property won't be evaluated. If it's non-falsy, it will be evaluated normally. Formulas are given one extra variable in this context:
- `value`: the value received by the widget | -|

script

| `string` | "" | This property is evaluated each time the widget receives a value* if condition is non-falsy. Formulas are given extras variables in this context:
- `value`: the value received by the widget
- `send(target, address, arg1, arg2, ...)`: function for sending osc messages (ignores the script's targets and the server's defaults unless `target` is `false`; ignores the script's `preArgs`)
- `set(id, value)`: function for setting a widget's value



* Note: `value` or `linkId` can be used to receive other widgets' values | +|

script

| `string` | "" | This property is evaluated each time the widget receives a value* if condition is non-falsy. Formulas are given extras variables in this context:
- `value`: the value received by the widget
- `send(target, address, arg1, arg2, ...)`: function for sending osc messages (ignores the script's targets and the server's defaults unless `target` is `false`; ignores the script's `preArgs`)
- `set(id, value)`: function for setting a widget's value



* Note: `value` or `linkId` properties can be used to receive other widgets' values | ### gyroscope diff --git a/src/client/app/widgets/inputs/script.js b/src/client/app/widgets/inputs/script.js index c7620c88..a9965cc9 100644 --- a/src/client/app/widgets/inputs/script.js +++ b/src/client/app/widgets/inputs/script.js @@ -22,7 +22,7 @@ class Script extends Widget { '- `value`: the value received by the widget', '- `send(target, address, arg1, arg2, ...)`: function for sending osc messages (ignores the script\'s targets and the server\'s defaults unless `target` is `false`; ignores the script\'s `preArgs`)', '- `set(id, value)`: function for setting a widget\'s value', - '', '* Note: `value` or `linkId` can be used to receive other widgets\' values' + '', '* Note: `value` or `linkId` properties can be used to receive other widgets\' values' ]} })