Store telemetry styles on their container domain objects.

This commit is contained in:
Joshi
2020-04-01 15:51:40 -07:00
parent dd70bb470f
commit 97b37edce4
5 changed files with 87 additions and 153 deletions

View File

@@ -30,9 +30,9 @@ export default {
}
},
mounted() {
this.domainObject = this.$parent.domainObject;
this.parentDomainObject = this.$parent.domainObject;
this.itemId = this.item.id;
this.objectStyle = this.getObjectStyleForItem(this.domainObject.configuration.objectStyles);
this.objectStyle = this.getObjectStyleForItem(this.parentDomainObject.configuration.objectStyles);
this.initObjectStyles();
},
destroyed() {
@@ -59,7 +59,7 @@ export default {
this.stopListeningObjectStyles();
}
this.stopListeningObjectStyles = this.openmct.objects.observe(this.domainObject, 'configuration.objectStyles', (newObjectStyle) => {
this.stopListeningObjectStyles = this.openmct.objects.observe(this.parentDomainObject, 'configuration.objectStyles', (newObjectStyle) => {
//Updating object styles in the inspector view will trigger this so that the changes are reflected immediately
let newItemObjectStyle = this.getObjectStyleForItem(newObjectStyle);
if (this.objectStyle !== newItemObjectStyle) {