Keep the map visible as the changeset page is scrolled

This commit is contained in:
Saman Bemel-Benrud 2013-06-10 13:52:23 -07:00 committed by Tom Hughes
parent 1998ec88b8
commit 82f8968169
3 changed files with 28 additions and 4 deletions

View file

@ -53,6 +53,14 @@ $(document).ready(function () {
}
});
$(window).scroll(function() {
if ($(window).scrollTop() > $('.content-heading').outerHeight() + $('#top-bar').outerHeight() ) {
$('#changeset_list_map_wrapper').addClass('scrolled');
} else {
$('#changeset_list_map_wrapper').removeClass('scrolled');
}
});
var params = OSM.mapParams();
if (params.bbox) {
map.fitBounds([[params.minlat, params.minlon],