Pin propagation legend to top-right on desktop too

The forecast timeline at the bottom of the map now spans a lot of
hours horizontally, and on wide screens it ran into the legend
that used to anchor bottom-right — covering the later forecast
hours. Move the legend to top-right on every viewport (it was
already there on mobile for the same reason).
This commit is contained in:
Graham McIntire 2026-04-15 10:06:31 -05:00
parent ad31f6763d
commit a9fa1d8344
No known key found for this signature in database
GPG key ID: F4ABF488E6029E59

View file

@ -982,8 +982,10 @@ export const PropagationMap: Record<string, unknown> & {
}
})
// Legend — compact on mobile, moved to top-right to avoid timeline overlap
const legend = L.control({ position: isMobile() ? "topright" : "bottomright" })
// Legend lives in the top-right on every viewport so the
// forecast timeline at the bottom can stretch to full width
// without the legend covering the later hours.
const legend = L.control({ position: "topright" })
legend.onAdd = () => {
const div = L.DomUtil.create("div")
const mobile = isMobile()