diff --git a/frontend/src/lib/components/leaflet-map/leaflet-map-components.ts b/frontend/src/lib/components/leaflet-map/leaflet-map-components.ts index 259c8bd2..1a80f4bd 100644 --- a/frontend/src/lib/components/leaflet-map/leaflet-map-components.ts +++ b/frontend/src/lib/components/leaflet-map/leaflet-map-components.ts @@ -18,7 +18,7 @@ import { requireClientContext } from "../facil-map-context-provider/facil-map-co import { type Optional } from "facilmap-utils"; import { getI18n, i18nResourceChangeCounter } from "../../utils/i18n"; import { AttributionControl } from "./attribution"; -import { isMaxBreakpoint, isNarrowBreakpoint } from "../../utils/bootstrap"; +import { isNarrowBreakpoint } from "../../utils/bootstrap"; type MapContextWithoutComponents = Optional; @@ -134,7 +134,6 @@ function useAttribution(map: Ref): Ref> { } else { map.addControl(attribution); } - //attribution.setPosition(isNarrow ? "topleft" : "bottomright"); }, { immediate: true }); watch(i18nResourceChangeCounter, () => { @@ -216,15 +215,16 @@ function useLocateControl(map: Ref, context: FacilMapContext): Ref { const { link, icon } = (Control.Locate.prototype.options as Control.LocateOptions).createButtonCallback!(container, options) as any as { link: HTMLElement; icon: HTMLElement }; - icon.remove(); - const newIcon = document.createElement("span"); - link.appendChild(newIcon); screenshotIconHtmlP.then((iconHtml) => { - newIcon.innerHTML = iconHtml; + icon.innerHTML = iconHtml; }).catch(console.error); - return { link, icon: newIcon }; + return { link, icon }; } })); } diff --git a/frontend/src/lib/components/leaflet-map/leaflet-map.vue b/frontend/src/lib/components/leaflet-map/leaflet-map.vue index 062e9421..87b26194 100644 --- a/frontend/src/lib/components/leaflet-map/leaflet-map.vue +++ b/frontend/src/lib/components/leaflet-map/leaflet-map.vue @@ -162,7 +162,7 @@ } .leaflet-control-locate.leaflet-control-locate { - a { + a, a > span { font-size: inherit; display: inline-flex; align-items: center;