-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
147 lines (118 loc) · 4.07 KB
/
index.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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
<html>
<head>
<meta charset="utf-8">
<style>
.axis path,
.axis line {
fill: none;
stroke: black;
shape-rendering: crispEdges;
}
.axis text {
font-family: sans-serif;
font-size: 5px;
}
span {
font-size: 30px;
}
#view3 circle {
fill: #fff;
stroke: steelblue;
stroke-width: 0.5px;
}
#view3 .light circle {
stroke-width: 10px;
}
#view3 .link {
fill: none;
stroke: #ccc;
stroke-width: 0.8px;
}
</style>
</head>
<body>
<div id="slider">
<svg class="sliderCanvas" style="position: absolute;">
<rect class="slider" x="20" y="20" width="760" height="60" style="stroke: #000000; fill: #ffffff"></rect>
</svg>
<div id="controls">
<button type="button" class="Play">Play</button>
<button type="button" class="Stop">Stop</button>
</div>
</div>
<div id="view1" style="position: absolute;">
<svg class="canvas"></svg>
</div>
<div id="view2" style="position: absolute;">
<div id="ip">
<span id="dip">dip</span>
<span id="num" style="float:right">num</span>
<div id="view21"></div>
<span id="sip" style="float:right">sip</span>
<button id="back">back</button>
<button id="top">top</button>
</div>
<div id="port">
<span id="dport">dport</span>
<span id="pnum" style="float:right">num</span>
<div id="view22"></div>
<span id="sport" style="float:right">sport</span>
</div>
</div>
<div id="view3" style="position: absolute;"></div>
<script src="js/d3.js" charset="utf-8"></script>
<script>
var onResize = function() {
console.log(document.body.clientWidth);
console.log(document.body.clientHeight);
}
window.addEventListener("resize", onResize, true);
d3.select("#view1")
.style("left", 10)
.style("top", 10);
d3.select("#view2")
.style("left", (innerHeight - 100) / 2 * 1.1 + 10)
.style("top", 10);
d3.select("#view3")
.style("left", 10)
.style("top", (innerHeight - 100) / 2 + 10)
</script>
<script src="js/utils.js" charset="utf-8"></script>
<script src="js/slider.js" charset="utf-8"></script>
<script src="js/view1.js" charset="utf-8"></script>
<script src="js/view2.js" charset="utf-8"></script>
<script src="js/view3.js" charset="utf-8"></script>
<script>
//v3.setcallback([v1.otherCall], [v1.otherCall], [function(){}], [function(){}]);
function v1Select() {
var chosen = [];
var i = 0;
for (i = 0; i < v1.selected.length; ++i)
chosen[i] = v1.selected[i];
for (i = 0; i < chosen.length; ++i)
if (chosen[i]) break;
if (i === chosen.length)
for (i = 0; i < chosen.length; ++i)
chosen[i] = true;
var numberC = [];
for (i = 0; i < chosen.length; ++i)
if (chosen[i]) numberC[i] = 1;
else numberC[i] = 0;
v2.select(currentStartTime, currentEndTime, chosen);
v3.fresh(currentStartTime, currentEndTime, numberC);
}
function v2Select(chosen) {
v1.otherCall(chosen);
v3.fresh(currentStartTime, currentEndTime, chosen);
}
function v3MouseClick(chosen) {
var selected = [];
var i = 0;
for (i = 0; i < v1.selected.length; ++i)
selected[i] = v1.selected[i];
v2.select(currentStartTime, currentEndTime, selected);
}
v3.setcallback([v1.otherCall], [v1.otherCall], [v1.otherCall, v3MouseClick], [v1.otherCall, v3MouseClick]);
</script>
</body>
</html>