From 86e01748ef241d2c4fc5a4cd3b7d4001e651715a Mon Sep 17 00:00:00 2001 From: Graham McIntire Date: Mon, 30 Mar 2026 17:30:58 -0500 Subject: [PATCH] Fix legend readability with explicit text color --- assets/js/propagation_map_hook.js | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/assets/js/propagation_map_hook.js b/assets/js/propagation_map_hook.js index 7aada7b9..19a93e8b 100644 --- a/assets/js/propagation_map_hook.js +++ b/assets/js/propagation_map_hook.js @@ -31,17 +31,19 @@ export const PropagationMap = { const legend = L.control({ position: "bottomright" }) legend.onAdd = () => { - const div = L.DomUtil.create("div", "leaflet-legend") - div.innerHTML = ` -
- Propagation
- Excellent (80-100)
- Good (65-79)
- Marginal (50-64)
- Poor (33-49)
- Negligible (0-32) -
- ` + const div = L.DomUtil.create("div") + div.style.cssText = "background:#fff;color:#333;padding:10px 14px;border-radius:8px;box-shadow:0 2px 8px rgba(0,0,0,0.3);font-size:13px;line-height:2;" + const rows = [ + ["#00ffa3", "Excellent (80-100)"], + ["#7dffd4", "Good (65-79)"], + ["#ffe566", "Marginal (50-64)"], + ["#ff9044", "Poor (33-49)"], + ["#ff4f4f", "Negligible (0-32)"] + ] + div.innerHTML = "Propagation
" + + rows.map(([c, label]) => + `${label}` + ).join("
") return div } legend.addTo(this.map)