matrix: inherit from id and osc properties by default (#450)

This commit is contained in:
jean-emmanuel 2019-01-02 09:36:11 +01:00
parent b6fa6baa57
commit 9d2fe8a91a
2 changed files with 11 additions and 4 deletions

View file

@ -3,9 +3,10 @@
## 0.40.5
- bug fixes
- clone: editor's selection rectangle appearing after editing the clone's target widget
- clone: editor's selection rectangle appearing after editing the clone's target widget
- widgets
- input: hitting `tab` now validates the value before focusing the next input (hitting `esc` or clicking outside the widget still cancels); when focusing an input widget, its whole value is selected by default; focused/selected text color hint changes.
- input: hitting `tab` now validates the value before focusing the next input (hitting `esc` or clicking outside the widget still cancels); when focusing an input widget, its whole value is selected by default; focused/selected text color hint changes.
- matrix: widgets inherit from the matrix' `id` and osc properties by default
## 0.40.4

View file

@ -17,7 +17,8 @@ class Matrix extends _matrix_base {
border: {type: 'boolean', value: true, help: 'Set to `false` to disables the widgets\' borders'},
props: {type: 'object', value: {}, help: [
'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: `$`'
'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 `/$`)'
]}
}, [], {})
@ -43,7 +44,12 @@ class Matrix extends _matrix_base {
var props = this.resolveProp('props', undefined, false, false, false, {'$':i})
var data = {
type: this.getProp('widgetType'),
id: this.getProp('id') + '/' + i,
id: '@{parent.id}/' + i,
address: '@{parent.address}/' + i,
preArgs: '@{parent.preArgs}',
target: '@{parent.target}',
precision: '@{parent.precision}',
bypass: '@{parent.bypass}',
label: i,
top: 'auto',
left: 'auto',