forked from y-fujii/zuho
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
68 lines (68 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
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<title>zuho.js demo</title>
<script type="module" src="zuho.js"></script>
<style>
* {
margin: 0;
padding: 0;
border: none;
}
x-zuho {
display: block;
position: fixed;
width: 100%;
height: 100%;
background: #000000;
}
#mapping-menu {
display: block;
position: fixed;
right: 0;
top: 0;
font: x-small/1.0 sans-serif;
color: #ffffff;
background: #303030;
opacity: 0.75;
user-select: none;
-webkit-user-select: none;
}
#mapping-menu > menuitem {
display: block;
padding: 0.5em 1.0em;
}
#mapping-menu > menuitem:hover {
background: #406080;
}
</style>
</head>
<body>
<x-zuho src="src.jpg" mapping="azConformal"></x-zuho>
<menu id="mapping-menu">
<menuitem data-type="azPerspective">Azimuthal | Perspective</menuitem>
<menuitem data-type="azConformal">Azimuthal | Conformal</menuitem>
<menuitem data-type="azEquidistant">Azimuthal | Equidistant</menuitem>
<menuitem data-type="azEquiarea">Azimuthal | Equiarea</menuitem>
<menuitem data-type="azOrthogonal">Azimuthal | Orthogonal</menuitem>
<menuitem data-type="azReflect">Azimuthal | Reflect</menuitem>
<menuitem data-type="cyPerspective">Cylindrical | Perspective</menuitem>
<menuitem data-type="cyConformal">Cylindrical | Conformal</menuitem>
<menuitem data-type="cyEquidistant">Cylindrical | Equidistant</menuitem>
<menuitem data-type="cyEquiarea">Cylindrical | Equiarea</menuitem>
<menuitem data-type="mollweide">Mollweide</menuitem>
<menuitem data-type="hammer">Hammer</menuitem>
<menuitem data-type="eckert4">Eckert IV</menuitem>
<script>
const zuhoElement = document.querySelector( "x-zuho" );
for( const e of document.querySelectorAll( "#mapping-menu > menuitem" ) ) {
e.onclick = ev => {
zuhoElement.mapping = e.dataset.type;
};
}
</script>
</menu>
</body>
</html>