-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
263 lines (236 loc) · 10.9 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
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
<!-- note: no ng-app here. App is booted manually in Ecostem.js. It seems
that when using ng-app with Traceur, Angular tries to boot before Traceur
has had a chance to compile Ecostem.js -->
<html>
<head>
<title>Ecostem</title>
<meta http-equiv="content-type" content="text/html; charset=UTF8">
<link rel="stylesheet" type="text/css" href="lib/leaflet/leaflet.css"/>
<link rel="stylesheet" type="text/css" href="css/ecostem.css"/>
<link rel="stylesheet" type="text/css" href="css/svg.css"/>
<!-- <link rel="stylesheet" type="text/css" href="css/icomoon.css"/> -->
<link rel="stylesheet" type="text/css" href="img/svg/icomoon/style.css">
<!-- traceur compiler -->
<script src="lib/traceur/traceur.js"></script>
<!-- in-browser bootstrap for traceur -->
<script src="lib/traceur/bootstrap.js"></script>
<script src="https://cdn.firebase.com/js/client/1.0.2/firebase.js"></script>
<script src='https://cdn.firebase.com/js/simple-login/1.4.1/firebase-simple-login.js'></script>
<script src="lib/agentscript.js"></script>
<script src="lib/data.js"></script>
<script src="lib/underscore.js"></script>
<script src="lib/jquery-1.10.2.js"></script>
<script src="lib/jquery.event.drag-2.2/jquery.event.drag-2.2.js"></script>
<script src="lib/leaflet/leaflet-src.js"></script>
<script src="lib/angular/angular.js"></script>
<script src="lib/angular/angular-route.js"></script>
<script src="lib/angular/angular-touch.js"></script>
<script src="lib/angular/angular-animate.js"></script>
<script src="lib/d3.js"></script>
<script src="lib/Smooth-0.1.7.js"></script>
<script src="lib/curveFit.js"></script>
<script src="lib/filer.js"></script>
<script src="lib/AnySurface.js"></script>
<!-- ES6 app entrypoint -->
<script type="module">
/* boots the app */
import "./js/App";
</script>
</head>
<body>
<!-- init splash screen. The way this works could be a bit strange,
because it shows up before any of the code gets compiled
and before the angular application boots. -->
<div class="splash" splash-screen>
<div class="title">Ecostem</div>
<!-- this shows up first -->
<div class="subtitle">
Loading Ecostem.<span class="loader">.</span>
</div>
<!-- when the app loads, this gets uncloked and occludes the
Loading data... dialog -->
<div class="subtitle" ng-cloak>
Loading elevation data.<span class="loader">.</span>
</div>
</div>
<div class="container" ng-controller="EcostemCtrl" main-container>
<!-- div that blocks off the map so you can drag the mouse on it for drawing -->
<div class="cover" ng-show="editedLayer && editedLayer.model.uiOpts.canPaint" drawing-surface></div>
<!-- loading... popup -->
<div class="uibox loading" ng-show="elevationIsLoading">Loading elevation data...</div>
<!-- layer publishing popup -->
<div class="uibox server-popup" ng-show="serverPopupIsOpen">
Name: <input type="text" ng-model="serverLayerName"></input>
<button ng-click="startServer()">Publish</button>
<button ng-click="initStartServer()">Cancel</button>
</div>
<!-- map container -->
<div id="map" map-body></div>
<!-- elevation debugging canvas -->
<div id="elevation" ng-show="showElevation">
<canvas id="elevationCanvas" elevation-canvas/>
</div>
<!-- more debugging canvases -->
<div id="quad" ng-show="showQuad">
<canvas id="quadCanvas"/>
</div>
<div id="slope" ng-show="showSlope">
<canvas id="slopeCanvas1"></canvas>
<canvas id="slopeCanvas2"></canvas>
<canvas id="slopeCanvas3"></canvas>
</div>
<!-- transfer function editor -->
<div class="editor uibox" ng-show="activeTransferFunction">
<div class="header">
Editing {{activeTransferFunction.title}}
<button style="float: right" ng-click="closeActiveTransferFunction()">Done Editing</button>
</div>
<div class="section" style="width: 100%;">
<hr/>
<div class="section" style="height: 400px; width: 100%;">
<svg id="transfer-function-svg"></svg>
</div>
</div>
</div>
<!-- layer editor (Painting) -->
<div class="editor uibox" ng-show="editedLayer">
<div class="header">
Editing {{editedLayer.name}}
<button style="float: right" ng-click="doneEditingDataLayer()">Done Editing</button>
</div>
<div>
<hr/>
<div class="section">
<h2>Choose a brush:</h2>
<div ng-repeat="b in brushSizes"
ng-click="selectBrushSize(b)"
class="brush" ng-class="{'selected':selectedBrushSize==b}"
style="width: {{b}}; height: {{b}}; background-color: {{scaleValue.color}}"></div>
</div>
<div class="section">
<h2>Choose a value:</h2>
<select ng-model="scaleValue"
ng-options="v.name for v in scaleValues"
ng-change="scaleValueChanged()">
</select>
</div>
</div>
</div>
<!-- container for top navigation -->
<div class="top-container" ng-show="elevationLoaded && !editedLayer && !activeTransferFunction">
<!-- home button -->
<!-- <div class="home uibox" ng-click="map.setHomeView()">
<img src="img/home.png"/> -->
<!--button ng-click="scanFlat()">Flat Scan</button><br/>
<button ng-show="scanFlatDone" ng-click="scanMountain()">Mound Scan</button-->
<!-- </div> -->
<!-- Sensors menu -->
<!-- <div class="layers uibox">
<h3 ng-click="addSensor()">Add Sensor</h3>
<div ng-show="addingSensor" style="padding-bottom: 5px">
<hr/>
Click in the scenario box to add a sensor at that point.
<hr/>
<button ng-click="cancelAddingSensor()">Cancel</button>
</div>
</div> -->
</div>
<div class="play-controls" ng-show="elevationLoaded">
<div class="uibox time">{{main.animator.hours | timeformat}} : {{main.animator.minutes | timeformat}}</div>
<div class="controls">
<img ng-show="!main.animator.isRunning" ng-click="main.animator.start()" src="img/play.png"/>
<img ng-show="main.animator.isRunning" ng-click="main.animator.stop()" src="img/pause.png"/>
<img ng-show="!main.animator.isRunning" ng-click="main.animator.step()" src="img/play1.png"/>
<img ng-click="main.animator.reset()" src="img/stop.png"/>
</div>
</div>
<!-- mode indicator -->
<div id="interaction-indicator">
<div ng-class="{ 'icon-brush': true }"></div>
</div>
<!-- rooms widget -->
<div rooms-widget></div>
<!-- menu -->
<div class="menu">
<div class="level-1" ng-show="menuVisible">
<div class="generic-menu-layout">
<div class="main-menu-item" ng-class="{ toggled: curMenu == 'layers' }" ng-click="toggleSubMenu('layers')">
<span>Base Layers</span>
</div>
<div class="main-menu-item" ng-class="{ toggled: curMenu == 'models' }" ng-click="toggleSubMenu('models')">
<span>Models</span>
</div>
<div class="main-menu-item" ng-class="{ toggled: curMenu == 'tfuncs' }" ng-click="toggleSubMenu('tfuncs')">
<span>Transfer Functions</span>
</div>
<div class="main-menu-item" ng-click="showRooms()">
<span>Join a Room</span>
</div>
</div>
</div>
<div class="level-2" ng-show="menuVisible && curMenu">
<!-- base layer menu -->
<div class="generic-menu-layout" ng-show="curMenu == 'layers'">
<div class="generic-menu-item" ng-repeat="layer in map.baseLayers" ng-class="{'menu-item-active': map.isBaseLayer(layer)}" eco-background="layer" ng-click="setBaseLayer(layer)">
<div class="menu-item-header">
{{ layer.name }}
</div>
</div>
<!-- <hr/> -->
<div class="generic-menu-item" ng-repeat="layer in map.layers" ng-class="{'menu-item-active': layer.on}" eco-background="layer" ng-click="toggleLayer(layer)">
<div class="menu-item-header">
{{ layer.name }}
</div>
</div>
</div>
<!-- models menu -->
<div class="generic-menu-layout" ng-show="curMenu == 'models'">
<div class="generic-menu-item" ng-class="{'menu-item-active': layer.on}" ng-repeat="layer in main.modelLayers" ng-click="toggleLayer(layer)">
<div class="menu-item-header">
{{ layer.name }}
</div>
<div eco-icon='{{ layer.name }}'></div>
<div class="menu-item-content">
<div class="item-action"
ng-show="layer.model.uiOpts.canPaint"
ng-class="{'active-button':layer.editing}"
ng-click="editDataLayer(layer); $event.stopPropagation()">Paint</div>
<div class="item-action menu-item-active"
ng-show="layer.model.server.isRunning"
ng-click="stopServingTiles(layer); $event.stopPropagation()">Unpublish</div>
<div class="item-action"
ng-show="! layer.model.server.isRunning"
ng-click="serveTiles(layer); $event.stopPropagation()">Publish</div>
</div>
<br/>
</div>
<!-- <hr/> -->
<!--div class="generic-menu-item">
<a ng-click="showElevation=!showElevation" ng-show="elevationLoaded">
<span ng-show="!showElevation">Show Raw Elevation</span>
<span ng-show="showElevation">Hide Raw Elevation</span>
</a>
<br/>
<a ng-click="showQuad=!showQuad" ng-show="elevationLoaded">
<span ng-show="!showQuad">Show Quad</span>
<span ng-show="showQuad">Hide Quad</span>
</a>
</div-->
</div>
<!-- transfer functions menu -->
<div class="generic-menu-layout" ng-show="curMenu == 'tfuncs'">
<div class="generic-menu-item" ng-repeat="tf in transferFunctions" ng-click="setActiveTransferFunction(tf)">
<div class="menu-item-header">
{{ tf.title }}
</div>
</div>
</div>
</div>
<!-- menu toggle arrow -->
<div class="menu-toggle-wrapper" ng-click="toggleMainMenu()" ng-swipe-left="toggleMainMenu()" ng-swipe-right="toggleMainMenu()">
<div class="menu-toggle" ng-class="{ 'icon-triangle-left': !menuVisible, 'icon-triangle-right': menuVisible, 'toggled': menuVisible }"></div>
</div>
</div>
</div>
</body>
</html>