aboutsummaryrefslogtreecommitdiffstats
path: root/src/js/map-OpenLayers.js
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2013-09-11 10:35:23 +0100
committerStruan Donald <struan@exo.org.uk>2013-09-11 10:35:23 +0100
commit7bfae47d487ba362919c50f42f5388251b98cb40 (patch)
tree945ab3c217b59ced90cd6b084a616e385ddc4ddb /src/js/map-OpenLayers.js
parente51c7fdf5838d1c7ced6f45efb732f00a0d89292 (diff)
Allow details screen to scroll on Android
This fixes #113 in that it means the user can move the screen to see what fields are available. Previously this was prevented by setting the adjustPan mode for the soft input mode which had fixed a bug with the keyboard not dismissing on transition. This has been resolved by adding a plugin for Android to control display of the soft keyboard and hiding the keyboard before navigation in the navigate method of FMSView. Sadly this then meant that the screen size was being measured *before* the keyboard was dismissed with the result that the screen transitioned too was incorrectly displayed. This was resolved by taking the screen height on start up, storing that as a property of the FMS global object and then using this property instead of measuring the screen size at the time of transition. The map has also been expanded to fill the whole screen rather than stopping at the bottom of the navigation bar as on Android when you scroll the screen the map does not scroll and the gap at the top was visible.
Diffstat (limited to 'src/js/map-OpenLayers.js')
-rw-r--r--src/js/map-OpenLayers.js8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/js/map-OpenLayers.js b/src/js/map-OpenLayers.js
index 53d324e..f120391 100644
--- a/src/js/map-OpenLayers.js
+++ b/src/js/map-OpenLayers.js
@@ -202,14 +202,10 @@ 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 screen = $(window).height(),
- header = $('[data-role=header]').height(),
- footer = $('[data-role=footer]').height(),
- content = screen - header - footer;
$('#map_box').css({
position: 'fixed',
- top: 45, left: 0, right: 0, bottom: 0,
- height: content,
+ top: 0, left: 0, right: 0, bottom: 0,
+ height: $(window).height(),
margin: 0
});
} else {