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:
parent
ad31f6763d
commit
a9fa1d8344
1 changed files with 4 additions and 2 deletions
|
|
@ -982,8 +982,10 @@ export const PropagationMap: Record<string, unknown> & {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
// Legend — compact on mobile, moved to top-right to avoid timeline overlap
|
// Legend lives in the top-right on every viewport so the
|
||||||
const legend = L.control({ position: isMobile() ? "topright" : "bottomright" })
|
// 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 = () => {
|
legend.onAdd = () => {
|
||||||
const div = L.DomUtil.create("div")
|
const div = L.DomUtil.create("div")
|
||||||
const mobile = isMobile()
|
const mobile = isMobile()
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue