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