X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/de5a225a95125db1a66d6dfbaa3a790db9719c18..c6cde2653b8dbcd3345348b33619b2240f1cc905:/app/assets/javascripts/changeset.js diff --git a/app/assets/javascripts/changeset.js b/app/assets/javascripts/changeset.js index 26c2351fa..d9c09bab4 100644 --- a/app/assets/javascripts/changeset.js +++ b/app/assets/javascripts/changeset.js @@ -9,10 +9,6 @@ $(document).ready(function () { L.OSM.zoom() .addTo(map); - $("#changeset_list_map").on("resized", function () { - map.invalidateSize(); - }); - var group = L.featureGroup().addTo(map); $("[data-changeset]").each(function () { @@ -73,11 +69,5 @@ $(document).ready(function () { } }); - var params = OSM.mapParams(); - if (params.bbox) { - map.fitBounds([[params.minlat, params.minlon], - [params.maxlat, params.maxlon]]); - } else { - map.fitBounds(group.getBounds()); - } + map.fitBounds(OSM.mapParams().bounds || group.getBounds()); });