Add basic WDG editor tool page

This commit is contained in:
Ladd Hoffman 2023-07-12 14:22:09 -05:00
parent 8fdde5aeb4
commit cf3c0372aa
3 changed files with 13 additions and 2 deletions

View File

@ -16,7 +16,7 @@
</p>
<h2>Tools</h2>
<ul>
<li><a href="./wdg-editor.html">Weighted Directed Graph Editor</a></li>
<li><a href="./wdg-editor">Weighted Directed Graph Editor</a></li>
</ul>
<h2>Example Scenarios</h2>
<p>

View File

@ -7,5 +7,7 @@
</head>
<body>
<h1>Weighted Directed Graph Editor</h1>
<h2><a href="../">DGF Prototype</a></h2>
<h1>Weighted Directed Graph Editor</h1>
<div id="scene"></div>
</body>

View File

@ -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();