From e635155bdb5286e3a1eec87f2d22fb3e5d5d275a Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Sun, 18 Mar 2018 17:14:15 +0100 Subject: [PATCH] docs: fix dynamic props permalink --- resources/docs/css/extra.css | 18 +++++++++++++-- .../docs/extras/advanced-property-syntax.md | 6 ++--- resources/docs/widgets/buttons.md | 10 ++++----- resources/docs/widgets/containers.md | 2 +- resources/docs/widgets/widgets.md | 22 +++++++++---------- 5 files changed, 36 insertions(+), 22 deletions(-) diff --git a/resources/docs/css/extra.css b/resources/docs/css/extra.css index 81afa7be..1a1d7dba 100644 --- a/resources/docs/css/extra.css +++ b/resources/docs/css/extra.css @@ -42,9 +42,23 @@ article img { border-radius: 3px; } -code + i { +.dynamic-prop-icon { vertical-align:super; font-size: 75%; margin-left: -5px; - opacity: 0.75!important; + opacity: 0.65!important; +} + +.dynamic-prop-icon:after { + content:"flash_on"; + font-family: Material Icons; + font-style: normal; + font-variant: normal; + font-weight: 400; + line-height: 1; + text-transform: none; + white-space: nowrap; + speak: none; + word-wrap: normal; + direction: ltr; } diff --git a/resources/docs/extras/advanced-property-syntax.md b/resources/docs/extras/advanced-property-syntax.md index 7a2aabb6..277afc5d 100644 --- a/resources/docs/extras/advanced-property-syntax.md +++ b/resources/docs/extras/advanced-property-syntax.md @@ -25,7 +25,7 @@ If the retreived property is an object (`[] / {}`), a subset can be defined by a ### Using the value -The special property name `value`flash_on refers to a widget's current value (which can be affected by its `value` *property*). +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}` @@ -33,13 +33,13 @@ When omitted, the property name defaults to `value` : `@{widgetId}` => `@{widget Some properties, when changed, trigger a complete widget recreation that ends any ongoing user interaction. Also, updating these properties continuously (e.g. when linked to a slider's dynamic value) can be very cpu expensive. -Some properties have much cheaper update routines and can be considered as `dynamic`, as in performance safe. These properties are marked in the documentation with a ` `flash_on. +Some properties have much cheaper update routines and can be considered as `dynamic`, as in performance safe. These properties are marked in the documentation with a ` `. ### Circular references cases - container widgets can inherit their children's properties only to define `dynamic` properties -- widgets can inherit their own `value`flash_on property only to define `dynamic` properties +- widgets can inherit their own `value` property only to define `dynamic` properties ---- diff --git a/resources/docs/widgets/buttons.md b/resources/docs/widgets/buttons.md index 59ea57a7..8ea49e45 100644 --- a/resources/docs/widgets/buttons.md +++ b/resources/docs/widgets/buttons.md @@ -22,14 +22,14 @@ Buttons are exactly what you think they are. - default: `false` - usage: set to `true` to display the toggle's state with a led -### `on`flash_on +### `on` - type: `string|number|object` - default: `1` - usage: defines which value is sent on `on` position - 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](./widgets.md#preargs)) -### `off`flash_on +### `off` - type: `string|number|object` - default: `0` - usage: defines which value is sent on `off` position @@ -47,14 +47,14 @@ Buttons are exactly what you think they are. } ``` -### `on`flash_on +### `on` - type: `string|number|object` - default: `1` - usage: defines which value is sent when pushing the button - 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](./widgets.md#preargs)) -### `off`flash_on +### `off` - type: `string|number|object` - default: `0` - usage: defines which value is sent when releasing the button @@ -100,7 +100,7 @@ Setting the `push`'s value externally (via osc) will toggle it's inner light. } ``` -### `values`flash_on +### `values` - type: `array|object` - default: `{"Value 1":1,"Value 2":2}` - usage: diff --git a/resources/docs/widgets/containers.md b/resources/docs/widgets/containers.md index 90a5e864..70d1a428 100644 --- a/resources/docs/widgets/containers.md +++ b/resources/docs/widgets/containers.md @@ -36,7 +36,7 @@ Panels can contains tabs or widgets. These can be absolutely positioned and can - usage: each element of the `array` must be a tab `object`. A panel cannot contain widgets and tabs simultaneously. -### `variables`flash_on +### `variables` - type: `*` - default: `@{parent.variables}` - usage: defines one or more arbitrary variables that can be inherited by children widgets. diff --git a/resources/docs/widgets/widgets.md b/resources/docs/widgets/widgets.md index 8795d0a5..ab6dbc50 100644 --- a/resources/docs/widgets/widgets.md +++ b/resources/docs/widgets/widgets.md @@ -21,14 +21,14 @@ All widgets share a set of generic properties described below. ## Style -### `label`flash_on +### `label` - type: `string|false` - default: `auto`, which displays `id` - usage: - set to `false` to hide completely - insert icons from [FontAwesome](https://fontawesome.com/icons?d=gallery&s=solid&m=free) using the prefix `^` followed by the icon's name : `made with ^heart`, etc -### `top`flash_on / `left`flash_on +### `top` / `left` - type: `number|percentage` - default: `auto` - usage: @@ -36,17 +36,17 @@ All widgets share a set of generic properties described below. - otherwise, the widget will be absolutely positioned -### `width`flash_on / `height`flash_on +### `width` / `height` - type: `number|percentage` - default: `auto` -### `color`flash_on +### `color` - type: `string` - default: `auto`, inherited accent color - usage: any valid `css` color code is valid, this will change the default accent color for the widget and all its children -### `css`flash_on +### `css` - type: `string` - default: *empty* - usage: applies CSS rules to widget. See [css tips](../extras/css-tips.md). @@ -59,7 +59,7 @@ All widgets share a set of generic properties described below. - usage: if set, the widget will be initialized with this `value` when the session is loaded. Some widgets use this property under specific conditions (see fader's `doubleTap` for example). -### `value`flash_on +### `value` - type: `*` - default: `empty` - usage: set `value` to define a widget's value depending on other widget's values / properties using [property inheritance](../extras/property-inheritance.md) and [property maths](../extras/property-maths.md). When updated by an osc-sending event (e.g. dragging a slider), the widget will send its own osc message as well. @@ -70,14 +70,14 @@ All widgets share a set of generic properties described below. ## OSC -### `precision`flash_on +### `precision` - type: `integer|string` - default: `2` - usage: the `precision` property defines the number of decimals to display and to send. - set to `0` to send `integers` only. - a specific data type can be specified by appending a valid osc type tag to the precision value, for example : `3d` will make the widget send double precision numbers rounded to three decimals -### `target`flash_on +### `target` - type: `array` - default: `[]` - usage: @@ -89,7 +89,7 @@ All widgets share a set of generic properties described below. - if no target is set (empty array `[]`), messages can still be sent if the server has defaults targets (`-s / --send`) - to disable osc regardless of the previous point, set `target` to `[null]` -### `address`flash_on +### `address` - type: `string` - default: `/widgets_id` - usage: this is the `address` of the osc messages sent by the widget, it must start with a `/` @@ -102,7 +102,7 @@ All widgets share a set of generic properties described below. /touch/address [preArgs] 0/1 ``` -### `preArgs`flash_on +### `preArgs` - type: `array` - default: `[]` - usage: @@ -133,7 +133,7 @@ preArgs: [ ] ``` -### `bypass`flash_on +### `bypass` - type: `boolean` - default: `false` - usage: set to `true` to prevent the widget from sending any osc message