aboutsummaryrefslogtreecommitdiffstats
path: root/web/js/map-OpenLayers.js
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2012-03-01 15:50:01 +0000
committerMatthew Somerville <matthew@mysociety.org>2012-03-01 15:50:01 +0000
commitf00eaa221cdefd6d2d70c8c2029df801bc0d0420 (patch)
tree8c536f546eae488f09ff96b7a54f24bd52985469 /web/js/map-OpenLayers.js
parent44fa0d98123ea920ec3f7cca12e482af280b4a86 (diff)
Remember pin hiding state in case they try again.
Diffstat (limited to 'web/js/map-OpenLayers.js')
-rw-r--r--web/js/map-OpenLayers.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/web/js/map-OpenLayers.js b/web/js/map-OpenLayers.js
index b50f8c30f..d4aa51a34 100644
--- a/web/js/map-OpenLayers.js
+++ b/web/js/map-OpenLayers.js
@@ -263,6 +263,10 @@ $(function(){
// Okay, back to around view.
fixmystreet.bbox_strategy.activate();
fixmystreet.markers.refresh( { force: true } );
+ if ( fixmystreet.state_pins_were_hidden ) {
+ // If we had pins hidden when we clicked map (which had to show the pin layer as I'm doing it in one layer), hide them again.
+ $('#hide_pins_link').click();
+ }
fixmystreet.drag.deactivate();
$('#side-form').hide();
$('#side').show();
@@ -399,6 +403,7 @@ OpenLayers.Control.Click = OpenLayers.Class(OpenLayers.Control, {
// link so that it updates the text in case they go
// back
if ( ! fixmystreet.markers.getVisibility() ) {
+ fixmystreet.state_pins_were_hidden = true;
$('#hide_pins_link').click();
}
if (fixmystreet.page == 'new') {