From 9d4c6ed770569382de9a2f830e44c8347ce623e5 Mon Sep 17 00:00:00 2001 From: Peter Stuifzand Date: Tue, 17 Aug 2021 21:24:57 +0200 Subject: [PATCH] Show graph in sidebar-right --- editor/src/index.js | 7 ++++--- templates/edit.html | 6 ------ templates/sidebar-right.html | 6 ++++++ 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/editor/src/index.js b/editor/src/index.js index 9d0314a..b2ad5ec 100644 --- a/editor/src/index.js +++ b/editor/src/index.js @@ -3,15 +3,16 @@ import moment from 'moment' import './styles.scss' import Editor from './editor' import MD from './markdown' +import wikiGraph from "./graph"; moment.locale('nl') // mermaid.initialize({startOnLoad: true}) // PrismJS.plugins.filterHighlightAll.reject.addSelector('.language-mermaid') // PrismJS.plugins.filterHighlightAll.reject.addSelector('.language-dot') -// $(function () { -// wikiGraph('.graph-network') -// }) +$(function () { + setTimeout(() => wikiGraph('.graph-network'), 1); +}) /* * EVENTS diff --git a/templates/edit.html b/templates/edit.html index cc2434f..63c89c0 100644 --- a/templates/edit.html +++ b/templates/edit.html @@ -36,12 +36,6 @@ {{ end }} - - {{ end }} diff --git a/templates/sidebar-right.html b/templates/sidebar-right.html index 3956a76..47afce6 100644 --- a/templates/sidebar-right.html +++ b/templates/sidebar-right.html @@ -2,5 +2,11 @@ {{ end }}