aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2013-06-28 12:45:30 +0100
committerStruan Donald <struan@exo.org.uk>2013-06-28 12:50:12 +0100
commit3e8b54a49fcd42d8b03bb153ba66484282394e43 (patch)
treebdc34c68c176983f95d7f6d1ca0dfa164c739d79
parent33d4782795bfbbe1a32f0030a8da475fb8c3fb8d (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.js3
-rw-r--r--www/js/views/around.js2
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();
}
},