Only open categories with active layers by default

This commit is contained in:
Chandler Swift 2023-07-28 08:21:58 -05:00
parent eed4688c3b
commit 78f9830400
Signed by: chandlerswift
GPG key ID: A851D929D52FB93F

View file

@ -26,7 +26,7 @@ const map = new Map({
for (let category of layerCategories) { for (let category of layerCategories) {
const catDiv = document.createElement("div"); const catDiv = document.createElement("div");
catDiv.innerHTML = ` catDiv.innerHTML = `
<details open> <details ${category.layers.filter(l => l.enabled).length > 0 ? "open" : ""}>
<summary>${category.name}</summary> <summary>${category.name}</summary>
<ul></ul> <ul></ul>
</details> </details>