Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

Branch merge

Mike McGanne25ed9db9835
diff --cc src/js/util/wv.util.browser.js
index 3fc674c79,031330bc8..e1fbd1d84
--- a/src/js/util/wv.util.browser.js
+++ b/src/js/util/wv.util.browser.js
@@@ -359,6 -359,21 +359,21 @@@ if (!String.prototype.endsWith)
* Mobile device quirks.
*/
(function() {
+ if( navigator.userAgent.match(/Android/i)
+ || navigator.userAgent.match(/webOS/i)
+ || navigator.userAgent.match(/iPhone/i)
+ || navigator.userAgent.match(/iPad/i)
+ || navigator.userAgent.match(/iPod/i)
+ || navigator.userAgent.match(/BlackBerry/i)
+ || navigator.userAgent.match(/Windows Phone/i)
+ ){
+ mobile = true;
+ if (!(window.orientation == 90 || window.orientation == -90)){
+ portrait = true;
+ }
+ }
-
-
++
++
if (navigator.userAgent.indexOf('iPhone') != -1 || navigator.userAgent.indexOf('Android') != -1) {
// In Safari, the true version is after "Safari"
if (navigator.userAgent.indexOf('Safari')!=-1) {
@@@ -366,10 -381,18 +381,18 @@@
mobileSafari = true;
}
addEventListener("load", function() {
- setTimeout(hideURLbar, 0);
-
++
+ if (mobileSafari){
+ setHeight();
+ }
+ if (mobile){
+ $(".layerPicker a[href='#DataDownload']").hide();
+ }
+ window.scrollTo(0, 1);
}, false);
addEventListener("orientationchange", function() {
- setTimeout(hideURLbar, 0);
+ setHeight();
+ window.scrollTo(0, 1);
}, false);
}