aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2013-05-30 17:49:25 +0100
committerStruan Donald <struan@exo.org.uk>2013-05-30 17:49:25 +0100
commitba4110099ee388fbd120c124c746ad957ee6a8a7 (patch)
tree4c915899a966986fa23afe0fc8d48f2caf203eb6
parent1c627258471e7c22980275c568a543682f78b614 (diff)
do not use a fixed position header on the map screen as that causes the
size of the screen to jump before navigation and the confirm button and attribution text to move
-rw-r--r--www/css/fms.css3
-rw-r--r--www/js/map-OpenLayers.js12
-rw-r--r--www/templates/en/around.html2
3 files changed, 8 insertions, 9 deletions
diff --git a/www/css/fms.css b/www/css/fms.css
index 15530a8..4a37ba8 100644
--- a/www/css/fms.css
+++ b/www/css/fms.css
@@ -112,12 +112,11 @@
.mapbox{
position:absolute;
- top: 0, left: 0, right: 0, bottom: 0;
+ top: 45px, left: 0, right: 0, bottom: 0;
padding: 0px;
display:block;
height: 100%;
width: 100%;
- margin: -15px;
}
.mapbox #map {
diff --git a/www/js/map-OpenLayers.js b/www/js/map-OpenLayers.js
index d5c7781..e28a5e0 100644
--- a/www/js/map-OpenLayers.js
+++ b/www/js/map-OpenLayers.js
@@ -217,14 +217,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 footer = $("div[data-role='footer']:visible"),
- content = $("div[data-role='content']:visible"),
- viewHeight = $(window).height(),
- contentHeight = viewHeight - footer.outerHeight();
+ var screen = $(window).height(),
+ header = $('[data-role=header]').height(),
+ footer = $('[data-role=footer]').height(),
+ content = screen - header - footer;
$('#map_box').css({
position: 'absolute',
- top: 0, left: 0, right: 0, bottom: 0,
- height: contentHeight,
+ top: 45, left: 0, right: 0, bottom: 0,
+ height: content,
margin: 0
});
$('#fms_pan_zoom').css({ top: '2.75em !important' });
diff --git a/www/templates/en/around.html b/www/templates/en/around.html
index 895a1e7..b597d9c 100644
--- a/www/templates/en/around.html
+++ b/www/templates/en/around.html
@@ -1,4 +1,4 @@
-<div data-id="locate" id="around-header" data-role="header" data-tap-toggle="false" data-fullscreen="true" data-position="fixed">
+<div data-id="locate" id="around-header" data-role="header">
<a id="search" class="ui-btn-left">Search</a>
<h1>Locate</h1>
<a href="#" id="cancel" class="ui-btn-right nodisplay">Cancel</a>