diff options
author | Struan Donald <struan@exo.org.uk> | 2013-06-28 12:45:30 +0100 |
---|---|---|
committer | Struan Donald <struan@exo.org.uk> | 2013-06-28 12:50:12 +0100 |
commit | 3e8b54a49fcd42d8b03bb153ba66484282394e43 (patch) | |
tree | bdc34c68c176983f95d7f6d1ca0dfa164c739d79 | |
parent | 33d4782795bfbbe1a32f0030a8da475fb8c3fb8d (diff) |
we need to explicitly deactivate and activate the control that displays
the reposition button when we deactivate and activate the map nav as
otherwise it doesn't work when we return to the map screen.
-rw-r--r-- | www/js/map-OpenLayers.js | 3 | ||||
-rw-r--r-- | www/js/views/around.js | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/www/js/map-OpenLayers.js b/www/js/map-OpenLayers.js index e913502..35def29 100644 --- a/www/js/map-OpenLayers.js +++ b/www/js/map-OpenLayers.js @@ -180,7 +180,8 @@ function fixmystreet_onload() { } if (fixmystreet.page == 'around' ) { - fixmystreet.map.addControl( new OpenLayers.Control.ActionAfterDrag({'autoActivate': true}) ); + fixmystreet.actionafterdrag = new OpenLayers.Control.ActionAfterDrag({'autoActivate': true}); + fixmystreet.map.addControl(fixmystreet.actionafterdrag); fixmystreet.map.addControl( new OpenLayers.Control.Crosshairs(null) ); } } diff --git a/www/js/views/around.js b/www/js/views/around.js index bba85d2..f4a30ec 100644 --- a/www/js/views/around.js +++ b/www/js/views/around.js @@ -152,6 +152,7 @@ displayButtons: function(isLocationSet) { if ( fixmystreet.map ) { fixmystreet.nav.activate(); + fixmystreet.actionafterdrag.activate(); } if (isLocationSet) { $('#cancel').addClass('ui-btn-left').show(); @@ -310,6 +311,7 @@ FMS.locator.stopTracking(); if ( fixmystreet.map ) { fixmystreet.nav.deactivate(); + fixmystreet.actionafterdrag.deactivate(); } }, |