mirror of
https://github.com/nasa/openmct.git
synced 2025-06-15 21:58:13 +00:00
Make legend configuration properties reactive (#3889)
Co-authored-by: Nikhil <nikhil.k.mandlik@nasa.gov>
This commit is contained in:
@ -133,15 +133,29 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
isLegendHidden: this.legend.get('hideLegendWhenSmall') !== true,
|
isLegendExpanded: this.legend.get('expanded') === true
|
||||||
isLegendExpanded: this.legend.get('expanded') === true,
|
|
||||||
showTimestampWhenExpanded: this.legend.get('showTimestampWhenExpanded') === true,
|
|
||||||
showValueWhenExpanded: this.legend.get('showValueWhenExpanded') === true,
|
|
||||||
showUnitsWhenExpanded: this.legend.get('showUnitsWhenExpanded') === true,
|
|
||||||
showMinimumWhenExpanded: this.legend.get('showMinimumWhenExpanded') === true,
|
|
||||||
showMaximumWhenExpanded: this.legend.get('showMaximumWhenExpanded') === true
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
showUnitsWhenExpanded() {
|
||||||
|
return this.legend.get('showUnitsWhenExpanded') === true;
|
||||||
|
},
|
||||||
|
showMinimumWhenExpanded() {
|
||||||
|
return this.legend.get('showMinimumWhenExpanded') === true;
|
||||||
|
},
|
||||||
|
showMaximumWhenExpanded() {
|
||||||
|
return this.legend.get('showMaximumWhenExpanded') === true;
|
||||||
|
},
|
||||||
|
showValueWhenExpanded() {
|
||||||
|
return this.legend.get('showValueWhenExpanded') === true;
|
||||||
|
},
|
||||||
|
showTimestampWhenExpanded() {
|
||||||
|
return this.legend.get('showTimestampWhenExpanded') === true;
|
||||||
|
},
|
||||||
|
isLegendHidden() {
|
||||||
|
return this.legend.get('hideLegendWhenSmall') === true;
|
||||||
|
}
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
expandLegend() {
|
expandLegend() {
|
||||||
this.isLegendExpanded = !this.isLegendExpanded;
|
this.isLegendExpanded = !this.isLegendExpanded;
|
||||||
|
@ -94,11 +94,6 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
showTimestampWhenExpanded: this.legend.get('showTimestampWhenExpanded'),
|
|
||||||
showValueWhenExpanded: this.legend.get('showValueWhenExpanded'),
|
|
||||||
showUnitsWhenExpanded: this.legend.get('showUnitsWhenExpanded'),
|
|
||||||
showMinimumWhenExpanded: this.legend.get('showMinimumWhenExpanded'),
|
|
||||||
showMaximumWhenExpanded: this.legend.get('showMaximumWhenExpanded'),
|
|
||||||
isMissing: false,
|
isMissing: false,
|
||||||
colorAsHexString: '',
|
colorAsHexString: '',
|
||||||
name: '',
|
name: '',
|
||||||
@ -110,6 +105,23 @@ export default {
|
|||||||
mctLimitStateClass: ''
|
mctLimitStateClass: ''
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
showUnitsWhenExpanded() {
|
||||||
|
return this.legend.get('showUnitsWhenExpanded') === true;
|
||||||
|
},
|
||||||
|
showMinimumWhenExpanded() {
|
||||||
|
return this.legend.get('showMinimumWhenExpanded') === true;
|
||||||
|
},
|
||||||
|
showMaximumWhenExpanded() {
|
||||||
|
return this.legend.get('showMaximumWhenExpanded') === true;
|
||||||
|
},
|
||||||
|
showValueWhenExpanded() {
|
||||||
|
return this.legend.get('showValueWhenExpanded') === true;
|
||||||
|
},
|
||||||
|
showTimestampWhenExpanded() {
|
||||||
|
return this.legend.get('showTimestampWhenExpanded') === true;
|
||||||
|
}
|
||||||
|
},
|
||||||
watch: {
|
watch: {
|
||||||
highlights(newHighlights) {
|
highlights(newHighlights) {
|
||||||
const highlightedObject = newHighlights.find(highlight => highlight.series.keyString === this.seriesObject.keyString);
|
const highlightedObject = newHighlights.find(highlight => highlight.series.keyString === this.seriesObject.keyString);
|
||||||
|
Reference in New Issue
Block a user