mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-28 03:36:44 +00:00
Hide map cluster toggle when there is just one entry (#25454)
This commit is contained in:
parent
89e04fcc45
commit
e1b9b47ac7
@ -215,17 +215,21 @@ class HuiMapCard extends LitElement implements LovelaceCard {
|
||||
render-passive
|
||||
></ha-map>
|
||||
<div id="buttons">
|
||||
<ha-icon-button
|
||||
.label=${this.hass!.localize(
|
||||
"ui.panel.lovelace.cards.map.toggle_grouping"
|
||||
)}
|
||||
.path=${this._clusterMarkers
|
||||
? mdiGoogleCirclesCommunities
|
||||
: mdiDotsHexagon}
|
||||
style=${isDarkMode ? "color:#ffffff" : "color:#000000"}
|
||||
@click=${this._toggleClusterMarkers}
|
||||
tabindex="0"
|
||||
></ha-icon-button>
|
||||
${this._mapEntities.length > 1
|
||||
? html`
|
||||
<ha-icon-button
|
||||
.label=${this.hass!.localize(
|
||||
"ui.panel.lovelace.cards.map.toggle_grouping"
|
||||
)}
|
||||
.path=${this._clusterMarkers
|
||||
? mdiGoogleCirclesCommunities
|
||||
: mdiDotsHexagon}
|
||||
style=${isDarkMode ? "color:#ffffff" : "color:#000000"}
|
||||
@click=${this._toggleClusterMarkers}
|
||||
tabindex="0"
|
||||
></ha-icon-button>
|
||||
`
|
||||
: nothing}
|
||||
<ha-icon-button
|
||||
.label=${this.hass!.localize(
|
||||
"ui.panel.lovelace.cards.map.reset_focus"
|
||||
|
Loading…
x
Reference in New Issue
Block a user