diff --git a/editor/src/index.js b/editor/src/index.js index 7cb9005..91a72d3 100644 --- a/editor/src/index.js +++ b/editor/src/index.js @@ -136,6 +136,27 @@ function showSearchResultsExtended(element, template, searchTool, query, input, }) } +function renderGraphs() { + $('code.language-dot').each(function (i, code) { + if (!code.innerText) { + return true + } + + let data = parseDOTNetwork(code.innerText) + let network = new Network(code, data, { + layout: { + randomSeed: 1239043 + } + }); + $(code).on('click', function () { + return false + }) + }) +} + +/* + * EVENTS + */ $(document).on('keydown', '.keyboard-list', function (event) { if (!$(':visible', this).length) { return true @@ -173,24 +194,6 @@ $(document).on('popup:selected', '#autocomplete', function (event, linkName, res } }) -function renderGraphs() { - $('code.language-dot').each(function (i, code) { - if (!code.innerText) { - return true - } - - let data = parseDOTNetwork(code.innerText) - let network = new Network(code, data, { - layout: { - randomSeed: 1239043 - } - }); - $(code).on('click', function () { - return false - }) - }) -} - const MD = new MarkdownIt({ linkify: true, highlight: function (str, lang) {