From 999ab6e6b800fbd35198504b043532cfdd10d118 Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Sat, 21 Jul 2018 09:12:59 +0200 Subject: [PATCH] docs: mention switch workaround for values order with numeric keys (#330) --- resources/docs/widgets/buttons.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/resources/docs/widgets/buttons.md b/resources/docs/widgets/buttons.md index 8ea49e45..b1c8d384 100644 --- a/resources/docs/widgets/buttons.md +++ b/resources/docs/widgets/buttons.md @@ -84,7 +84,7 @@ Setting the `push`'s value externally (via osc) will toggle it's inner light. - default: `{"Value 1":1,"Value 2":2}` - usage: - `array` of possible values to switch between : `[1,2,3]` - - `object` of `"label":value` pairs + - `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. ### `showValues` - type: `boolean` @@ -105,5 +105,5 @@ Setting the `push`'s value externally (via osc) will toggle it's inner light. - default: `{"Value 1":1,"Value 2":2}` - usage: - `array` of possible values to switch between : `[1,2,3]` - - `object` of `"label":value` pairs - - an empty option will always be prepended to `values` (sends an osc message without any value) + - `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`