-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
262 lines (247 loc) · 11.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
<!DOCTYPE HTML>
<html>
<head>
<meta charset="UTF-8">
<meta property='og:title' content='CRB Explorer'/>
<meta property='og:image' content='https://jperryhouts.github.io/CRB-Explorer/social-preview.png'/>
<meta property='og:description' content='An interactive webtool for visualizing geologic contacts between geologic units in the Columbia River Basalt Group.'/>
<meta property='og:url' content='https://jperryhouts.github.io/CRB-Explorer/'/>
<title>CRB Explorer</title>
<style>
body {
/* background-color:grey;
color:white; */
height:100vh;
margin:0px;
padding:0px;
}
#map-div, #map-background {
display:block;
position:relative;
width:625px;
height:500px;
}
#map-div>canvas, #map-div>img, #map-background>canvas {
position:absolute;
top:0px;
left:0px;
}
#xsection-div {
display:block;
position:absolute;
background-color: #ddd;
width:900px;
height:calc(100% - 1.5em);
top:0px;
left:0px;
}
#xsection-div>canvas {
position:absolute;
top:0px;
left:0px;
width:900px;
height:100%;
}
#bottomwindowcontent {
display:block;
position:relative;
border:1px solid black;
width:900px;
height:325px;
margin:2em auto;
resize:vertical;
overflow:hidden;
}
#infolabels {
position:absolute;
top:calc(100% - 1.5em);
left:0px;
height:1.5em;
vertical-align:text-bottom;
}
#legend {
border:1px solid black;
position:absolute;
top:0px;
left:650px;
width:220px;
height:470px;
padding:15px;
}
</style>
<script src="visualizer.js?v=7" defer></script>
</head>
<body>
<div style='padding:25px;width:900px;margin:0px auto;'>
<div id='map-div'>
<!-- Basemap exported from https://www.openstreetmap.org/export#map=7/46.054/-120.004&layers=C -->
<img src='basemap-124.5,43.5,-115.5,48.5.png' width="625px" height="500px"/>
<div id="map-background" width="625px" height="500px">
</div>
<canvas id="map-overlay" width="625px" height="500px" style='border:1px solid black;'>
Your browser does not support HTML5.
</canvas>
<div id='legend'>
<div id='legend-title' style='cursor:pointer;font-family:monospace;font-size:x-large;font-weight:bold;'>- Legend</div>
<div id='swatches' style='display:block;padding-top:0.5em;padding-left:1em;'></div>
<div id='instructions-title' style='cursor:pointer;font-family:monospace;font-size:x-large;font-weight:bold;margin-top:0.5em;'>+ Instructions</div>
<div id='instructions' style='display:none;padding-top:0.5em;'>
<div style='font-weight:bold;font-family:sans-serif;width=100%;text-align:left;font-size:small;border:0.5px solid gray;padding:1em;margin:0px;'>
Map element
<pre> Mouse:
L: Drag A *or* B
R|Middle: Drag both A *and* B
Scroll: Adjust slice thickness
Keyboard:
↑/↓: Translate fwd/back
←/→: Rotate view L/R
Shift + ←/→: Translate L/R
z/Shift+Z: Adjust slice
thickness</pre></div>
<div style='font-weight:bold;font-family:sans-serif;width=100%;text-align:left;font-size:small;border:0.5px solid gray;padding:1em;margin:0.5em 0px 0px 0px;'>
Cross-section Element:
<pre> Mouse:
Left: Rotate view
or
Move ruler
Middle: Pan view
Scroll: Change vertical scale
Keyboard:
Shift + ↑/↓: Tilt up/down
Space: Reset pitch & scale</pre></div>
</div>
<div id='credits-title' style='cursor:pointer;font-family:monospace;font-size:x-large;font-weight:bold;margin-top:0.5em;'>+ Credits</div>
<div id='credits' style='display:none;font-size:x-small;'>
<div style='margin-top:1em;'>
Map digitization by Philip Schoettle-Greene, Gene Humphreys,
Jonathan Perry-Houts, Daniel O'Hara, Ana Mercedes Colón,
and Nate Klema.
</div>
<div style='margin-top:1em;font-weight:bold;display:block;'>Sources</div>
<div style="margin-top:1em;display:block;">
USGS:
<div style="padding-left: 1em;">
<a href="https://doi.org/10.3133/i1139" style="text-decoration:underline;white-space:no-wrap;"
title='D.A. Swanson, T.L. Wright, V.E. Camp, J.N. Gardner, R.T. Helz, S.M. Price, S.P. Riedel, M.E. Ross. "Reconnaissance Geologic Map of the Columnbia River Basalt Group, Pullman and Walla Walla Quadrangles, Southeast Washington and Adjacent Idaho". 1980. USGS.'>
Swanson et. al. 1980</a>;
<a href="https://doi.org/10.3133/ofr81797" style="text-decoration:underline;white-space:no-wrap;"
title='D.A. Swanson, J.L. Anderson, V.E. Camp, P.R. Hooper, W.H. Taubeneck, T.L. Wright. "Reconnaissance map of the Columbia River Basalt Group, Northern Oregon and Western Idaho: [Baker, The Dalles, Elk City, Grangeville, and Pendleton quadrangles]". 1981. USGS.'>
Swanson et. al., 1981</a>
</div>
Idaho Geologic Survey:
<div style='padding-left: 1em;cursor:default;'>
<a href="https://www.idahogeology.org/product/gm-18" style='text-decoration:underline;'
title='K.L. Othberg and L.R. Stanford. "Geologic Map of the Boise Valley and Adjoining Area, Western Snake River Plain, Idaho". 1992. Idaho Geological Survey.'>GM-18</a>;
<a href="https://www.idahogeology.org/product/gm-40" style='text-decoration:underline;'
title='J.D. Kauffman, G.F. Davidson, R.S. Lewis, and R.F. Burmester. "Geologic Map of the Orofino West Quadrangle, Clearwater, Lewis, and Nez Perce Counties, Idaho". 2005. Idaho Geological Survey.'>GM-40</a>;
<a href="https://www.idahogeology.org/product/gm-29" style='text-decoration:underline;'
title='T.H. Kiilsgaard, L.R. Stanford, and R.S. Lewis. "Geologic Map of the Idaho City 30 x 60 Minute Quadrangle, Idaho". 2001. Idaho Geological Survey.'>GM-29</a>;
<a href="https://www.idahogeology.org/product/dwm-92" style='text-decoration:underline;'
title='R.S. Lewis, R.F. Burmester, M.D. McFaddan, J.D. Kauffman, P. Ted Doughty, W.L. Oakley, and T.P. Frost. "Geologic Map of the Headquarters 30 x 60 Minute Quadrangle, Idaho". 2007. Idaho Geological Survey.'>DWM-92</a>;
<a href="https://www.idahogeology.org/product/dwm-80" style='text-decoration:underline;'
title='B. Bonnichsen and M.M. Godchaux. "Geologic Map of the Murphy 30 x 60 Quadrangle, Ada, Canyon, Elmore, and Owyhee Counties, Idaho". 2006. Idaho Geological Survey.'>DWM-80</a>;
<a href="https://www.idahogeology.org/product/dwm-94" style='text-decoration:underline;'
title='R.S. Lewis, R.F. Burmester, R.M. Breckenridge, M.D. McFaddan, and W.M. Phillips. "Preliminary Geologic Map of the Sandpoint 30 x 60 Minute Quadrangle, Idaho and Montana, and the Idaho Part of the Chewelah 30 x 60 Minute Quadrangle". 2008. Idaho Geological Survey.'>DWM-94</a>;
<a href="https://www.idahogeology.org/product/dwm-181" style='text-decoration:underline;'
title='K.L. Schmidt, D.E. Stewart, R.S. Lewis, and W.M. Phillips. "Geologic Map of the Smiths Ferry Quadrangle, Valley County, Idaho". 2017. Idaho Geological Survey.'>DWM-181</a>.
</div>
</div>
<div style="margin-top:0.5em;display:block;">
Base map image generated by
<a href="https://www.openstreetmap.org/export#map=7/46.054/-120.004&layers=C">
Open Street Map</a>.
</div>
<div style="margin-top:1em;display:block;">
Source code and documentation is available through this project's
<a href="https://github.com/jperryhouts/CRB-Explorer">GitHub</a>
repository.
</div>
<div style="margin-top:1em;display:block;">
This work was supported by National Science Foundation grant
<a href="https://www.nsf.gov/awardsearch/showAward?AWD_ID=1727451">
EAR-1727451.</a>
</div>
<div style="margin-top:1em;display:block;">
<a rel="license" href="http://creativecommons.org/licenses/by/4.0/">
<img alt="Creative Commons License" style="border-width:0"
src="https://i.creativecommons.org/l/by/4.0/88x31.png" /></a><br/>
This work is licensed under a
<a rel="license" href="http://creativecommons.org/licenses/by/4.0/">
Creative Commons Attribution 4.0 International License</a>.
</div>
</div>
</div>
</div>
<script>
const showHideInstructions = (show) => {
const f = document.getElementById('instructions-title');
const g = document.getElementById('instructions');
g.style.display = show ? 'block' : 'none';
f.textContent = show ? '- Instructions' : '+ Instructions';
//f.style.cursor = show ? 'default' : 'pointer';
};
const showHideLegend = (show) => {
const f = document.getElementById('legend-title');
const g = document.getElementById('swatches');
g.style.display = show ? 'block' : 'none';
f.textContent = show ? '- Legend' : '+ Legend';
//f.style.cursor = show ? 'default' : 'pointer';
};
const showHideCredits = (show) => {
const f = document.getElementById('credits-title');
const g = document.getElementById('credits');
g.style.display = show ? 'block' : 'none';
f.textContent = show ? '- Credits' : '+ Credits';
//f.style.cursor = show ? 'default' : 'pointer';
};
document.getElementById('instructions-title').addEventListener('click', (e) => {
const isHidden = document.getElementById('instructions').style.display === 'none';
if (isHidden) {
showHideInstructions(true);
showHideLegend(false);
showHideCredits(false);
} else {
showHideInstructions(false);
}
});
document.getElementById('legend-title').addEventListener('click', (e) => {
const isHidden = document.getElementById('swatches').style.display === 'none';
if (isHidden) {
showHideLegend(true);
showHideInstructions(false);
showHideCredits(false);
} else {
showHideLegend(false);
}
});
document.getElementById('credits-title').addEventListener('click', (e) => {
const isHidden = document.getElementById('credits').style.display === 'none';
if (isHidden) {
showHideCredits(true);
showHideLegend(false);
showHideInstructions(false);
} else {
showHideCredits(false);
}
});
</script>
<div id="bottomwindowcontent">
<div id="xsection-div">
<canvas id="xsection" width="900px"></canvas>
<canvas id="xsection-overlay" width="900px"></canvas>
</div>
<div style='display:block;' id="infolabels">
A: <span id='Alabel'></span> |
B: <span id='Blabel'></span> |
Length: <span id="ABLengthLabel"></span> km |
Thickness: <span id='ThicknessLabel'></span> km |
Pitch: <span id='PitchLabel'></span> ° |
<span id="ruler-info">
Ruler: <span id='RulerLabel'></span> km
</ruler>
</div>
</div>
</div>
</svg>
</body>
</html>