aboutsummaryrefslogtreecommitdiffstats
path: root/src/js/app.js
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2013-09-26 17:40:13 +0100
committerStruan Donald <struan@exo.org.uk>2013-09-26 17:40:13 +0100
commitcb11bb5c540c6a156be8d9cc60176207a4177a8c (patch)
treec1a41c9adbb122ab4b024ba6f46f05532b4e86a5 /src/js/app.js
parentf2fa47b500fc39398037f9fce1a203506407cb14 (diff)
Fix iOS 7 display to clear scroll bar
If iOS7 set a class on the body and then use this to override various styles as well as the position of the map
Diffstat (limited to 'src/js/app.js')
-rw-r--r--src/js/app.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/js/app.js b/src/js/app.js
index 1818b6e..0f2a7bf 100644
--- a/src/js/app.js
+++ b/src/js/app.js
@@ -243,6 +243,11 @@ var tpl = {
if ( typeof device !== 'undefined' && device.platform === 'iOS' ) {
var model = parseInt(device.model.replace('iPhone',''), 10);
FMS.iPhoneModel = model;
+
+ // fix overlap of status bar in ios7
+ if (parseFloat(window.device.version) === 7.0) {
+ $('body').addClass('ios7');
+ }
}
_.extend(FMS, {
@@ -261,6 +266,9 @@ var tpl = {
}
FMS.windowHeight = $(window).height();
+ if ( $('body').hasClass('ios7') ) {
+ FMS.windowHeight -= 20;
+ }
if ( localStorage.usedBefore ) {
FMS.usedBefore = 1;