Bigger touch target for mobile map history trace (#19569)

This commit is contained in:
karwosts 2024-01-30 08:21:10 -05:00 committed by GitHub
parent 73460c7d8a
commit 4c314928c6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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,