Display color next to layer name
This should make it easier to disambiguate layers that are otherwise hard to tell apart.
This commit is contained in:
parent
1ad82c55ee
commit
26c5b56d58
2
main.js
2
main.js
|
@ -218,7 +218,7 @@ function newCustomLayer(name, sourceURL, colorString) {
|
|||
}),
|
||||
});
|
||||
li.innerHTML = `
|
||||
<label><input type="checkbox" checked> ${name}</label>
|
||||
<label><input type="checkbox" checked><div class="color-badge" style="background-color: rgb(${color.join(', ')});"></div> ${name}</label>
|
||||
`;
|
||||
li.querySelector("input").addEventListener("change", function(e){
|
||||
if (e.target.checked) {
|
||||
|
|
Loading…
Reference in a new issue