mirror of
https://github.com/nasa/openmct.git
synced 2024-12-26 16:21:06 +00:00
add expand component
This commit is contained in:
parent
31b0f00233
commit
512cbe4127
@ -30,6 +30,8 @@
|
||||
<button
|
||||
class="c-plot-legend__view-control gl-plot-legend__view-control c-disclosure-triangle is-enabled"
|
||||
:class="{ 'c-disclosure-triangle--expanded': isLegendExpanded }"
|
||||
:aria-label="ariaLabelValue"
|
||||
tabindex="0"
|
||||
@click="toggleLegend"
|
||||
></button>
|
||||
|
||||
@ -127,6 +129,11 @@ export default {
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
ariaLabelValue() {
|
||||
const name = this.domainObject.name ? ` ${this.domainObject.name}` : '';
|
||||
|
||||
return `${this.isLegendExpanded ? 'Collapse' : 'Expand'}${name} Legend`;
|
||||
},
|
||||
showUnitsWhenExpanded() {
|
||||
return this.loaded && this.legend.get('showUnitsWhenExpanded') === true;
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user