-
Notifications
You must be signed in to change notification settings - Fork 1
/
viz.html
32 lines (30 loc) · 1.12 KB
/
viz.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
<html>
<head>
<link rel="stylesheet" href="ScxmlViz.css"></link>
<script type="text/javascript" src="http://d3js.org/d3.v2.js"></script>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.8.2.js"></script>
<script type="text/javascript" src="ScxmlViz.js"></script>
<script type="text/javascript" src="lib/es5-shim.js"></script>
<script type="text/javascript">
var hash = window.location.hash,
dateLastModified = 0;
if(!hash){
alert('Please enter the name of an SCXML file to render in the local directory as a URL fragment');
}else{
console.log('hash',hash);
$.get(hash.slice(1), function(doc,textStatus,jqXhr){
var body = $('body');
body.empty();
ScxmlViz(body[0],doc,body.width(),body.height());
},'xml');
}
</script>
<style type="text/css">
body {
margin : 0px;
}
</style>
</head>
<body>
</body>
</html>