diff options
author | Struan Donald <struan@exo.org.uk> | 2013-09-26 17:40:13 +0100 |
---|---|---|
committer | Struan Donald <struan@exo.org.uk> | 2013-09-26 17:40:13 +0100 |
commit | cb11bb5c540c6a156be8d9cc60176207a4177a8c (patch) | |
tree | c1a41c9adbb122ab4b024ba6f46f05532b4e86a5 /src/js/map-OpenLayers.js | |
parent | f2fa47b500fc39398037f9fce1a203506407cb14 (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/map-OpenLayers.js')
-rw-r--r-- | src/js/map-OpenLayers.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/js/map-OpenLayers.js b/src/js/map-OpenLayers.js index f6bc663..e9cee86 100644 --- a/src/js/map-OpenLayers.js +++ b/src/js/map-OpenLayers.js @@ -202,10 +202,14 @@ OpenLayers.Map.prototype.getCurrentSize = function() { function show_map(event) { if (typeof fixmystreet !== 'undefined' && fixmystreet.page == 'around') { // Immediately go full screen map if on around page + var mapTop = 0; + if ( $('body').hasClass('ios7') ) { + mapTop = 20; + } $('#map_box').css({ position: 'fixed', - top: 0, left: 0, right: 0, bottom: 0, - height: $(window).height(), + top: mapTop, left: 0, right: 0, bottom: 0, + height: FMS.windowHeight, margin: 0 }); } else { |