forked from reioni90/SoBr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
14 lines (14 loc) · 814 Bytes
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
<!DOCTYPE html>
<html>
<head>
<script src="SoBrMain.js"></script>
</head>
<body>
<canvas id="SoBrCanvas" width="1024" height="480"></canvas>
<script type="text/javascript">
var canvas = document.getElementById("SoBrCanvas");
var json = "{\"rootNode\" : \"0\", \"nodes\": [{\"id\": \"0\", \"name\": \"first\", \"image\": \"none\"}, {\"id\": \"1\", \"name\": \"second\", \"image\": \"none\"}, {\"id\": \"2\", \"name\": \"third\",\"image\": \"none\"}, {\"id\": \"3\", \"name\": \"fourth\", \"image\": \"none\"}, {\"id\": \"4\", \"name\": \"fifth\", \"image\": \"none\"}], \"edges\":[{\"from\": \"0\", \"to\":"+ "\"1\"}, {\"from\": \"0\", \"to\":"+ "\"2\"}, {\"from\": \"0\",\"to\":"+ "\"3\"}, {\"from\": \"0\",\"to\":"+ "\"4\"}]}";
var graph = new SoBr(canvas, "JSON", json);
</script>
</body>
</html>