Only open categories with active layers by default
This commit is contained in:
parent
eed4688c3b
commit
78f9830400
2
main.js
2
main.js
|
@ -26,7 +26,7 @@ const map = new Map({
|
|||
for (let category of layerCategories) {
|
||||
const catDiv = document.createElement("div");
|
||||
catDiv.innerHTML = `
|
||||
<details open>
|
||||
<details ${category.layers.filter(l => l.enabled).length > 0 ? "open" : ""}>
|
||||
<summary>${category.name}</summary>
|
||||
<ul></ul>
|
||||
</details>
|
||||
|
|
Loading…
Reference in a new issue