cripting: send(): ignore ignoreDefaults property

This commit is contained in:
jean-emmanuel 2022-04-02 15:29:06 +02:00
parent adaf42bb61
commit 753a6d5128
3 changed files with 4 additions and 3 deletions

View file

@ -4,6 +4,7 @@
- bug fixes
- range: value update issue (internal touch state not updated properly)
- scripting: send(): ignore `ignoreDefaults` property
## 1.15.7

View file

@ -161,7 +161,7 @@ Sets the value of a widget's custom variable (see [advanced syntaxes](./advanced
----
#### `send(target, address, ...args)`
- `target` (optional): `"ip:port"` or `"midi:device_name"` string. If omitted, the widget's target will be used.
- `target` (optional): `"ip:port"` or `"midi:device_name"` string. If omitted, the widget's target (or the server's defaults) will be used.
- `address`: osc address, must start with a `/`
- `args`: values or `{type: "OSC_TYPE_LETTER", value: VALUE}` objects
@ -169,7 +169,7 @@ Sends an osc message.
If the event that triggered the script's execution was not initiated by a user interaction, this function will have no effect.
This function ignores the widget's `bypass` property.
This function ignores the widget's `bypass` and `ignoreDefaults` properties.
??? infos "Examples"
```javascript

View file

@ -364,7 +364,7 @@ class Widget extends EventEmitter {
v: this.getValue(true),
}
if (this.getProp('ignoreDefaults')) data.i = 1
if (this.getProp('ignoreDefaults') && !options.force) data.i = 1
if (overrides) {
for (var k in overrides) {