From 3318e9a31256ff91a03f51d9ac5f633027900a4e Mon Sep 17 00:00:00 2001 From: bordun Date: Thu, 19 Nov 2020 09:04:54 +0100 Subject: [PATCH] docs: update --- resources/docs/docs/widgets/properties-reference.md | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/resources/docs/docs/widgets/properties-reference.md b/resources/docs/docs/widgets/properties-reference.md index 7c83ddd1..cd42a00e 100644 --- a/resources/docs/docs/widgets/properties-reference.md +++ b/resources/docs/docs/widgets/properties-reference.md @@ -62,9 +62,9 @@ | --- | --- | --- | --- | |
address#
| `string` | "auto" | OSC address for sending / receiving messages, it must start with a slash (`/`)

By default ("auto"), the widget's id is used: `/widget_id` | |
preArgs#
| `*`|
`array` | "" | A value or array of values that will be prepended to the OSC messages. | - |
typeTags#
| `string` | "" | Defines the osc argument types, one letter per argument (including preArgs)
- If empty, the types are infered automatically from the values (with numbers casted to floats by default)
- If there are more arguments than type letters, the last type is used for the extra arguments

See http://opensoundcontrol.org/spec-1_0 for existing typetags | + |
typeTags#
| `string` | "" | Defines the osc argument types, one letter per argument (including preArgs)
- If empty, the types are infered automatically from the values (with numbers casted to floats by default)
- If there are more arguments than type letters, the last type is used for the extra arguments

See http://opensoundcontrol.org/spec-1_0 for existing typetags | |
decimals#
| `integer` | 2 | Defines the number of decimals to send. | - |
target#
| `string`|
`array`|
`null` | "" | This defines the targets of the widget's OSC messages
- A `string` or `array` of strings formatted as follow: `ip:port` or `["ip:port"]`
- If midi is enabled, targets can be `midi:device_name`
- If no target is set, messages can still be sent if the server has default targets | + |
target#
| `string`|
`array`|
`null` | "" | This defines the targets of the widget's OSC messages
- A `string` or `array` of strings formatted as follow: `ip:port` or `["ip:portA", "ip:portB"]`
- If midi is enabled, targets can be `midi:device_name`
- If no target is set, messages can still be sent if the server has default targets | |
ignoreDefaults#
| `boolean` | false | Set to `true` to ignore the server's default targets | |
bypass#
| `boolean` | false | Set to `true` to prevent the widget from sending any osc message | ## Basics @@ -100,7 +100,7 @@ | --- | --- | --- | --- | |
css#
| `string` | "" | CSS rules. See documentation.

Available css variables:
- `--color-background`: `colorBg`
- `--color-widget`: `colorWidget`
- `--color-fill`: `colorFill`
- `--color-stroke`: `colorStroke`
- `--color-text`: `colorText`
- `--widget-padding`: `padding`
- `--line-width`: `lineWidth`
- `--alpha-fill-on`: `alphaFillOn`
- `--alpha-fill-off`: `alphaFillOff`
- `--alpha-stroke`: `alphaStroke`
- `--color-text-on`: `colorTextOn` | |
colorTextOn#
| `string` | "auto" | Defines the widget's text color when active. | - |
layout#
| `string` | "vertical" | Choices: `vertical`, `horizontal`, `grid` | + |
layout#
| `string` | "vertical" | Defines how items should be laid out

Choices: `vertical`, `horizontal`, `grid` | |
gridTemplate#
| `string`|
`number` | "" | If `layout` is `grid`, can be either a number of columns of a value css grid-template definition. | === "switch" @@ -172,6 +172,7 @@ | property | type |default | description | | --- | --- | --- | --- | |
asYouType#
| `boolean` | false | Set to `true` to make the input send its value at each keystroke | + |
validation#
| `string` | "" | Regular expression: if the submitted value doesn't match the regular expression, it will be reset to the last valid value.

If leading and trailing slashes are omitted, they will be added automatically and the flag will be set to "gm"

Examples:
- `^[0-9]*$` accepts digits only, any number of them
- `/^[a-zs]{0,10}$/i` accept between 0 and 10 alphabetic characters and spaces (case insensitive) | ??? api "
file#
" File/Folder selector (server-side). @@ -239,6 +240,7 @@ | | `number`|
`percentage` | "80%" | Modal popup's size | | | `number`|
`percentage` | "auto" | Modal popup's position | | | `number`|
`percentage` | "auto" | Modal popup's position | + | | `boolean` | false | Set to `true` to make the modal's position relative to the button's position. | === "style" @@ -342,8 +344,9 @@ |
keys#
| `number` | 25 | Defines the number keys | |
start#
| `number` | 48 | MIDI note number to start with (default is C4)

Standard keyboards settings are: `[25, 48]`, `[49, 36]`, `[61, 36]`, `[88, 21]` | |
traversing#
| `boolean` | true | Set to `false` to disable traversing gestures | - |
on#
| `*` | 1 | 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) | - |
off#
| `*` | 0 | 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) | + |
on#
| `*` | 1 | Set to `null` to send send no argument in the osc message | + |
off#
| `*` | 0 | Set to `null` to send send no argument in the osc message | + |
velocity#
| `boolean` | false | Set to `true` to map the touch coordinates between `off` (top) and `on` (bottom). Requires `on` and `off` to be numbers | |
mode#
| `string` | "push" | Interraction mode:
- `push` (press & release)
- `toggle` (on/off switches)
- `tap` (no release)

Choices: `push`, `toggle`, `tap` | ??? api "
patchbay#
"