Add basic WDG editor tool page
This commit is contained in:
parent
8fdde5aeb4
commit
cf3c0372aa
|
@ -16,7 +16,7 @@
|
||||||
</p>
|
</p>
|
||||||
<h2>Tools</h2>
|
<h2>Tools</h2>
|
||||||
<ul>
|
<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>
|
</ul>
|
||||||
<h2>Example Scenarios</h2>
|
<h2>Example Scenarios</h2>
|
||||||
<p>
|
<p>
|
||||||
|
|
|
@ -7,5 +7,7 @@
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<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>
|
</body>
|
|
@ -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();
|
Loading…
Reference in New Issue