-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtest_treehugger.html
55 lines (49 loc) · 2.22 KB
/
test_treehugger.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
50
51
52
53
54
55
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Boxgraph Treehugger Test Page</title>
<script type="text/javascript">
djConfig =
{
isDebug: true,
debugAtAllCosts: true,
baseUrl: "./",
parseOnLoad: true,
modulePaths: {'boxgraph': './boxgraph'}
}
</script>
<script src="http://ajax.googleapis.com/ajax/libs/dojo/1.6.1/dojo/dojo.xd.js.uncompressed.js"></script>
<script src="https://raw.github.com/ajaxorg/treehugger/master/lib/require.js"></script>
<script src="https://raw.github.com/ajaxorg/treehugger/master/lib/jquery.js"></script>
<script src="https://raw.github.com/ajaxorg/treehugger/master/lib/treehugger/tree.js"></script>
<script src="https://raw.github.com/ajaxorg/treehugger/master/lib/treehugger/traverse.js"></script>
<script src="https://raw.github.com/ajaxorg/treehugger/master/lib/treehugger/js/parse.js"></script>
<script src="https://raw.github.com/ajaxorg/treehugger/master/lib/treehugger/js/infer.js"></script>
<!-- <script src="http://download.dojotoolkit.org/release-1.6.1/dojo-release-1.6.1/dojo/dojo.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: "curved", numbering: true}, dojo.byId("foo"));
})
</script>
</head>
<body>
<p>
<div id="foo" style="float:left;"></div>
<textarea id="textarea" cols="50" 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>