From 4c314928c68657501f56faf7e56f67767723168f Mon Sep 17 00:00:00 2001 From: karwosts <32912880+karwosts@users.noreply.github.com> Date: Tue, 30 Jan 2024 08:21:10 -0500 Subject: [PATCH] Bigger touch target for mobile map history trace (#19569) --- src/components/map/ha-map.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/map/ha-map.ts b/src/components/map/ha-map.ts index 88025662a6..e9abacec5b 100644 --- a/src/components/map/ha-map.ts +++ b/src/components/map/ha-map.ts @@ -20,6 +20,7 @@ import { loadPolyfillIfNeeded } from "../../resources/resize-observer.polyfill"; import { HomeAssistant } from "../../types"; import "../ha-icon-button"; import "./ha-entity-marker"; +import { isTouch } from "../../util/is_touch"; const getEntityId = (entity: string | HaMapEntity): string => typeof entity === "string" ? entity : entity.entity_id; @@ -282,7 +283,7 @@ export class HaMap extends ReactiveElement { this._mapPaths.push( Leaflet! .circleMarker(path.points[pointIndex].point, { - radius: 3, + radius: isTouch ? 8 : 3, color: path.color || darkPrimaryColor, opacity, fillOpacity: opacity, @@ -312,7 +313,7 @@ export class HaMap extends ReactiveElement { this._mapPaths.push( Leaflet! .circleMarker(path.points[pointIndex].point, { - radius: 3, + radius: isTouch ? 8 : 3, color: path.color || darkPrimaryColor, opacity, fillOpacity: opacity,