Removed old debugging code

This commit is contained in:
Magnus Åhall 2026-06-08 21:33:36 +02:00
parent 697576cb34
commit 48ac1a8044
2 changed files with 1 additions and 15 deletions

View file

@ -10,7 +10,6 @@ export class App {
this.crumbs = new N2Crumbs() this.crumbs = new N2Crumbs()
this.crumbsElement = document.getElementById('crumbs') this.crumbsElement = document.getElementById('crumbs')
this.nodeUI = document.getElementById('note') this.nodeUI = document.getElementById('note')
this.showNodeEventSequence = new ShowNodeEventSequence() // discard all GO_TO_NODE events
this.sidebar.render().then(sidebar => { this.sidebar.render().then(sidebar => {
document.getElementById('tree').append(sidebar) document.getElementById('tree').append(sidebar)
@ -198,7 +197,7 @@ export class App {
await this.sidebar.makeVisible(node, ancestors, dontExpand) await this.sidebar.makeVisible(node, ancestors, dontExpand)
_mbus.dispatch('CRUMBS_SET', ancestors, () => this.crumbsElement.replaceChildren(this.crumbs.render())) _mbus.dispatch('CRUMBS_SET', ancestors, () => this.crumbsElement.replaceChildren(this.crumbs.render()))
_mbus.dispatch('NODE_UI_OPEN', { node, eventSequence: this.showNodeEventSequence.next() }) _mbus.dispatch('NODE_UI_OPEN', node)
_mbus.dispatch('TREE_EXPANSION', { expand: false, when: 'narrow' }) _mbus.dispatch('TREE_EXPANSION', { expand: false, when: 'narrow' })
_mbus.dispatch('NODE_UNMODIFIED') _mbus.dispatch('NODE_UNMODIFIED')
}//}}} }//}}}
@ -208,18 +207,6 @@ export class App {
}// }}} }// }}}
} }
class ShowNodeEventSequence {
constructor() {
this.seq = 0
}
next() {
return ++this.seq
}
current() {
return this.seq
}
}
class N2Crumbs extends CustomHTMLElement { class N2Crumbs extends CustomHTMLElement {
static {// {{{ static {// {{{
this.tmpl = document.createElement('template') this.tmpl = document.createElement('template')

View file

@ -42,7 +42,6 @@ export class N2PageNodeUI extends CustomHTMLElement {
this.marked = new MarkedPosition() this.marked = new MarkedPosition()
_mbus.subscribe('NODE_UI_OPEN', event => { _mbus.subscribe('NODE_UI_OPEN', event => {
console.log(event.detail.data.eventSequence, _app.showNodeEventSequence.current())
this.node = event.detail.data.node this.node = event.detail.data.node
this.showMarkdown(true) this.showMarkdown(true)
this.render() this.render()