-
Notifications
You must be signed in to change notification settings - Fork 9
/
example.html
36 lines (29 loc) · 859 Bytes
/
example.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<!DOCTYPE html>
<html>
<body>
<h1>HDElk Bare Bones Example</h1>
<script src="js/elk.bundled.js"></script>
<script src="js/svg.min.js"></script>
<script src="js/hdelk.js"></script>
<div id="simple_diagram"></div>
<script type="text/javascript">
var simple_graph = {
id: "",
children: [
{ id: "in", port: 1 },
{ id: "one", ports: ["in", "out"] },
{ id: "two", highlight:1, ports: ["in", "out"] },
{ id: "three", ports: ["in", "out"] },
{ id: "out", port: 1 }
],
edges: [
["in","one.in"],
{route:["one.out","two.in"],highlight:1},
{route:["two.out","three.in"],highlight:1,bus:1},
{route:["three.out","out"], bus:1 }
]
}
hdelk.layout( simple_graph, "simple_diagram" );
</script>
</body>
</html>