aboutsummaryrefslogtreecommitdiffstats
path: root/web/js/map-OpenLayers.js
diff options
context:
space:
mode:
Diffstat (limited to 'web/js/map-OpenLayers.js')
-rw-r--r--web/js/map-OpenLayers.js17
1 files changed, 10 insertions, 7 deletions
diff --git a/web/js/map-OpenLayers.js b/web/js/map-OpenLayers.js
index 9d5b474f1..abee9ebfa 100644
--- a/web/js/map-OpenLayers.js
+++ b/web/js/map-OpenLayers.js
@@ -469,13 +469,16 @@ OpenLayers.Control.Click = OpenLayers.Class(OpenLayers.Control, {
//scroll the height of the map box instead of the offset
//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, 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');
- });
-
+ if($(this).parent().hasClass('map_complete')){
+ $('html, body').animate({scrollTop:0}, 1000);
+ }else{
+ var height = $('#map_box').height();
+ $('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');
+ });
+ }
});
}