X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/f9d714dfd36fa56ced4c0a99a6e59c945ff89cca..53e4d600e712dea988028a12f68927c3400a6901:/app/assets/javascripts/changeset.js diff --git a/app/assets/javascripts/changeset.js b/app/assets/javascripts/changeset.js index d9c09bab4..0aecced85 100644 --- a/app/assets/javascripts/changeset.js +++ b/app/assets/javascripts/changeset.js @@ -1,14 +1,6 @@ -$(document).ready(function () { +function initializeChangesets(map) { var changesets = [], rects = {}; - 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 () { @@ -60,14 +52,4 @@ $(document).ready(function () { unHighlightChangeset($(this).data("changeset").id); } }); - - $(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'); - } - }); - - map.fitBounds(OSM.mapParams().bounds || group.getBounds()); -}); +}