-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.html
54 lines (52 loc) · 1.85 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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>3D rat brain atlas (Papp et al. 2014, Kjonigsen et al. 2015)</title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<!-- Attributes with the prefix "v-", `:`, or `@` are
parsed by the JavaScript UI framework "Vue".
See: https://vuejs.org
-->
<div id="atlas-app">
<div id="viewer"></div>
<div id="sidebar">
<!-- Make a list of brain structures, to allow
the user to choose the ones to display.
-->
<ul id="ontology">
<li class="group" v-for="group in ontology">
<input type="checkbox"
v-model="group.visible"
@click="group.structures.forEach((s)=>{s.visible=!group.visible})">
<!-- `NOT`, cause the @click happens before the v-model update -->
<span :class="{ withChildren: !group.singleton,
open: !group.collapsed }"
@click="group.collapsed = !group.collapsed">
{{ group.name }}
</span>
<ul v-if="!group.collapsed && !group.singleton">
<li v-for="struct in group.structures">
<input type="checkbox"
:id="'checkbox-struct-' + struct.name"
v-model="struct.visible">
<label :for="'checkbox-struct-' + struct.name">
{{ struct.name }}
</label>
</li>
</ul>
</li>
</ul>
</div>
</div>
<script src="lib/vue.js"></script>
<script src="lib/three.min.js"></script>
<script src="lib/STLLoader.js"></script>
<script src="lib/OrbitControls.js"></script>
<script src="viewer.js"></script>
<script src="data.js"></script>
<script src="app.js"></script>
</body>
</html>