From cf3c0372aa72453121237d42e7ab2ecc6df7d001 Mon Sep 17 00:00:00 2001 From: Ladd Hoffman Date: Wed, 12 Jul 2023 14:22:09 -0500 Subject: [PATCH] Add basic WDG editor tool page --- src/index.html | 2 +- src/wdg-editor/index.html | 4 +++- src/wdg-editor/index.js | 9 +++++++++ 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/index.html b/src/index.html index 112f1ef..d7ec81c 100644 --- a/src/index.html +++ b/src/index.html @@ -16,7 +16,7 @@

Tools

Example Scenarios

diff --git a/src/wdg-editor/index.html b/src/wdg-editor/index.html index a47c3fd..909a769 100644 --- a/src/wdg-editor/index.html +++ b/src/wdg-editor/index.html @@ -7,5 +7,7 @@ -

Weighted Directed Graph Editor

+

DGF Prototype

+

Weighted Directed Graph Editor

+
\ No newline at end of file diff --git a/src/wdg-editor/index.js b/src/wdg-editor/index.js index e69de29..004f9dc 100644 --- a/src/wdg-editor/index.js +++ b/src/wdg-editor/index.js @@ -0,0 +1,9 @@ +import { Box } from '../classes/display/box.js'; +import { Scene } from '../classes/display/scene.js'; +import { WeightedDirectedGraph } from '../classes/supporting/wdg.js'; + +const rootElement = document.getElementById('scene'); +const rootBox = new Box('rootBox', rootElement).flex(); +window.disableSceneControls = true; +window.scene = new Scene('WDG Editor', rootBox); +window.graph = new WeightedDirectedGraph('new', window.scene, { editable: true }).withFlowchart();