-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
133 lines (122 loc) · 2.03 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
<!DOCTYPE html>
<html>
<meta charset="UTF-8">
<style>
/* style definitions */
* {
font: 12px verdana;
}
.node circle{
stroke: #777;
stroke-width: 0px;
}
.split_left {
height: 90%;
width: 80%;
position: fixed;
z-index: 1;
top: 0;
overflow-x: hidden;
left: 0;
}
.split_right {
height: 90%;
width: 20%;
position: fixed;
z-index: 1;
top: 0;
overflow-x: hidden;
right: 0;
}
.split_bottom {
height: 10%;
width: 100%;
position: fixed;
z-index: 1;
bottom:0;
overflow-x: hidden;
left:0
right:0;
background:white;
}
.link {
stroke: #c1c1c1;
stroke-width: 1px;
}
.new_link {
stroke: #c1c1c1;
stroke-width: 1px;
}
.link.arrow {
stroke: #51768C;
stroke: #c1c1c1;
}
.link.prey {
stroke: #EE7560;
stroke: #c1c1c1;
}
.controls{
display: inline-block;
}
button {
border-radius: 8px;
font-size: 16px;
background-color: #e7e7e7;
color: black;
border: 2px solid #e7e7e7;
}
button:hover {
background-color: #e7e7e7;
background-color: white;
}
.tooltip {
top: 50%;
left:0%;
transform: translate(0%, -50%);
position: absolute;
background: #DDDDDD;
text-align: center;
width: 200px;
height: 400px;
padding: 5px;
font: 15px verdana;
border-radius: 10px;
box-shadow: 1px 1px 1px rgba(0, 0, 0, .1);
}
.centered {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
text-align: center;
}
</style>
<body>
<!--The screen-->
<div>
<!--Left-->
<div class = "split_left">
<div class="centered">
<svg id="networkSvg"></svg>
</div>
</div>
<!--Right-->
<div class = "split_right">
<div><div id = "tooltipDiv" class="tooltip"></div>
<svg id="tooltipSvg"></svg>
</div>
</div>
<!--Bottom-->
<div class ="split_bottom">
<div class="controls">
<button id="zoom_in">+</button>
<button id="zoom_out">-</button>
<button id="reset">Reset</button>
</div>
</div>
</div>
<script src="https://d3js.org/d3.v4.min.js"></script>
<script src="https://d3js.org/d3-scale-chromatic.v1.min.js"></script>
<script src="trophic_web.js"></script>
</body>
</html>