intitializing display layouts with objectStyles properties, so styles tab shows for them, setting it for older versions

This commit is contained in:
Jamie V 2025-01-16 14:09:19 -08:00
parent e7eb07023c
commit 7cd1517cc0
2 changed files with 7 additions and 1 deletions

View File

@ -31,7 +31,8 @@ export default function DisplayLayoutType() {
domainObject.composition = [];
domainObject.configuration = {
items: [],
layoutGrid: [10, 10]
layoutGrid: [10, 10],
objectStyles: {}
};
},
form: [

View File

@ -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',