diff options
Diffstat (limited to 'www/js/views')
-rw-r--r-- | www/js/views/around.js | 4 | ||||
-rw-r--r-- | www/js/views/fms.js | 8 |
2 files changed, 9 insertions, 3 deletions
diff --git a/www/js/views/around.js b/www/js/views/around.js index bafc65d..8ebe8f8 100644 --- a/www/js/views/around.js +++ b/www/js/views/around.js @@ -410,9 +410,7 @@ pauseMap: function() { this.stopListening(FMS.locator); FMS.locator.stopTracking(); - if ( FMS.iPhoneModel > 3 ) { - $('#map_box').addClass('background-map'); - } + $('#map_box').addClass('background-map'); $('#map_box').off('touchend'); if ( fixmystreet.map ) { fixmystreet.nav.deactivate(); diff --git a/www/js/views/fms.js b/www/js/views/fms.js index 4e1a0a4..711968f 100644 --- a/www/js/views/fms.js +++ b/www/js/views/fms.js @@ -52,6 +52,14 @@ viewHeight = $(window).height(), contentHeight = FMS.windowHeight - header.outerHeight() - this.bottomMargin; + if ($("body").hasClass("iphone-x")) { + var body = $("body").get(0); + var inset = window.getComputedStyle(body).getPropertyValue("--safe-area-inset-bottom"); + // We want the pixel value, not the CSS string + inset = parseInt(inset.replace(/[^\d]*/g, '')); + contentHeight -= inset; + } + this.setHeight( content, contentHeight - top ); }, |