Fixed regression of recursive expansion toggle

This commit is contained in:
Magnus Åhall 2026-06-16 10:12:48 +02:00
parent ea3bdaca03
commit f5cbfb0b22

View file

@ -438,11 +438,6 @@ export class N2Sidebar extends CustomHTMLElement {
return currNode return currNode
}//}}} }//}}}
async recursiveExpand(node, state) {//{{{ async recursiveExpand(node, state) {//{{{
if (!state) {
await this.setNodeExpanded(node, false)
return
}
if (state) if (state)
await this.setNodeExpanded(node, true) await this.setNodeExpanded(node, true)
@ -452,6 +447,9 @@ export class N2Sidebar extends CustomHTMLElement {
for (const child of node.Children) for (const child of node.Children)
await this.recursiveExpand(child, state) await this.recursiveExpand(child, state)
if (!state)
await this.setNodeExpanded(node, false)
}//}}} }//}}}
async makeVisible(node, providedAncestors, dontExpand) {// {{{ async makeVisible(node, providedAncestors, dontExpand) {// {{{
const treenode = this.treeNodeComponents[node.UUID] const treenode = this.treeNodeComponents[node.UUID]