diff options
author | Matthew Somerville <matthew@mysociety.org> | 2012-03-02 13:30:41 +0000 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2012-03-02 13:30:41 +0000 |
commit | 4eab56c784bb53d2e174e7b7101da7eba49a1a02 (patch) | |
tree | 0c21b2562dc8d8ba8670f7e4d8ccb153f72c3418 /web/js/map-bing-ol.js | |
parent | 7dd734be0ee3efb57199879e6b86fe1605fe23ee (diff) |
Enable scroll wheel if mobile full screen map view.
Diffstat (limited to 'web/js/map-bing-ol.js')
-rw-r--r-- | web/js/map-bing-ol.js | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/web/js/map-bing-ol.js b/web/js/map-bing-ol.js index 8f0ba4da0..89b274b18 100644 --- a/web/js/map-bing-ol.js +++ b/web/js/map-bing-ol.js @@ -3,10 +3,17 @@ function set_map_config(perm) { if ($('#map_permalink').length) { permalink_id = 'map_permalink'; } + + var nav_opts = { zoomWheelEnabled: false }; + if (fixmystreet.page == 'around' && $('html').hasClass('mobile')) { + nav_opts = {}; + } + fixmystreet.nav_control = new OpenLayers.Control.Navigation(nav_opts); + fixmystreet.controls = [ new OpenLayers.Control.Attribution(), new OpenLayers.Control.ArgParser(), - new OpenLayers.Control.Navigation({ zoomWheelEnabled: false }), + fixmystreet.nav_control, new OpenLayers.Control.Permalink(permalink_id), new OpenLayers.Control.PanZoomFMS({id: 'fms_pan_zoom' }) ]; |