Skip to content

Commit

Permalink
Bigger touch target for mobile map history trace (#19569)
Browse files Browse the repository at this point in the history
  • Loading branch information
karwosts authored Jan 30, 2024
1 parent 73460c7 commit 4c31492
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/components/map/ha-map.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 4c31492

Please sign in to comment.