Skip to content

Commit

Permalink
legend prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
neon-ninja committed Jul 17, 2024
1 parent 6fafc4e commit e753c11
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,13 @@
var div = L.DomUtil.create('div', 'info legend');
div.innerHTML += "<h4>Trend (m / year)</h4>"
for (var i = -3; i <= 3; i++) {
div.innerHTML += `<i style="background:${cmap(i).css()}"></i>${i}<br>`
var prefix = ""
if (i == -3) {
prefix = "≤ "
} else if (i == 3) {
prefix = "≥ "
}
div.innerHTML += `<i style="background:${cmap(i).css()}"></i>${prefix + i}<br>`
}
return div;
};
Expand Down

0 comments on commit e753c11

Please sign in to comment.