X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/de5a225a95125db1a66d6dfbaa3a790db9719c18..b5800b4c2f51e265b51f6b0cd45728b8d7db86aa:/app/assets/javascripts/changeset.js?ds=sidebyside 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()); });