From 637e4203e5f8dff218b239139002dcb998820f12 Mon Sep 17 00:00:00 2001 From: Bram Kragten Date: Mon, 28 Mar 2022 15:14:24 +0200 Subject: [PATCH] Fix z-index map, always set icon for location selector (#12137) --- src/components/ha-selector/ha-selector-location.ts | 5 ++++- src/components/map/ha-map.ts | 8 ++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/components/ha-selector/ha-selector-location.ts b/src/components/ha-selector/ha-selector-location.ts index 18372f525d..26831a793d 100644 --- a/src/components/ha-selector/ha-selector-location.ts +++ b/src/components/ha-selector/ha-selector-location.ts @@ -52,7 +52,10 @@ export class HaLocationSelector extends LitElement { longitude: value?.longitude || this.hass.config.longitude, radius: selector.location.radius ? value?.radius || 1000 : undefined, radius_color: zoneRadiusColor, - icon: selector.location.icon, + icon: + selector.location.icon || selector.location.radius + ? "mdi:map-marker-radius" + : "mdi:map-marker", location_editable: true, radius_editable: true, }, diff --git a/src/components/map/ha-map.ts b/src/components/map/ha-map.ts index 9e56fa7379..f422f053d6 100644 --- a/src/components/map/ha-map.ts +++ b/src/components/map/ha-map.ts @@ -488,6 +488,14 @@ export class HaMap extends ReactiveElement { text-align: center; color: var(--primary-text-color); } + .leaflet-pane { + z-index: 0 !important; + } + .leaflet-control, + .leaflet-top, + .leaflet-bottom { + z-index: 1 !important; + } `; } }