From d00987402e042569ed3d7114aa2c26c93f072faf Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Tue, 12 Nov 2024 13:22:04 +0100 Subject: [PATCH] matrix: don't implicitely override children's `label`, do it explicitely in `props`' default --- CHANGELOG.md | 3 +++ src/client/widgets/containers/matrix.js | 3 +-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 554b0ebf..433eb3fb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,9 @@ - show 3-dots menu in read-only mode with access to allowed items (e.g fullscreen) - hide console in read-only mode +- widgets + - matrix: don't implicitely override children's `label`, do it explicitely in `props`' default + ## 1.27.1 - bug fixes diff --git a/src/client/widgets/containers/matrix.js b/src/client/widgets/containers/matrix.js index 3b1e1391..c7d87ad4 100644 --- a/src/client/widgets/containers/matrix.js +++ b/src/client/widgets/containers/matrix.js @@ -17,7 +17,7 @@ class Matrix extends Panel { class_specific: { widgetType: {type: 'string', value: 'button', help: 'Defines the type of the widgets in the matrix'}, quantity: {type: 'number', value: 4, help: 'Defines the number of widgets in the matrix'}, - props: {type: 'object', value: {}, editor: 'javascript', syntaxChecker: false, help: [ + props: {type: 'object', value: {label: "#{$}"}, editor: 'javascript', syntaxChecker: false, help: [ 'Defines a set of property to override the widgets\' defaults.', 'JS{} and #{} blocks in this field are resolved with an extra variable representing each widget\'s index: `$` (e.g. `#{$}`)', 'Advanced syntax blocks (@{}, OSC{}, JS{}, VAR{} and #{}) are resolved at the matrix\' scope (ie @{this.variables} returns the matrix\' variables property)', @@ -111,7 +111,6 @@ class Matrix extends Panel { target: '@{parent.target}', decimals: '@{parent.decimals}', bypass: '@{parent.bypass}', - label: i, top: 'auto', left: 'auto', height: 'auto',