diff --git a/backend/filesystem/library_demo/config.json b/backend/filesystem/library_demo/config.json index e051097f8..b221d0df2 100644 --- a/backend/filesystem/library_demo/config.json +++ b/backend/filesystem/library_demo/config.json @@ -1 +1,8 @@ -{"name": "library_demo", "config": {"editorShowAccentColors": true, "theme": "dark", "btOrder": "bottom-to-top"}} \ No newline at end of file +{ + "name": "library_demo", + "config": { + "editorShowAccentColors": true, + "theme": "dark", + "btOrder": "top-to-bottom" + } +} \ No newline at end of file diff --git a/frontend/src/components/tree_editor/DiagramVisualizer.tsx b/frontend/src/components/tree_editor/DiagramVisualizer.tsx index fc108d211..6eb373ee6 100644 --- a/frontend/src/components/tree_editor/DiagramVisualizer.tsx +++ b/frontend/src/components/tree_editor/DiagramVisualizer.tsx @@ -1,5 +1,9 @@ import React, { useRef, memo, useState } from "react"; -import createEngine, { DiagramModel, NodeModel, NodeModelGenerics } from "@projectstorm/react-diagrams"; +import createEngine, { + DiagramModel, + NodeModel, + NodeModelGenerics, +} from "@projectstorm/react-diagrams"; import { CanvasWidget } from "@projectstorm/react-canvas-core"; import "./DiagramEditor.css"; @@ -104,16 +108,16 @@ const updateBlackboardValues = ( const blackboardRegex = /^\{[^}]*\}/i; let tags = model.getNodes().filter(function (node) { return node instanceof TagNodeModel && blackboardRegex.test(node.getName()); - }) + }); console.log(tags); - let notFoundTags:NodeModel[] = [] + let notFoundTags: NodeModel[] = []; - Object.entries(blackboard).forEach(element => { - console.log(element) + Object.entries(blackboard).forEach((element) => { + console.log(element); for (let index = 0; index < tags.length; index++) { const tag = tags[index] as TagNodeModel; - let tagSplit = tag.getName().split(" = ") + let tagSplit = tag.getName().split(" = "); const tagStr = tagSplit[0].slice(1, -1); // Remove {} if (tagStr === element[0]) { tag.setName(`{${tagStr}} = ${element[1]}`); @@ -171,11 +175,7 @@ const DiagramVisualizer = memo( treeStructure, subTreeStructure, ); - updateBlackboardValues( - model.current, - engine.current, - updateBlackboard - ) + updateBlackboardValues(model.current, engine.current, updateBlackboard); } };