X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/a36f3558dd43dd5a598e36dd21fd5f7d2b4a94f5..aff23d4b4bc9e9fecd5c1caa7e4d38087e002396:/app/assets/javascripts/changeset.js diff --git a/app/assets/javascripts/changeset.js b/app/assets/javascripts/changeset.js index 9e393ad5a..6d4881547 100644 --- a/app/assets/javascripts/changeset.js +++ b/app/assets/javascripts/changeset.js @@ -1,6 +1,14 @@ $(document).ready(function () { var changesets = [], rects = {}; - var map = createMap("changeset_list_map"); + + var map = L.map("changeset_list_map", { + attributionControl: false, + zoomControl: false + }).addLayer(new L.OSM.Mapnik()); + + L.OSM.zoom() + .addTo(map); + var group = L.featureGroup().addTo(map); $("[data-changeset]").each(function () { @@ -53,6 +61,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],