Skip to content

Commit

Permalink
intitializing display layouts with objectStyles properties, so styles…
Browse files Browse the repository at this point in the history
… tab shows for them, setting it for older versions
  • Loading branch information
jvigliotta committed Jan 16, 2025
1 parent e7eb070 commit 7cd1517
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/plugins/displayLayout/DisplayLayoutType.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ export default function DisplayLayoutType() {
domainObject.composition = [];
domainObject.configuration = {
items: [],
layoutGrid: [10, 10]
layoutGrid: [10, 10],
objectStyles: {}
};
},
form: [
Expand Down
5 changes: 5 additions & 0 deletions src/plugins/displayLayout/components/DisplayLayout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit 7cd1517

Please sign in to comment.