-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtest_editgraph.html
49 lines (43 loc) · 1.63 KB
/
test_editgraph.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
37
38
39
40
41
42
43
44
45
46
47
48
49
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Boxgraph Test Page</title>
<script type="text/javascript">
djConfig =
{
isDebug: true,
debugAtAllCosts: true,
baseUrl: "./",
parseOnLoad: true,
modulePaths: {'boxgraph': './boxgraph'}
}
</script>
<!-- <script src="https://ajax.googleapis.com/ajax/libs/dojo/1.5.0/dojo/dojo.xd.js.uncompressed.js"></script> -->
<script src="http://ajax.googleapis.com/ajax/libs/dojo/1.6.1/dojo/dojo.xd.js.uncompressed.js"></script>
<script type="text/javascript">
dojo.require("boxgraph.editor");
dojo.ready(function()
{
var ta = dojo.byId("textarea");
dojo.subscribe("boxgraph_connect", function(p1, p2)
{
ta.innerHTML += "connect event for '"+p1.name+"' and '"+p2.name+"'\n";
});
dojo.subscribe("boxgraph_disconnect", function(p1, p2)
{
ta.innerHTML += "disconnect event for '"+p1.name+"' and '"+p2.name+"'\n";
});
var editor = new boxgraph.editor({routing: "manhattan", numbering: false}, dojo.byId("foo"));
})
</script>
</head>
<body>
<p>
<div id="foo" style="float:left;"></div>
<textarea id="textarea" cols="55" rows="20" style="float:right"></textarea>
</p>
<p style="clear:both">
BoxGraph on GitHub: <a href="https://github.com/psvensson/boxgraph">https://github.com/psvensson/boxgraph</a>
</p>
</body>
</html>