-
Notifications
You must be signed in to change notification settings - Fork 1
/
gigapan.html
148 lines (134 loc) · 5.39 KB
/
gigapan.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
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
<head>
<title>GigaPan</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=320; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;">
<meta name="apple-mobile-web-app-capable" content="yes" />
<link rel="apple-touch-icon" href="../static/images/apple-touch-icon.png"/>
<script type="text/javascript" src="http://seadragon.com/ajax/0.8/seadragon-min.js">
</script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/swfobject/2.1/swfobject.js">
</script>
<script type="text/javascript">
var viewer;
function init(){
if (navigator.userAgent.indexOf("iPhone") != -1 || navigator.userAgent.indexOf("iPod") != -1) {
updateOrientation();
setTimeout(window.scrollTo(0, 1), 100);
viewer = new Seadragon.Viewer("container");
viewer.openDzi("http://gigapan-mobile.appspot.com/gigapan/{{ id }}.dzi", '{{ dzi }}');
}
else {
var flashvars = {};
flashvars.source = "{{ id }}.dzi";
var params = {};
params.bgcolor = "#000000";
params.allowfullscreen = "true";
var attributes = {};
attributes.id = "ozViewer";
attributes.name = "ozViewer";
swfobject.embedSWF("../static/OpenZoomViewer.swf", "container", "100%", "100%", "9.0.0", false, flashvars, params, attributes);
}
}
function updateOrientation(){
var contentType = "show_";
if (window.navigator.standalone) {
contentType += "standalone_";
}
switch (window.orientation) {
case 0:
contentType += "normal";
break;
case -90:
contentType += "right";
break;
case 90:
contentType += "left";
break;
case 180:
contentType += "flipped";
break;
}
document.getElementById("header").setAttribute("class", "visible");
document.getElementById("container").setAttribute("class", contentType);
}
Seadragon.Utils.addEvent(window, "load", init);
</script>
<style type="text/css">
html, body, form, fieldset, p, div, h1, h2, h3, h4, h5, h6 {
margin: 0;
padding: 0;
-webkit-text-size-adjust: none;
}
html, body {
height: 100%;
overflow: hidden;
background-color: #000;
} #header {
background-color: #900;
color: #999;
font-family: Helvetica;
font-weight: bold;
font-size: 14px;
height: 20px;
padding-top: 3px;
text-align: center;
} #back {
position: absolute;
left: 4px;
}
a {
text-decoration: none;
color: #FFF;
} #container {
background-color: #000;
color: #FFF;
} .normal {
width: 100%;
height: 100%;
} .visible {
display: block;
} .invisible {
display: none;
} .show_normal, .show_flipped {
width: 320px;
height: 333px; /*356px;*/
} .show_left, .show_right {
width: 480px;
height: 185px; /*208px;*/
} .show_standalone_normal, .show_standalone_flipped {
width: 320px;
height: 437px; /*480px;*/
} .show_standalone_left, .show_standalone_right {
width: 480px;
height: 277px; /*320px;*/
} #header #back {
position: absolute;
top: 2px;
left: 4px;
display: block;
}
</style>
</head>
<body onorientationchange="updateOrientation();">
<div id="header" class="invisible">
<a id="back" href="javascript:window.history.back()"><img src="../static/images/back-red.png"/></a><a href="deepzoom://gigapan-mobile.appspot.com/gigapan/{{ id }}.dzi">View in Seadragon Mobile</a>
</div>
<div id="container" class="normal">
</div>
<!-- Tracker -->
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-5667667-4");
pageTracker._trackPageview();
}
catch (err) {
}
</script>
</body>
</html>