aboutsummaryrefslogtreecommitdiffstats
path: root/web/js/map-OpenLayers.js
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2012-03-01 16:25:54 +0000
committerMatthew Somerville <matthew@mysociety.org>2012-03-01 16:25:54 +0000
commitd04f5d84ca070718e5ce28ab8c45db5bec03c442 (patch)
treeac61c6041deca1947f2139497fdb48821066718f /web/js/map-OpenLayers.js
parentaed77780b3b363512fa0effd36e0c60d62397fac (diff)
Change links once the scrolling is complete, not before.
Diffstat (limited to 'web/js/map-OpenLayers.js')
-rw-r--r--web/js/map-OpenLayers.js9
1 files changed, 5 insertions, 4 deletions
diff --git a/web/js/map-OpenLayers.js b/web/js/map-OpenLayers.js
index 3a6cec3e5..9d5b474f1 100644
--- a/web/js/map-OpenLayers.js
+++ b/web/js/map-OpenLayers.js
@@ -470,11 +470,12 @@ OpenLayers.Control.Click = OpenLayers.Class(OpenLayers.Control, {
//of the #side-form or whatever as we will probably want
//to do this on other pages where #side-form might not be
var height = $('#map_box').height();
- $('html, body').animate({scrollTop:height-60}, 1000);
+ $('html, body').animate({scrollTop:height-60}, 1000, function(){
+ //add this class so we can modify the look of the links inside
+ $('#mob_sub_map_links').addClass('map_complete');
+ $('#mob_ok').text('MAP');
+ });
- //add this class so we can modify the look of the links inside
- $('#mob_sub_map_links').addClass('map_complete');
- $('#mob_ok').text('MAP');
});
}