Removed old debugging code
This commit is contained in:
parent
48ac1a8044
commit
92287e2076
2 changed files with 8 additions and 1 deletions
|
|
@ -16,7 +16,7 @@ export class App {
|
||||||
document.getElementById('tree-nodes')?.focus()
|
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
|
// Subscribing to the start node existing after the tree trunk is
|
||||||
// fetched since the NODE_COMPONENT_EXIST message isn't sent for the
|
// 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
|
// 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)
|
if (startNode.UUID == ROOT_NODE)
|
||||||
this.goToNode(startNode.UUID, false, false)
|
this.goToNode(startNode.UUID, false, false)
|
||||||
|
else
|
||||||
|
this.goToNode(startNode.UUID, false, false)
|
||||||
})
|
})
|
||||||
|
|
||||||
_mbus.subscribe('TREE_NODE_SELECTED', event => {
|
_mbus.subscribe('TREE_NODE_SELECTED', event => {
|
||||||
|
|
|
||||||
|
|
@ -160,6 +160,11 @@ export class N2Sidebar extends CustomHTMLElement {
|
||||||
this.treeNodeComponents[startnode.UUID] = starttreenode
|
this.treeNodeComponents[startnode.UUID] = starttreenode
|
||||||
this.elTreenodes.appendChild(await starttreenode.render())
|
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
|
this.rendered = true
|
||||||
return this
|
return this
|
||||||
}// }}}
|
}// }}}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue