widgetizing tree WIP

This commit is contained in:
zadam
2020-01-12 11:15:23 +01:00
parent b12e38c231
commit 61474defff
13 changed files with 188 additions and 243 deletions

View File

@@ -17,11 +17,13 @@ class AppContext {
showWidgets() {
const $leftPane = $("#left-pane");
this.noteTreeWidget = new NoteTreeWidget(this);
this.widgets = [
new GlobalButtonsWidget(this),
new SearchBoxWidget(this),
new SearchResultsWidget(this),
new NoteTreeWidget(this)
this.noteTreeWidget
];
for (const widget of this.widgets) {
@@ -30,6 +32,13 @@ class AppContext {
$leftPane.append($widget);
}
}
/**
* @return {NoteTreeWidget}
*/
getMainNoteTree() {
return this.noteTreeWidget;
}
}
const appContext = new AppContext();