link map in sidebar POC

This commit is contained in:
zadam
2019-07-21 21:55:48 +02:00
parent eb28a3b0c9
commit 849fad0421
4 changed files with 248 additions and 9 deletions

View File

@@ -1,4 +1,5 @@
import NoteInfoWidget from "../widgets/note_info.js";
import LinkMapWidget from "../widgets/link_map.js";
const WIDGET_TPL = `
<div class="card widget">
@@ -46,7 +47,7 @@ class Sidebar {
this.$widgets.empty();
this.addNoteInfoWidget();
this.addNoteInfoWidget();
this.addLinkMapWidget();
}
async addNoteInfoWidget() {
@@ -55,6 +56,15 @@ class Sidebar {
const noteInfoWidget = new NoteInfoWidget(this.ctx, $widget);
await noteInfoWidget.renderBody();
this.$widgets.append($widget);
}
async addLinkMapWidget() {
const $widget = this.createWidgetElement();
const linkMapWidget = new LinkMapWidget(this.ctx, $widget);
await linkMapWidget.renderBody();
console.log($widget);
this.$widgets.append($widget);