-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.html
187 lines (141 loc) · 8.55 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
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
<html>
<head>
<meta charset="utf-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>GraphiniusVIS</title>
<link rel="stylesheet" type="text/css" href="css/index.css">
<link rel="stylesheet" type="text/css" href="css/cookiebanner.css">
</head>
<body onload="displayGraphCategories()">
<div class="container">
<div id="bg-cover" class="on"></div>
<img id="spinner" src="./img/spinner4.gif" width="255" height="255">
<div id="graph-modal">
<div class="header">
Categories / Graphs
</div>
<div class="entries">
</div>
<div class="footer">
<button onclick="hideGraphModal()">Cancel</button>
<button onclick="loadAndRenderGraph()">OK</button>
</div>
</div>
<!-- Most important section of all the site -->
<div id="cookieBanner">
<span class="cookieBannerText">
This website uses cookies to track user traffic via Google Analytics in accordance with the European General Data Protection Regulations (GDPR). Please have a look at our <a href="/gdpr/BMprivacyPolicy.pdf" target="_blank"/>Privacy Policy</a>, our <a href="/gdpr/BMcookiePolicy.pdf" target="_blank"/>Cookie Policy</a> or read the Google Analytics <a href="https://support.google.com/analytics/answer/3379636" target="_blank">Data Processing Terms</a>. Please confirm your agreement by clicking "OK".
</span>
<span id="cookieBannerOKButton" class="noselect" onclick="acceptsGACookie()">OK</span>
</div>
<div id="bg-controls">
<h2>BG controls</h2>
<h5>BG on / off</h5>
<div id="bg-on-off-button" class="on noselect">ON</div>
<h5>Brightness</h5>
<input type="range" min="1" max="100" value="80" class="slider" id="bg-brightness">
<h5>Blur</h5>
<input type="range" min="1" max="100" value="0" class="slider" id="bg-blur">
</div>
<div id="main_controls">
<h2>Controls</h2>
<!-- <h3>History subystem</h3>
<div class="onoffswitch">
<input type="checkbox" name="onoffswitch" class="onoffswitch-checkbox" id="historySwitch" checked onclick=$GV.view.controlUI.startStopHistory()>
<label class="onoffswitch-label" for="historySwitch">
<span class="onoffswitch-inner history"></span>
<span class="onoffswitch-switch"></span>
</label>
</div><br/> -->
<h4>Fetch stored graph</h4>
<button id="loadSampleGraphsListing" onclick="window.location.reload(true)">LOAD</button>
<!-- <button id="loadSampleGraphsCitiesListing" onclick="getGraphsCategoryListing('cities')">Load city graph listing</button> -->
<h4>...or load from disk</h4>
<form>
<input type="radio" id="undirected" name="direction" value="undirected" onclick><label for="undirected">undirected graph</label><br>
<input type="radio" id="directed" name="direction" value="directed" onclick><label for="directed">directed graph</label><br><br>
<form>
<input id="input" value="Read File" class="button" type="file" onchange="hideGraphModal(); $GV.input.json.readJSON(false, false, true, true)"><br><br>
<input id="renderButton" value="Render Graph" type="button" onclick="$GV.core.render.renderGraph()">
<h3>Graph Actions</h3>
<h4> Layout Algorithm: </h4>
<div class="onoffswitch">
<input type="checkbox" name="onoffswitch" class="onoffswitch-checkbox" id="forceLayoutSwitch" checked onclick=$GV.view.controlUI.startStopForce()>
<label class="onoffswitch-label" for="forceLayoutSwitch">
<span class="onoffswitch-inner force"></span>
<span class="onoffswitch-switch"></span>
</label>
</div><br/>
<!-- Node Size: <span id="node_size"> 3 </span> <br/>
<input id="node_size_input" type="range" min="1" max="50" step="1" value="3" /> <br/>
Line Width: <span id="force_speed_display">2</span> <br/>
<input id="force_speed" type="range" min="1" max="5" step=".01" value="2" /> <br/> -->
<input id="switch2DButton" value="Switch to 2D" type="button" onclick=$GV.view.interaction.switchTo2D()><br/>
<input id="switch3DButton" value="Switch to 3D" type="button" onclick=$GV.view.interaction.switchTo3D()><br/><br/>
<!-- <input id="changeNodeColorButton" value="Change Node Color" type="button" onclick=$GV.core.mutate.colorAllNodes(0)><br/>
<input id="changeEdgeColorButton" value="Change Edge Color" type="button" onclick=$GV.core.mutate.colorAllEdges(0)><br/><br/>
<input id="addRandomNodesButton" value="Add Random Node" type="button" onclick=$GV.core.mutate.addRandomNodes()><br/>
<input id="updateAllNodesButton" value="Update All Nodes" type="button" onclick=$GV.view.interaction.updateAll()><br/><br/> -->
<input id="randomBFSButton" value="BFS (random)" type="button" onclick=$GV.core.mutate.colorBFS(null)><br/>
<!-- <input id="chosenBFSButton" value="BFS (click)" type="button" onclick=$GV.core.mutate.colorBFSclick()><br/><br/> -->
<input id="randomDFSButton" value="DFS (random)" type="button" onclick=$GV.core.mutate.colorDFS(null)><br/>
<!-- <input id="chosenDFSButton" value="DFS (click)" type="button" onclick=$GV.core.mutate.colorDFSclick()><br/><br/> -->
<input id="randomPFSButton" value="PFS (random)" type="button" onclick=$GV.core.mutate.colorPFS(null)><br/>
<!-- <input id="chosenPFSButton" value="PFS (click)" type="button" onclick=$GV.core.mutate.colorPFSclick()><br/><br/> -->
<!-- <input id="chosenHideNodeButton" value="Hide Node (click)" type="button" onclick=$GV.core.mutate.hideNodeClick()><br/>
<input id="chosenColorNodeButton" value="Color Node (click)" type="button" onclick=$GV.core.mutate.colorSingleNodeClick()><br/>
<input id="chosenUpdateNodeButton" value="Update Node Position (click)" type="button" onclick=$GV.view.interaction.updateNodePositionClick()> -->
<h3>Graph Information</h3>
<div id="graphInfo">
Number of Nodes: <span id="nodes"></span><br/>
# Directed Edges: <span id="dir-edges"></span><br/>
# Undirected Edges: <span id="und-edges"></span><br/>
Loading time: <span id="time"></span><br/>
<!--
Time to read graph input file <span id="time"></span>
-->
</div>
</div>
<div id="main_vis">
<!-- <div id="fullscreenSwitch" onclick=$GV.view.fullscreen.switchToFullScreen('#containerGraph')> Fullscreen </div> -->
<!-- <div id="nodeInfo">Node ID: <span id="nodeID"></span></div> -->
<div id="nav-legend">
<span class="title">Navigation Control</span> </br>
PAN: Click+Mouse Move </br>
ROTATE: Shift+Click+Mouse</br>
ZOOM: Mouse Scroll</br>
ROTATE-Z: Alt+Mouse Scroll
</div>
</div>
</div>
<script type="text/javascript" src="lib/three.min.js"></script>
<script type="text/javascript" src="lib/hammer.min.js"></script>
<script type="text/javascript" src="lib/hammer.time.min.js"></script>
<script type="text/javascript" src="lib/graphinius.min.js"></script>
<script type="text/javascript" src="build/graphinius.vis.js"></script>
<script type="text/javascript" src="./fetchResources.js"></script>
<!-- https://berndmalle.com/graphinius-sample-data -->
<!-- FPS Counter -->
<script type="text/javascript" src='lib/stats.min.js'></script>
<script>
var stats = new Stats();
stats.showPanel( 0 ); // 0: fps, 1: ms, 2: mb, 3+: custom
stats.dom.style="position:fixed;top:5px;right:5px";
document.body.appendChild( stats.dom );
/**
* window.requestAnimationFrame collects all calls to it
* slowing down the following code - so we can use this snippet
* without including our actual graph rendering code inline...
*/
function animate() {
stats.begin();
// Usually, measured code would go here...
stats.end();
requestAnimationFrame( animate );
}
requestAnimationFrame( animate );
</script>
<script type="text/javascript" src="./src/helpers/gaCookies.js"></script>
</body>
</html>