From 118ad4e8cc1658a1d81543a540e4623599a4da8e Mon Sep 17 00:00:00 2001 From: Graham McIntire Date: Wed, 15 Apr 2026 14:12:29 -0500 Subject: [PATCH] WeatherMap: actually move the legend to top-right The previous fix only updated the initial mount path. buildLegend gets re-created on every layer switch via the swap at renderLayer, and that code path still used the old isMobile-dependent bottomright position, which clobbered the top-right placement as soon as the user clicked a different layer. --- assets/js/weather_map_hook.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/js/weather_map_hook.ts b/assets/js/weather_map_hook.ts index 8630fd9f..6b2fdda3 100644 --- a/assets/js/weather_map_hook.ts +++ b/assets/js/weather_map_hook.ts @@ -646,7 +646,7 @@ export const WeatherMap: WeatherMapHook = { if (this.legend) { this.map.removeControl(this.legend) - this.legend = L.control({ position: isMobile() ? "topright" : "bottomright" }) + this.legend = L.control({ position: "topright" }) this.legend.onAdd = () => this.buildLegend() this.legend.addTo(this.map) }