-
Notifications
You must be signed in to change notification settings - Fork 5
/
tree.html
123 lines (111 loc) · 2.54 KB
/
tree.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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
<html>
<head>
<script src="//d3js.org/d3.v3.min.js"></script-->
<script src="//code.jquery.com/ui/1.11.4/jquery-ui.js"></script>
<link rel="stylesheet" href="//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css">
<script src="js/jquery.min.js"></script>
<script src="js/spin.min.js"></script>
<script src="js/d3.v3.min.js"></script>
<style>
body{
overflow: visible;
}
.node circle {
cursor: pointer;
fill: #fff;
stroke: steelblue;
stroke-width: 1.5px;
}
.node text {
font-size: 11px;
}
path.link {
fill: none;
stroke: #ccc;
stroke-width: 1.5px;
}
path.link.trace {
stroke : palegreen;
}
path.link:hover {
stroke: darksalmon;
}
svg {
overflow: scroll;
width: 12000;
}
#tree{
position: relative;
overflow: visible;
z-index: 3;
top : 70px;
}
#control {
position: fixed;
left: 20px;
bottom: 20px;
z-index:4;
}
#arrowcontrol {
position: fixed;
left: 20px;
bottom: 50px;
z-index:4;
}
.square {
position: absolute;
background: steelblue;
float: left;
height: 30px;
width: 30px;
border: 0px solid steelblue;
line-height: 30px;
text-align: center;
font-size: 20pt;
cursor: pointer;
}
.square:hover {
background: red;
}
#loading {
display: visible;
position: fixed;
z-index: 1000;
top: 50%;
left: 50%;
height: 100%;
width: 100%;
}
input[type="number"] {
width:50px;
}
#arrowbox{ width: 90px; height: 90px }
#square_top { top: 0px; left:30px;}
#square_right { right: 0px; top:30px;}
#square_left { left: 0px; top:30px;}
#square_bottom { bottom: 0px; left:30px;}
#inputs { display: inline;}
</style>
</head>
<body>
<div id="loading"></div>
<div id="control">
<div id="arrowcontrol">
<div id=arrowbox>
<div class=square id=square_top onclick="javascript:resize('x','+')">+</div>
<div class=square id=square_left onclick="javascript:resize('y','-')">-</div>
<div class=square id=square_right onclick="javascript:resize('y','+')">+</div>
<div class=square id=square_bottom onclick="javascript:resize('x','-')">-</div>
</div>
</div>
<div id="inputs">
<input type="number" id="depth" name="depth" value="2" size="2" max="99" />
<input type="button" id="expand" value="Expand" onclick="javascript:init()" />
<input type="button" id="trace_btn" value="Trace" onclick="javascript:follow_trace()" />
</div>
</div>
<div id="tree">
</div>
<script src=js/tree.js> </script>
</body>
</html>