-
Notifications
You must be signed in to change notification settings - Fork 0
/
JSAVallStructures.html
64 lines (61 loc) · 1.55 KB
/
JSAVallStructures.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
56
57
58
59
60
61
62
63
64
<!DOCTYPE html>
<html>
<head>
<title>Example of All Data Structures in JSAV</title>
<link rel="stylesheet" href="/assets/css/JSAV.css" type="text/css" media="screen" title="no title" charset="utf-8" />
<style>
#av {
width: 98%;
position: relative;
}
.jsavcounter {
position: absolute;
top: 15px;
}
.jsavtree {
position: relative;
width: 500px;
height: 300px;
}
.jsavgraph {
margin-top: 50px;
}
.jsavlabel {
font-size: 200%;
text-align: center;
margin: 30px 0 10px 0;
}
.jsavedgelabel {
font-size: 100%;
margin: 0;
}
</style>
</head>
<body>
<h1>Example of All Data Structures in JSAV</h1>
<div id="av">
</div>
<script src="/assets/js/jquery.min.js"></script>
<script src="/assets/js/jquery-ui.min.js"></script>
<script src="/assets/js/jquery.transit.js"></script>
<script src="/assets/js/raphael.js"></script>
<script src="/assets/js/JSAV.js"></script>
<script>
var jsav = new JSAV("av");
var arr = [1, 2, 3, 4, 5, 6, 7, 8];
jsav.label("Indexed Array");
var arr4 = jsav.ds.array(arr, {indexed: true});
arr4.highlight(2);
arr4.css(4, {"background-color": "aqua", "color": "rgb(150, 55, 50)"});
arr4.layout();
jsav.displayInit();
jsav.recorded(); // done recording changes, will rewind
$(".jsavtreenode").live("hover", function() {
//console.log($(this).text(), $(this).offset().left, $(this).offset().top);
});
$("path").live("hover", function() {
//console.log($(this).attr("d"));
});
</script>
</body>
</html>