Removed old debugging code

This commit is contained in:
Magnus Åhall 2026-06-08 21:39:51 +02:00
parent 48ac1a8044
commit 92287e2076
2 changed files with 8 additions and 1 deletions

View file

@ -16,7 +16,7 @@ export class App {
document.getElementById('tree-nodes')?.focus()
})
_mbus.subscribe('TREE_TRUNK_FETCHED', async () => {
_mbus.subscribe('TREE_RENDERED', async () => {
// Subscribing to the start node existing after the tree trunk is
// fetched since the NODE_COMPONENT_EXIST message isn't sent for the
// root node itself, and the root node should be selected in the tree
@ -28,6 +28,8 @@ export class App {
if (startNode.UUID == ROOT_NODE)
this.goToNode(startNode.UUID, false, false)
else
this.goToNode(startNode.UUID, false, false)
})
_mbus.subscribe('TREE_NODE_SELECTED', event => {

View file

@ -160,6 +160,11 @@ export class N2Sidebar extends CustomHTMLElement {
this.treeNodeComponents[startnode.UUID] = starttreenode
this.elTreenodes.appendChild(await starttreenode.render())
// Notify the application that the initial tree is rendered (with children)
// and that initial node selection can take place. App will check URL to
// select the correct one.
_mbus.dispatch('TREE_RENDERED')
this.rendered = true
return this
}// }}}