From 22a85de1b24e19e5aa2544c3ca0021f013ced62b Mon Sep 17 00:00:00 2001 From: bordun Date: Fri, 31 Jan 2020 13:34:54 +0100 Subject: [PATCH] docs: update property syntax docs & widget reference --- .../docs/docs/advanced-property-syntax.md | 65 ++- resources/docs/docs/credits.md | 2 +- resources/docs/docs/widgets-reference.md | 402 +++++++++++++----- resources/mkdocs.yml | 1 + resources/src/scss/styles.scss | 42 ++ scripts/build-widgets-reference.js | 35 +- src/client/app/widgets/buttons/dropdown.js | 7 + src/client/app/widgets/buttons/menu.js | 2 +- src/client/app/widgets/buttons/push.js | 9 +- src/client/app/widgets/buttons/switch.js | 6 + src/client/app/widgets/buttons/toggle.js | 6 + src/client/app/widgets/plots/html.js | 7 + src/client/app/widgets/plots/led.js | 6 + src/client/app/widgets/plots/rgbled.js | 6 + src/client/app/widgets/plots/svg.js | 6 + src/client/app/widgets/sliders/fader.js | 6 + src/client/app/widgets/sliders/knob.js | 6 + 17 files changed, 454 insertions(+), 160 deletions(-) diff --git a/resources/docs/docs/advanced-property-syntax.md b/resources/docs/docs/advanced-property-syntax.md index a6457cc1..e2d6eb40 100644 --- a/resources/docs/docs/advanced-property-syntax.md +++ b/resources/docs/docs/advanced-property-syntax.md @@ -1,33 +1,20 @@ # Advanced property syntax -## Inheritance: `@{}` +## Inheritance: `@{id.property}` -Widgets can use each other's property values by using the following syntaxes: +Widgets can use each other's properties values and update automatically when they change by using this syntax. -- `@{this.propertyName}` -- `@{parent.propertyName}` -- `@{widgetId.propertyName}` (where `widgetId` is the target widget's `id`) +- `id`: the target widget's `id` +- `property`: is the target widget's property name -!!! note - Don't use `widgetId` when targetting `this` or `parent`, it won't work. -`propertyName` can be any of the target widget's properties. +#### Value -It can be used to: +The property name (and the dot) can be omitted and defaults to `value` (`@{widgetId}` => `@{widgetId.value}`). `value` always resolves to the target widget's current value, not its `value` property -- concatenate strings: `/@{parent.id}/some_suffix` -- define object value: `["@{parent.id}"]` +#### `this` & `parent` -If the retreived property is an object (`[] / {}`), a subset can be defined by appending a dot and a key (array index or object key) : `@{parent.variables.key}` - -!!! note "" - The root panel's `id` is `root`. - -#### Using the value - -The special property name `value` refers to a widget's current value (which can be affected by its `value` *property*). - -When omitted, the property name defaults to `value` : `@{widgetId}` => `@{widgetId.value}` +A widget can fetch its own properties or its direct parent's by using the keywords `this` or `parent` instead of `id`. When `this` or `parent` can be used, using the target widget's `id` instead won't work. #### Dynamic properties @@ -41,49 +28,47 @@ Some properties have much cheaper update routines and can be considered as `dyna - container widgets can inherit their children's properties only to define `dynamic` properties - widgets can inherit their own `value` property only to define `dynamic` properties +#### Object properties + +If the retreived property is an object (`{}`) or an array (`[]`), a subset can be retreived directly by appending a dot and a key (array index or object key) : `@{parent.variables.key}` + #### Nesting The inheritance syntax supports 1-level nesting : `@{fader_@{toggle_1}}` -## OSC listeners: `OSC{}` -The following syntax allows listening on an osc address to define a property, with an optionnal default value : +## OSC listeners: `OSC{address, default, usePreArgs}` -``` -OSC{/address, 1} -``` -Will return `1` at first and listen for osc messages on address `/address [preArgs]`. Each time a value is received, the property will be updated. +This syntax allows listening on an osc address to define a property. + +- `address`: osc address to listen to; if the leading slash (`/`) is omitted, the address will be prefixed with the widget's `address` property +- `default` (optional): default value returned before any message is received +- `usePreArgs` (optional): by default, osc listeners inherit the widget's `preArgs` and (these must be matched for the osc messages to be processed). Set to `false` bypass them. -If the leading slash (`/`) is omitted, the address will be prefixed with the widget's `address` property: +#### Dynamic address -``` -OSC{color, "auto"} -``` -Will listen for osc messages on address `/widget_address/color [preArgs]`. ----- +The `address` can contain `@{}` blocks -By default, osc listeners inherit the widget's `preArgs` and (these must be matched for the osc messages to be processed). This can be bypassed by appending a third argument to the constructor: -``` -OSC{color, "auto", false} -``` -## Javascript: `JS{{}}` +## Javascript: `JS{{ }}` -This syntax allows writing formulas in pure javascript. The code will be compiled as a function and executed a restricted context. +This syntax allows writing formulas in pure javascript. The code will be compiled as a function and executed in a restricted context. - if no `return` statement is found, the formula will return an empty string - javascript [strict mode](https://developer.mozilla.org/fr/docs/Web/JavaScript/Reference/Strict_mode) is always enabled - `setTimeout` and `setInterval` functions are not available - the `global` object is shared between all javascript formulas (changing its properties *does not* trigger any synchronisation even if the value is used somewhere else) +In this context, `@{} / OSC{}` are seen as variables, not as the value they hold, + ## Formulas: `#{}` !!! warning "Deprecated" - This syntax is deprecated and will be removed in the future. Use the javascript syntax instead. + This syntax is now deprecated and will be removed in the future, sessions using it will be working for a few more versions but users are strongly encouraged to migrate to the javascript syntax. The following syntax allow writing mathematical formulas in widgets' properties: diff --git a/resources/docs/docs/credits.md b/resources/docs/docs/credits.md index 01585624..f19ae400 100644 --- a/resources/docs/docs/credits.md +++ b/resources/docs/docs/credits.md @@ -1,6 +1,6 @@ ## License -Copyleft © Jean-Emmanuel Doucet @ [AMMD](http://ammd.net) 2018. +Copyleft © Jean-Emmanuel Doucet @ [AMMD](http://ammd.net) 2014-2020. This program is a free software released under the [GNU/GPL3](https://github.com/jean-emmanuel/open-stage-control/blob/master/LICENSE) license. ## Dependencies diff --git a/resources/docs/docs/widgets-reference.md b/resources/docs/docs/widgets-reference.md index b9071df0..46098d23 100644 --- a/resources/docs/docs/widgets-reference.md +++ b/resources/docs/docs/widgets-reference.md @@ -1,6 +1,11 @@ -## Generic properties +# Widget reference + +
+ + +
Properties shared by all widgets
| property | type |default | description | | --- | --- | --- | --- | @@ -24,13 +29,15 @@ |

address#

| `string` | "auto" | OSC address for sending messages, it must start with a / | |

preArgs#

| `*`|
`array` | "" | A value or array of values that will be prepended to the OSC messages.

Values can be defined as objects if the osc type tag needs to be specified: `{type: "i", value: 1}` | |

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`
- The special item `"self"` can be used to refer to the emitting client directly.
- If no target is set, messages can still be sent if the server has default targets
- The server's default targets can be bypassed by setting one of the items to `null` | -|

bypass#

| `boolean` | false | Set to `true` to prevent the widget from sending any osc message | +|

bypass#

| `boolean` | false | Set to `true` to prevent the widget from sending any osc message |
## Sliders -### fader +
+ +
Vertical / horizontal slider.
| property | type |default | description | | --- | --- | --- | --- | @@ -55,12 +62,16 @@ |

origin#

| `number` | "auto" | Defines the starting point's value of the fader's gauge | |

osc#

|||| |

touchAddress#

| `string` | "" | OSC address for touched state messages: `/touchAddress [preArgs] 0/1` | -|

meterAddress#

| `string` | "" | OSC address for the built-in meter | - -### knob +|

meterAddress#

| `string` | "" | OSC address for the built-in meter |
+ +
+ + +
Rotative knob slider.
+ | property | type |default | description | | --- | --- | --- | --- | |

style#

|||| @@ -81,11 +92,15 @@ |

unit#

| `string` | "" | Unit will be appended to the displayed widget's value (it doesn't affect osc messages) | |

origin#

| `number` | "auto" | Defines the starting point's value of the knob's gauge | |

osc#

|||| -|

touchAddress#

| `string` | "" | OSC address for touched state messages: `/touchAddress [preArgs] 0/1` | +|

touchAddress#

| `string` | "" | OSC address for touched state messages: `/touchAddress [preArgs] 0/1` |
-### encoder -A knob that sends a relative direction infomation instead of an absolute value. + + +
+ + +
A knob that sends a relative direction infomation instead of an absolute value.
| property | type |default | description | | --- | --- | --- | --- | @@ -98,11 +113,15 @@ A knob that sends a relative direction infomation instead of an absolute value. |

snap#

| `boolean` | false | By default, dragging the widget will modify it's value starting from its last value. Setting this to `true` will make it snap directly to the mouse/touch position | |

doubleTap#

| `boolean` | false | Set to `true` to make the fader reset to its `default` value when receiving a double tap.

Can also be an osc address, in which case the widget will just send an osc message (`/ `) | |

osc#

|||| -|

touchAddress#

| `string` | "" | OSC address for touched state messages: `/touchAddress [preArgs] 0/1` | +|

touchAddress#

| `string` | "" | OSC address for touched state messages: `/touchAddress [preArgs] 0/1` |
-### range -A fader with two heads for setting a range. + + +
+ + +
A fader with two heads for setting a range.
| property | type |default | description | | --- | --- | --- | --- | @@ -121,13 +140,17 @@ A fader with two heads for setting a range. |

sensitivity#

| `number` | 1 | See fader's `sensitivity` | |

osc#

|||| |

touchAddress#

| `string` | "" | See fader's `touchAddress` | -|

split#

| `boolean`|
`object` | false | Set to `true` to send separate osc messages for `low` and `high` handles. The `address` will be the same as the widget's with `/low` or `/high` appended to it

Can be set as an object to specify a different `address` : `['/osc_address_low', '/osc_address_high']`

Note: the widget will only respond to its original osc address, not to the splitted version | +|

split#

| `boolean`|
`object` | false | Set to `true` to send separate osc messages for `low` and `high` handles. The `address` will be the same as the widget's with `/low` or `/high` appended to it

Can be set as an object to specify a different `address` : `['/osc_address_low', '/osc_address_high']`

Note: the widget will only respond to its original osc address, not to the splitted version |
+ + ## Buttons -### toggle +
+ +
On / off button.
| property | type |default | description | | --- | --- | --- | --- | @@ -135,44 +158,60 @@ A fader with two heads for setting a range. |

doubleTap#

| `boolean` | false | Set to `true` to make the button require a double tap to be toggled instead of a single tap | |

led#

| `boolean` | false | Set to `true` to display the toggle's state with a led | |

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) | - -### push +|

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 / off button that turns off when released.
+ | property | type |default | description | | --- | --- | --- | --- | |

push#

|||| |

doubleTap#

| `boolean` | false | Set to `true` to make the button require a double tap to be pushed instead of a single tap | |

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) | -|

norelease#

| `boolean` | false | Set to `true` to prevent sending any osc message when releasing the button | - -### switch +|

norelease#

| `boolean` | false | Set to `true` to prevent sending any osc message when releasing the button |
+ +
+ + +
Value selector button.
+ | property | type |default | description | | --- | --- | --- | --- | |

switch#

|||| |

horizontal#

| `boolean` | false | Set to `true` to display values horizontally | |

showValues#

| `boolean` | false | If values is an object, set to `true` to display both values and labels instead of labels only | |

values#

| `array`|
`object` | {
 "Value 1": 1,
 "Value 2": 2
}
| `Array` of possible values to switch between : `[1,2,3]`

`Object` of `"label":value` pairs. Numeric labels must be prepended or appended with a white space (or any other non-numeric character) otherwise the order of the values won't be kept | -|

traversing#

| `boolean` | true | Set to `false` to disable traversing gestures | - -### dropdown +|

traversing#

| `boolean` | true | Set to `false` to disable traversing gestures |
+ +
+ + +
Native dropdown menu.
+ | property | type |default | description | | --- | --- | --- | --- | | |||| -| | `array`|
`object` | {
 "Value 1": 1,
 "Value 2": 2
}
| `Array` of possible values to switch between : `[1,2,3]`

`Object` of label:value pairs. Numeric labels must be prepended or appended with a white space (or any other non-numeric character) otherwise the order of the values won't be kept

An empty option will always be prepended to values (sends an osc message without any value); it can be hidden by adding `option:first-child{display:none}` to the widget's `css` | +| | `array`|
`object` | {
 "Value 1": 1,
 "Value 2": 2
}
| `Array` of possible values to switch between : `[1,2,3]`

`Object` of label:value pairs. Numeric labels must be prepended or appended with a white space (or any other non-numeric character) otherwise the order of the values won't be kept

An empty option will always be prepended to values (sends an osc message without any value); it can be hidden by adding `option:first-child{display:none}` to the widget's `css` |
-### menu -Drag and drop menu with a circular layout + + +
+ + +
Drag and drop menu with a circular or grid layout.
| property | type |default | description | | --- | --- | --- | --- | @@ -184,13 +223,17 @@ Drag and drop menu with a circular layout | | `boolean` | false | Set to `true` to make the menu stay opened after mouse/touch release | | | `boolean` | false | Set to `true` to make the menu require a double tap to be opened instead of a single tap | | | `array`|
`object` | {
 "Value 1": 1,
 "Value 2": 2
}
| `Array` of possible values to switch between : `[1,2,3]`

`Object` of label:value pairs. Numeric labels must be prepended or appended with a white space (or any other non-numeric character) otherwise the order of the values won't be kept | -| | `array` | "" | `Array` of `number` defining the weights of each value in `values`

Ignored when `grid` is `true` | +| | `array` | "" | `Array` of `number` defining the weights of each value in `values`

Ignored when `grid` is `true` |
+ + ## Pads -### xy -Two-dimensional slider. +
+ + +
Two-dimensional slider.
| property | type |default | description | | --- | --- | --- | --- | @@ -210,11 +253,15 @@ Two-dimensional slider. |

sensitivity#

| `number` | 1 | Defines the pad's sensitivity when `snap` is `false` | |

osc#

|||| |

touchAddress#

| `string` | "" | OSC address for touched state messages: `/touchAddress [preArgs] 0/1`) | -|

split#

| `boolean`|
`object` | false | Set to `true` to send separate osc messages for each point's x and y axis. The address will be the same as the widget's with `/x` or `/y` appended to it

Can be set as an `object` to specify a different address : ['/osc_address_x', '/osc_address_y']

Note: the widget will only respond to its original osc address, not to the splitted version | +|

split#

| `boolean`|
`object` | false | Set to `true` to send separate osc messages for each point's x and y axis. The address will be the same as the widget's with `/x` or `/y` appended to it

Can be set as an `object` to specify a different address : ['/osc_address_x', '/osc_address_y']

Note: the widget will only respond to its original osc address, not to the splitted version |
-### rgb -Color picker with optional alpha slider. + + +
+ + +
Color picker with optional alpha slider.
| property | type |default | description | | --- | --- | --- | --- | @@ -225,11 +272,15 @@ Color picker with optional alpha slider. |

input#

| `boolean` | true | Set to `false` to hide the built-in input widget | |

alpha#

| `boolean` | false | Set to `true` to enable alpha channel | |

osc#

|||| -|

split#

| `boolean`|
`object` | false | Set to `true` to send separate osc messages for for r and g & b. The address will be the same as the widget's with `/r`, `/g` or `/b` appended to it

Can be set as an `object` to specify a different address : `['/r', '/g', 'b']`

Note: the widget will only respond to its original osc address, not to the splitted version | +|

split#

| `boolean`|
`object` | false | Set to `true` to send separate osc messages for for r and g & b. The address will be the same as the widget's with `/r`, `/g` or `/b` appended to it

Can be set as an `object` to specify a different address : `['/r', '/g', 'b']`

Note: the widget will only respond to its original osc address, not to the splitted version |
-### multixy -Multi-point XY pad. + + +
+ + +
Multi-point XY pad.
| property | type |default | description | | --- | --- | --- | --- | @@ -249,13 +300,17 @@ Multi-point XY pad. |

sensitivity#

| `number` | 1 | Defines the pad's sensitivity when `snap` is `false` | |

osc#

|||| |

touchAddress#

| `string` | "" | OSC address for touched state messages: `/touchAddress [preArgs] 0/1` | -|

split#

| `boolean`|
`object` | false | Set to `true` to send separate osc messages for each point's x and y axis. The address will be the same as the widget's with `/N/x` or `/N/y` appended to it, where N is the point's id (or the point's label if points is an array)

Can be set as an `object` to specify a different address : `['/0/x', '/0/y', '/1/x', '/2/y']`

Note: the widget will only respond to its original osc address, not to the splitted version | +|

split#

| `boolean`|
`object` | false | Set to `true` to send separate osc messages for each point's x and y axis. The address will be the same as the widget's with `/N/x` or `/N/y` appended to it, where N is the point's id (or the point's label if points is an array)

Can be set as an `object` to specify a different address : `['/0/x', '/0/y', '/1/x', '/2/y']`

Note: the widget will only respond to its original osc address, not to the splitted version |
+ + ## Matrices -### matrix -Generic matrix for creating rows/columns of widgets. +
+ + +
Generic matrix for creating rows/columns of widgets.
| property | type |default | description | | --- | --- | --- | --- | @@ -266,11 +321,15 @@ Generic matrix for creating rows/columns of widgets. |

spacing#

| `integer` | 0 | Adds space between widgets | |

traversing#

| `boolean` | true | Set to `false` to disable traversing gestures | |

border#

| `boolean` | true | Set to `false` to disables the widgets' borders | -|

props#

| `object` | {} | Defines a set of property to override the widgets' defaults.

Formulas in this field are resolved with an extra variable representing each widget's index: `$`

Note: by default, the widgets inherit from the matrix' `id` and osc properties (`id` and `address` are appended with `/$`) | +|

props#

| `object` | {} | Defines a set of property to override the widgets' defaults.

Formulas in this field are resolved with an extra variable representing each widget's index: `$`

Note: by default, the widgets inherit from the matrix' `id` and osc properties (`id` and `address` are appended with `/$`) |
-### keyboard -Piano keyboard. + + +
+ + +
Piano keyboard.
| property | type |default | description | | --- | --- | --- | --- | @@ -284,11 +343,15 @@ Piano keyboard. |

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) | |

toggles#

| `boolean` | false | Set to `true` to make keys bahave like toggle buttons | |

osc#

|||| -|

split#

| `boolean`|
`string` | false | `true`: the widget's index will be appended to the matrice's osc address

`false`: it will be prepended to the widget's preArgs

`string`: will be used to define the widgets' addresses, replacing dollar signs (`$`) with their respective index (to insert the actual dollar sign, it must be escaped with a backslash (`\$`)) | +|

split#

| `boolean`|
`string` | false | `true`: the widget's index will be appended to the matrice's osc address

`false`: it will be prepended to the widget's preArgs

`string`: will be used to define the widgets' addresses, replacing dollar signs (`$`) with their respective index (to insert the actual dollar sign, it must be escaped with a backslash (`\$`)) |
-### patchbay -Connect inputs to outputs. + + +
+ + +
Connect inputs to outputs.
| property | type |default | description | | --- | --- | --- | --- | @@ -296,13 +359,17 @@ Connect inputs to outputs. |

css#

| `string` | "" | The inputs/ouputs width can be adjusted by using the `.nodes` selector:

`.nodes { width: 25% }` | |

patchbay#

|||| |

inputs#

| `array`|
`object` | [
 "input_1",
 "input_2"
]
| - `Array` of input names : `['input_1', 'input_2']`
- `Object` of `"label_1": "input_1"` pairs. Numeric labels must be prepended or appended with a white space (or any other non-numeric character) otherwise the order of the values won't be kept



Patchbay inputs can be connected to one or more outputs and will send messages of the following form when they are connected/disconnected:

`/patchbay_address input_x output_x output_y etc`

If no output is connected to the input, the message will be `/patchbay_address input_x`

The inputs values can be consumed with the property inheritance syntax: `@{patchbay_id/input_1}` returns an array of output names connected to `input_1` | -|

outputs#

| `array`|
`object` | [
 "output_1",
 "output_2"
]
| List of output values the inputs can connect to (see `inputs`). | +|

outputs#

| `array`|
`object` | [
 "output_1",
 "output_2"
]
| List of output values the inputs can connect to (see `inputs`). |
+ + ## Plots -### plot -XY coordinates plot. +
+ + +
XY coordinates plot.
| property | type |default | description | | --- | --- | --- | --- | @@ -317,11 +384,15 @@ XY coordinates plot. |

smooth#

| `boolean`|
`number` | false | Set to `true` to make the line smooth. Float values are also acceptable (works fine between `0` and `0.5`) | |

pips#

| `boolean` | true | Set to `false` to hide the scale | |

value#

|||| -|

value#

| `array`|
`string` | "" | - `Array` of `y` values
- `Array` of `[x, y]` `array` values
- `String` `array`
- `String` `object` to update specific coordinates only: `{0:1, 4:0}` will change the 1st and 5th points' coordinates | +|

value#

| `array`|
`string` | "" | - `Array` of `y` values
- `Array` of `[x, y]` `array` values
- `String` `array`
- `String` `object` to update specific coordinates only: `{0:1, 4:0}` will change the 1st and 5th points' coordinates |
-### eq -Draws frequency response between from from an array of filter objects. + + +
+ + +
Draws frequency response between from from an array of filter objects.
| property | type |default | description | | --- | --- | --- | --- | @@ -333,11 +404,15 @@ Draws frequency response between from from an array of filter objects. |

logScaleX#

| `boolean`|
`number` | false | Set to `true` to use logarithmic scale for the x axis (base 10). Set to a `number` to define the logarithm's base. | |

smooth#

| `boolean`|
`number` | false | Set to `true` to make the line smooth. Float values are also acceptable (works fine between `0` and `0.5`) | |

value#

|||| -|

value#

| `array` | "" | Each item must be an object with the following properties
- `type`: string ("highpass", "highshelf", "lowpass", "lowshelf", "peak" or "notch")
- `freq`: number (filter's resonant frequency)
- `q`: number (Q factor)
- `gain`: number
- `on`: boolean | +|

value#

| `array` | "" | Each item must be an object with the following properties
- `type`: string ("highpass", "highshelf", "lowpass", "lowshelf", "peak" or "notch")
- `freq`: number (filter's resonant frequency)
- `q`: number (Q factor)
- `gain`: number
- `on`: boolean |
-### visualizer -Display its value over time. + + +
+ + +
Display its value over time.
| property | type |default | description | | --- | --- | --- | --- | @@ -347,30 +422,42 @@ Display its value over time. |

origin#

| `number` | "auto" | Defines the y axis origin. Set to `false` to disable it | |

logScale#

| `boolean`|
`number` | false | Set to `true` to use logarithmic scale for the y axis (base 10). Set to a `number` to define the logarithm's base. | |

smooth#

| `boolean`|
`number` | false | Set to `true` to make the line smooth. Float values are also acceptable (works fine between `0` and `0.5`) | -|

pips#

| `boolean` | true | Set to `false` to hide the scale | - -### led +|

pips#

| `boolean` | true | Set to `false` to hide the scale |
+ +
+ + +
Intensity display.
+ | property | type |default | description | | --- | --- | --- | --- | |

led#

|||| |

range#

| `object` | {
 "min": 0,
 "max": 1
}
| Value to led intensity mapping range | -|

logScale#

| `boolean`|
`number` | false | Set to `true` to use logarithmic scale (base 10). Set to a `number` to define the logarithm's base. | - -### rgbled +|

logScale#

| `boolean`|
`number` | false | Set to `true` to use logarithmic scale (base 10). Set to a `number` to define the logarithm's base. |
+ +
+ + +
Rgb / rgba color display
+ | property | type |default | description | | --- | --- | --- | --- | |

value#

|||| -|

value#

| `array`|
`string` | "" | - `Array`: `[r, g, b]` (`r`, `g` and `b` between `0` and `255`)
- `Array`: `[r, g, b, alpha]` (`alpha` between `0` and `255`)
- `String`: CSS color | +|

value#

| `array`|
`string` | "" | - `Array`: `[r, g, b]` (`r`, `g` and `b` between `0` and `255`)
- `Array`: `[r, g, b, alpha]` (`alpha` between `0` and `255`)
- `String`: CSS color |
-### meter -Non-interactable fader. + + +
+ + +
Non-interactable fader.
| property | type |default | description | | --- | --- | --- | --- | @@ -385,22 +472,30 @@ Non-interactable fader. |

horizontal#

| `boolean` | false | See fader's `horizontal` | |

pips#

| `boolean` | false | See fader's `pips` | |

dashed#

| `boolean` | false | See fader's `dashed` | -|

gradient#

| `array`|
`object` | [] | When set, the meter's gauge will be filled with a linear color gradient
- each item must be a CSS color string.
- as an `object`: each key must be a number between 0 and 1
- each item must be a CSS color string.

Examples: `['blue', 'red']`, {'0': 'blue', '0.9': 'blue', '1': 'red'} | +|

gradient#

| `array`|
`object` | [] | When set, the meter's gauge will be filled with a linear color gradient
- each item must be a CSS color string.
- as an `object`: each key must be a number between 0 and 1
- each item must be a CSS color string.

Examples: `['blue', 'red']`, {'0': 'blue', '0.9': 'blue', '1': 'red'} |
-### text -Display text. + + +
+ + +
Display text.
| property | type |default | description | | --- | --- | --- | --- | |

text#

|||| |

vertical#

| `boolean` | false | Set to `true` to display the text vertically | |

wrap#

| `boolean` | false | Set to `true` to wrap long lines automatically.

This will not break overflowing words by default, word-breaking can be enabled by adding `word-break: break-all;` to the `css` property | -|

align#

| `string` | "" | Set to `left` or `right` to change text alignment (otherwise center) | +|

align#

| `string` | "" | Set to `left` or `right` to change text alignment (otherwise center) |
-### image -Load a image (url or base64-encoded). + + +
+ + +
Load a image (url or base64-encoded).
| property | type |default | description | | --- | --- | --- | --- | @@ -411,31 +506,43 @@ Load a image (url or base64-encoded). |

border#

| `boolean` | true | Set to `false` to disable the borders and background-color | |

cache#

| `boolean` | true | Set to false to disable image caching (forces file reload when updating or editing the widget).

When true, sending `reload` to the widget reloads its image without changing its value | |

value#

|||| -|

value#

| `string` | "" | - File `url` or `path` (relative to the session file location by default, falling back to absolute path)
- Base64 encoded image : `data:image/...` | - -### svg +|

value#

| `string` | "" | - File `url` or `path` (relative to the session file location by default, falling back to absolute path)
- Base64 encoded image : `data:image/...` |
+ +
+ + +
Svg parser.
+ | property | type |default | description | | --- | --- | --- | --- | |

svg#

|||| |

svg#

| `string` | "" | Svg xml definition:
- will be wrapped in a `< svg />` element
- `` commands support a special percent notation (`%x` and `%y`) | -|

border#

| `boolean` | true | Set to `false` to disable the borders and background-color | - -### html +|

border#

| `boolean` | true | Set to `false` to disable the borders and background-color |
+ +
+ + +
Simple HTML parser.
+ | property | type |default | description | | --- | --- | --- | --- | |

html#

|||| |

html#

| `string` | "" | Allowed HTML tags:

  h1-6, blockquote, p, a, ul, ol, nl, li,

  b, i, strong, em, strike, code, hr, br, div,

  table, thead, img, caption, tbody, tr, th, td, pre | -|

border#

| `boolean` | true | Set to `false` to disable the borders and background-color | +|

border#

| `boolean` | true | Set to `false` to disable the borders and background-color |
-### frame -Embed a page in a frame (local network only). + + +
+ + +
Embed a page in a frame (local network only).
| property | type |default | description | | --- | --- | --- | --- | @@ -444,13 +551,17 @@ Embed a page in a frame (local network only). |

frame#

|||| |

border#

| `boolean` | true | Set to `false` to disable the borders and background-color | |

value#

|||| -|

value#

| `string` | "" | External web page URL. Only local URLs are allowed (starting with `http://127.0.0.1/`, `http://10.x.x.x/`, `http://192.168.x.x/`, etc) | +|

value#

| `string` | "" | External web page URL. Only local URLs are allowed (starting with `http://127.0.0.1/`, `http://10.x.x.x/`, `http://192.168.x.x/`, etc) |
+ + ## Containers -### panel -Widgets or Tabs container. +
+ + +
Widgets or Tabs container.
| property | type |default | description | | --- | --- | --- | --- | @@ -462,11 +573,15 @@ Widgets or Tabs container. |

children#

|||| |

variables#

| `*` | "@{parent.variables}" | Defines one or more arbitrary variables that can be inherited by children widgets | |

widgets#

| `array` | [] | Each element of the array must be a widget object. A panel cannot contain widgets and tabs simultaneously. | -|

tabs#

| `array` | [] | Each element of the array must be a tab object. A panel cannot contain widgets and tabs simultaneously | +|

tabs#

| `array` | [] | Each element of the array must be a tab object. A panel cannot contain widgets and tabs simultaneously |
-### strip -Widget container that display its children in a single column or row. + + +
+ + +
Widget container that display its children in a single column or row.
| property | type |default | description | | --- | --- | --- | --- | @@ -478,11 +593,15 @@ Widget container that display its children in a single column or row. |

spacing#

| `integer`|
`percentage` | 0 | Adds space between widgets. Percents are always relative to the strips width | |

children#

|||| |

variables#

| `*` | "@{parent.variables}" | Defines one or more arbitrary variables that can be inherited by children widgets | -|

widgets#

| `array` | [] | Each element of the array must be a widget object
- By default, children widgets that don't have an explicit `width`/`height` set will be shrinked to respect the sizes specified by others
- Adding `flex:1;` to a children's `css` will give it the ability the fill the remaining space
- Multiple children can have a `flex:x;` css property (`x` will ponderate their expansion) | +|

widgets#

| `array` | [] | Each element of the array must be a widget object
- By default, children widgets that don't have an explicit `width`/`height` set will be shrinked to respect the sizes specified by others
- Adding `flex:1;` to a children's `css` will give it the ability the fill the remaining space
- Multiple children can have a `flex:x;` css property (`x` will ponderate their expansion) |
-### modal -A toggle button that opens a popup panel. Cannot contain tabs directly. + + +
+ + +
A toggle button that opens a popup panel. Cannot contain tabs directly.
| property | type |default | description | | --- | --- | --- | --- | @@ -498,24 +617,32 @@ A toggle button that opens a popup panel. Cannot contain tabs directly. | | `integer` | "" | Defines the modal's state:`0` for closed, `1` for opened | | |||| | | `*` | "@{parent.variables}" | Defines one or more arbitrary variables that can be inherited by children widgets | -| | `array` | [] | Each element of the array must be a widget object | +| | `array` | [] | Each element of the array must be a widget object |
-### clone -Widget replication with overridable properties. + + +
+ + +
Widget replication with overridable properties.
| property | type |default | description | | --- | --- | --- | --- | |

clone#

|||| |

widgetId#

| `string` | "" | `id` of the widget to clone | |

overrides#

|||| -|

props#

| `object` | {} | Cloned widget's properties to override | +|

props#

| `object` | {} | Cloned widget's properties to override |
+ + ## Switchers -### state -Save and recall the state of other widgets. +
+ + +
Save and recall the state of other widgets.
| property | type |default | description | | --- | --- | --- | --- | @@ -525,34 +652,46 @@ Save and recall the state of other widgets. |

loadLabel#

| `string` | "Load" | Label for load button | |

horizontal#

| `boolean` | false | Set to `true` to display buttons horizontally | |

value#

|||| -|

value#

| `object`|
`string` | "" | - `object`: `"widget_id": VALUE` pairs
- `string`: `"save"` (trigger save action), `"load"` (trigger load action) or `""` (reset value)



Note: the widget's actual value is never `"save"` or `"load"`, it's either an empty string or an object. | +|

value#

| `object`|
`string` | "" | - `object`: `"widget_id": VALUE` pairs
- `string`: `"save"` (trigger save action), `"load"` (trigger load action) or `""` (reset value)



Note: the widget's actual value is never `"save"` or `"load"`, it's either an empty string or an object. |
-### switcher -Store other widgets' values and recall them. + + +
+ + +
Store other widgets' values and recall them.
| property | type |default | description | | --- | --- | --- | --- | |

switcher#

|||| |

linkedWidgets#

| `string`|
`array` | "" | - `String`: a widget's `id` whose state changes will be stored
- `Array`: a list of widget `id` string | |

horizontal#

| `boolean` | false | Set to `true` to display values horizontally | -|

values#

| `array`|
`object` | {
 "Value 1": 1,
 "Value 2": 2
}
| Each item represents a bank that stores the values from the widgets listed in `linkedWidgets`
- `Array` of possible values to switch between : `[1,2,3]`
- `Object` of `"label":value` pairs. Numeric labels must be prepended or appended with a white space (or any other non-numeric character) otherwise the order of the values won't be kept | +|

values#

| `array`|
`object` | {
 "Value 1": 1,
 "Value 2": 2
}
| Each item represents a bank that stores the values from the widgets listed in `linkedWidgets`
- `Array` of possible values to switch between : `[1,2,3]`
- `Object` of `"label":value` pairs. Numeric labels must be prepended or appended with a white space (or any other non-numeric character) otherwise the order of the values won't be kept |
-### crossfader -Switcher with linear interpolation slider. + + +
+ + +
Switcher with linear interpolation slider.
| property | type |default | description | | --- | --- | --- | --- | |

crossfader#

|||| |

linkedWidgets#

| `string`|
`array` | "" | - `String`: a widget's `id` whose state changes will be stored
- `Array`: a list of widget `id` string | -|

horizontal#

| `boolean` | false | Set to `true` to display values horizontally | +|

horizontal#

| `boolean` | false | Set to `true` to display values horizontally |
+ + ## Inputs -### input -Text input. +
+ + +
Text input.
| property | type |default | description | | --- | --- | --- | --- | @@ -561,11 +700,15 @@ Text input. |

align#

| `string` | "" | Set to `left` or `right` to change text alignment (otherwise center) | |

unit#

| `string` | "" | Unit will be appended to the displayed widget's value (it doesn't affect osc messages) | |

editable#

| `boolean` | true | Set to `false` to make the input non-editable | -|

asYouType#

| `boolean` | false | Set to `true` to make the input send its value at each keystroke | +|

asYouType#

| `boolean` | false | Set to `true` to make the input send its value at each keystroke |
-### keys -Keyboard binding. + + +
+ + +
Keyboard binding.
| property | type |default | description | | --- | --- | --- | --- | @@ -573,21 +716,29 @@ Keyboard binding. |

binding#

| `string`|
`array` | "" | Key combo `string` or `array` of strings (see KeyboardJS documentation) | |

keydown#

| `string` | "" | This property is evaluated each time the key combo is pressed and defines the widget's own value. Formulas are given extras variables in this context:
- `key`: pressed key name (usefull for handling multiple keys with a single keys widget, lowercased when referencing a character key)
- `code`: pressed key code name (full list)
- `ctrl`: control key state
- `alt`: alt key state
- `shift`: shift key state
- `meta`: command/windows key state | |

keyup#

| `string` | "" | Same as `keydown`, but evaluated when releasing the key combo | -|

repeat#

| `boolean` | true | Set to `false` to prevent keydown repeats when holding the key combo pressed | +|

repeat#

| `boolean` | true | Set to `false` to prevent keydown repeats when holding the key combo pressed |
-### script -Evaluates a script each time it receives a value. + + +
+ + +
Evaluates a script each time it receives a value.
| property | type |default | description | | --- | --- | --- | --- | |

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`: value received by the widget
- `id`: id of the widget that triggered the script
- `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
- `get(id)`: function for getting a widget's value (dynamic equivalent of @{id})
- `getProp(id, property)`: function for getting a widget's property value ((dynamic equivalent of @{id.property})
- `httpGet(url, callback)`: function for making http requests (asynchronous "GET" request and local urls only)



* Note: `value` or `linkId` properties can be used to receive other widgets' values. The `value` property must actually change to trigger the execution, where linked widgets via `linkId` can submit the same value over and over and trigger the execution | +|

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`: value received by the widget
- `id`: id of the widget that triggered the script
- `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
- `get(id)`: function for getting a widget's value (dynamic equivalent of @{id})
- `getProp(id, property)`: function for getting a widget's property value ((dynamic equivalent of @{id.property})
- `httpGet(url, callback)`: function for making http requests (asynchronous "GET" request and local urls only)



* Note: `value` or `linkId` properties can be used to receive other widgets' values. The `value` property must actually change to trigger the execution, where linked widgets via `linkId` can submit the same value over and over and trigger the execution |
-### gyroscope -Device motion/orientation sensor. + + +
+ + +
Device motion/orientation sensor.
| property | type |default | description | | --- | --- | --- | --- | @@ -597,11 +748,15 @@ Device motion/orientation sensor. |

compass#

| `boolean` | false | Set to `true` to return the orientation values with respect to the actual north direction of the world instead of the head direction of the device | |

screenAdjusted#

| `boolean` | false | Set to `true` to return screen adjusted values | |

value#

|||| -|

value#

| `object` | "" | The gyroscope's value is an object containing multiple values, which can be used by other widgets via the property maths syntax
- `value.do.alpha`: deviceorientation event alpha
- `value.do.beta`: deviceorientation event beta
- `value.do.gamma`: deviceorientation event gamma
- `value.do.absolute`: deviceorientation event absolute
- `value.dm.x`: devicemotion event acceleration x
- `value.dm.y`: devicemotion event acceleration y
- `value.dm.z`: devicemotion event acceleration z
- `value.dm.gx`: devicemotion event accelerationIncludingGravity x
- `value.dm.gy`: devicemotion event accelerationIncludingGravity y
- `value.dm.gz`: devicemotion event accelerationIncludingGravity z
- `value.dm.alpha`: devicemotion event rotationRate alpha
- `value.dm.beta`: devicemotion event rotationRate beta
- `value.dm.gamma`: devicemotion event rotationRate gamma | +|

value#

| `object` | "" | The gyroscope's value is an object containing multiple values, which can be used by other widgets via the property maths syntax
- `value.do.alpha`: deviceorientation event alpha
- `value.do.beta`: deviceorientation event beta
- `value.do.gamma`: deviceorientation event gamma
- `value.do.absolute`: deviceorientation event absolute
- `value.dm.x`: devicemotion event acceleration x
- `value.dm.y`: devicemotion event acceleration y
- `value.dm.z`: devicemotion event acceleration z
- `value.dm.gx`: devicemotion event accelerationIncludingGravity x
- `value.dm.gy`: devicemotion event accelerationIncludingGravity y
- `value.dm.gz`: devicemotion event accelerationIncludingGravity z
- `value.dm.alpha`: devicemotion event rotationRate alpha
- `value.dm.beta`: devicemotion event rotationRate beta
- `value.dm.gamma`: devicemotion event rotationRate gamma |
-### file -File/Folder selector (server-side). + + +
+ + +
File/Folder selector (server-side).
| property | type |default | description | | --- | --- | --- | --- | @@ -609,7 +764,9 @@ File/Folder selector (server-side). |

directory#

| `string` | "auto" | Default browsing directory | |

extension#

| `string` | "*" | Only display files with this extension | |

hidePath#

| `boolean` | false | Set to `true` to only display the filename (the whole path will still be used as value) | -|

allowDir#

| `boolean` | false | Allow selecting a folder (by pressing "open" when no file is selected) | +|

allowDir#

| `boolean` | false | Allow selecting a folder (by pressing "open" when no file is selected) |
+ + diff --git a/resources/mkdocs.yml b/resources/mkdocs.yml index 04c43496..cfa89da1 100644 --- a/resources/mkdocs.yml +++ b/resources/mkdocs.yml @@ -45,6 +45,7 @@ nav: - Donate: donate.md markdown_extensions: + - markdown.extensions.extra - markdown.extensions.admonition - codehilite: guess_lang: False diff --git a/resources/src/scss/styles.scss b/resources/src/scss/styles.scss index d82f5d3d..59cfc7c5 100644 --- a/resources/src/scss/styles.scss +++ b/resources/src/scss/styles.scss @@ -21,6 +21,16 @@ body { h1,h2,h3,h4,h5 { font-weight: 100; } +h2 { + font-weight: 400; +} +h4 { + font-size: 1.1rem; +} +h1 + h2 { + // position: relative; + margin-top: 2rem; +} pre, code { font-size: 0.7rem; @@ -238,4 +248,36 @@ h1:first-child { margin-top:20px; } + +.accordion { + background: rgba(black, 0.05); + padding: 8px; + margin-bottom: 1rem; +} +.accordion h4 { + cursor: pointer; +} + +.accordion table { + display: none; +} +.accordion.show table { + display: table; +} +.accordionlink > .headerlink { + opacity: 1!important; + color: $primary-color!important; + text-decoration: none; + display: block; + outline: none; + box-shadow: none; + margin-left: 0; +} +.accordion-description { + opacity: 0.8; +} +.accordion.show .accordion-description { + margin-bottom: 8px; +} + @import 'mobile'; diff --git a/scripts/build-widgets-reference.js b/scripts/build-widgets-reference.js index 907b2295..fe1e1ed0 100644 --- a/scripts/build-widgets-reference.js +++ b/scripts/build-widgets-reference.js @@ -10,7 +10,12 @@ var widgets = require('../src/client/app/widgets'), doc.push(` - ## Generic properties + # Widget reference + +
+ + +
Properties shared by all widgets
| property | type |default | description | | --- | --- | --- | --- |` @@ -39,6 +44,9 @@ for (var propName in base) { } +doc.push('
') + + for (var k in widgets.categories) { var category = widgets.categories[k] @@ -57,9 +65,11 @@ for (var k in widgets.categories) { doc.push(` - ### ${type} - ${description} +
+ + +
${description}
| property | type |default | description | | --- | --- | --- | --- |` @@ -91,6 +101,8 @@ for (var k in widgets.categories) { if (separator) doc.pop() + doc.push('
\n\n') + } } @@ -100,6 +112,23 @@ doc.push(`\n\n item.classList.remove('thead2') item.closest('tr').classList.add('thead2') }) + document.querySelectorAll('.accordionlink').forEach(function(item){ + item.addEventListener('click', function(e){ + e.preventDefault() + var node = item.parentNode + node.classList.toggle('show') + if (node.classList.contains('show')){ + history.replaceState(null, null, '#' + item.getAttribute('id')); + } else { + history.replaceState(null, null, ' '); + } + }) + }) + if (window.location.hash) { + document.querySelectorAll('[id='+window.location.hash.split("#")[1]+']').forEach(function(item){ + item.click() + }) + } `) diff --git a/src/client/app/widgets/buttons/dropdown.js b/src/client/app/widgets/buttons/dropdown.js index 8a15f868..f796e4ba 100644 --- a/src/client/app/widgets/buttons/dropdown.js +++ b/src/client/app/widgets/buttons/dropdown.js @@ -5,6 +5,13 @@ var Widget = require('../common/widget'), class Dropdown extends Widget { + static description() { + + return 'Native dropdown menu.' + + } + + static defaults() { return super.defaults({ diff --git a/src/client/app/widgets/buttons/menu.js b/src/client/app/widgets/buttons/menu.js index ec76a856..9c8fbfb6 100644 --- a/src/client/app/widgets/buttons/menu.js +++ b/src/client/app/widgets/buttons/menu.js @@ -8,7 +8,7 @@ class Menu extends Widget { static description() { - return 'Drag and drop menu with a circular layout' + return 'Drag and drop menu with a circular or grid layout.' } diff --git a/src/client/app/widgets/buttons/push.js b/src/client/app/widgets/buttons/push.js index 8e6c6924..827c489d 100644 --- a/src/client/app/widgets/buttons/push.js +++ b/src/client/app/widgets/buttons/push.js @@ -5,6 +5,13 @@ var Widget = require('../common/widget'), class Push extends Widget { + static description() { + + return 'On / off button that turns off when released.' + + } + + static defaults() { @@ -99,7 +106,7 @@ class Push extends Widget { if (!options.fromState) this.setValuePrivate(v,options) return } - + if (typeof v == 'object' && v !== null) v = v.value if (v===this.getProp('on') || (this.getProp('on') != null && v === this.getProp('on').value && v !== undefined)) { this.widget.classList.add('on') diff --git a/src/client/app/widgets/buttons/switch.js b/src/client/app/widgets/buttons/switch.js index ef2ea7c7..46001012 100644 --- a/src/client/app/widgets/buttons/switch.js +++ b/src/client/app/widgets/buttons/switch.js @@ -5,6 +5,12 @@ var Widget = require('../common/widget'), module.exports = class Switch extends Widget { + static description() { + + return 'Value selector button.' + + } + static defaults() { return super.defaults({ diff --git a/src/client/app/widgets/buttons/toggle.js b/src/client/app/widgets/buttons/toggle.js index c87c6760..0b1fc7a4 100644 --- a/src/client/app/widgets/buttons/toggle.js +++ b/src/client/app/widgets/buttons/toggle.js @@ -4,6 +4,12 @@ var Widget = require('../common/widget'), class Toggle extends Widget { + static description() { + + return 'On / off button.' + + } + static defaults() { return super.defaults({ diff --git a/src/client/app/widgets/plots/html.js b/src/client/app/widgets/plots/html.js index d8000fe4..487b743b 100644 --- a/src/client/app/widgets/plots/html.js +++ b/src/client/app/widgets/plots/html.js @@ -9,6 +9,13 @@ var sanitizeOptions = { class Html extends Widget { + static description() { + + return 'Simple HTML parser.' + + } + + static defaults() { return super.defaults({ diff --git a/src/client/app/widgets/plots/led.js b/src/client/app/widgets/plots/led.js index ae7d1c0e..6df69b01 100644 --- a/src/client/app/widgets/plots/led.js +++ b/src/client/app/widgets/plots/led.js @@ -4,6 +4,12 @@ var {mapToScale} = require('../utils'), module.exports = class Led extends Widget { + static description() { + + return 'Intensity display.' + + } + static defaults() { return super.defaults({ diff --git a/src/client/app/widgets/plots/rgbled.js b/src/client/app/widgets/plots/rgbled.js index 9a505655..f7215377 100644 --- a/src/client/app/widgets/plots/rgbled.js +++ b/src/client/app/widgets/plots/rgbled.js @@ -4,6 +4,12 @@ var Widget = require('../common/widget'), module.exports = class Rbgled extends Widget { + static description() { + + return 'Rgb / rgba color display' + + } + static defaults() { return super.defaults({}, ['color', 'precision', 'bypass'], { diff --git a/src/client/app/widgets/plots/svg.js b/src/client/app/widgets/plots/svg.js index 91070d8a..02e80676 100644 --- a/src/client/app/widgets/plots/svg.js +++ b/src/client/app/widgets/plots/svg.js @@ -5,6 +5,12 @@ var Widget = require('../common/widget'), class Svg extends Widget { + static description() { + + return 'Svg parser.' + + } + static defaults() { return super.defaults({ diff --git a/src/client/app/widgets/sliders/fader.js b/src/client/app/widgets/sliders/fader.js index 8e6bd452..76f6a94c 100644 --- a/src/client/app/widgets/sliders/fader.js +++ b/src/client/app/widgets/sliders/fader.js @@ -5,6 +5,12 @@ var {clip} = require('../utils'), module.exports = class Fader extends Slider { + static description() { + + return 'Vertical / horizontal slider.' + + } + static defaults() { return super.defaults({ diff --git a/src/client/app/widgets/sliders/knob.js b/src/client/app/widgets/sliders/knob.js index 112309e6..0255f712 100644 --- a/src/client/app/widgets/sliders/knob.js +++ b/src/client/app/widgets/sliders/knob.js @@ -3,6 +3,12 @@ var {clip} = require('../utils'), module.exports = class Knob extends Slider { + static description() { + + return 'Rotative knob slider.' + + } + static defaults() { return super.defaults({