mirror of
https://github.com/nasa/openmct.git
synced 2025-03-21 11:35:59 +00:00
intitializing display layouts with objectStyles properties, so styles tab shows for them, setting it for older versions
This commit is contained in:
parent
e7eb07023c
commit
7cd1517cc0
@ -31,7 +31,8 @@ export default function DisplayLayoutType() {
|
||||
domainObject.composition = [];
|
||||
domainObject.configuration = {
|
||||
items: [],
|
||||
layoutGrid: [10, 10]
|
||||
layoutGrid: [10, 10],
|
||||
objectStyles: {}
|
||||
};
|
||||
},
|
||||
form: [
|
||||
|
@ -226,6 +226,11 @@ export default {
|
||||
this.composition.load();
|
||||
this.gridDimensions = [this.$el.offsetWidth, this.$el.scrollHeight];
|
||||
|
||||
// Initialize objectStyles if it doesn't exist for older versions
|
||||
if (!this.domainObject.configuration.objectStyles) {
|
||||
this.domainObject.configuration.objectStyles = {};
|
||||
}
|
||||
|
||||
this.unObserveItems = this.openmct.objects.observe(
|
||||
this.domainObject,
|
||||
'configuration.items',
|
||||
|
Loading…
x
Reference in New Issue
Block a user