diff --git a/src/components/EditorWindow.vue b/src/components/EditorWindow.vue index 7b65018..aeefae3 100644 --- a/src/components/EditorWindow.vue +++ b/src/components/EditorWindow.vue @@ -212,8 +212,18 @@ async function addSelectedNode() { selectNode(nodes[0]) } +function findNode(code: string): GraphNode { + const nodes = graph.value.nodes.filter(function (it: GraphNode) { + return it.code == code + }) + return nodes[0] +} + function nodeHeader(node: GraphNode): string { - return "[" + node.code + "] - " + node.name + if (node == undefined) { + return "undefined" + } + return "[" + node.code + "]: " + node.name } function showGraph(show: boolean) { @@ -252,7 +262,7 @@ function showGraph(show: boolean) {