import { Box } from '../../classes/box.js'; import { Scene } from '../../classes/scene.js'; import { WDAG } from '../../classes/wdag.js'; const rootElement = document.getElementById('scene'); const rootBox = new Box('rootBox', rootElement).flex(); window.scene = new Scene('WDAG test', rootBox); const graph = (window.graph = new WDAG(window.scene).withFlowchart()); const v = (window.v = []); function addVertex() { const vertex = graph.addVertex({ seq: window.v.length }); v.push(vertex); } addVertex(); addVertex(); addVertex(); addVertex(); addVertex(); graph.addEdge('e1', 0, 1, 1); graph.addEdge('e1', 2, 1, 0.5); graph.addEdge('e1', 3, 1, 0.25); graph.addEdge('e1', 1, 4, 0.125);