From be043cb967133794bb016df9f8440f3298a013e6 Mon Sep 17 00:00:00 2001 From: Marwin Hochfelsner <50826859+hlfan@users.noreply.github.com> Date: Tue, 3 Jun 2025 17:37:35 +0200 Subject: [PATCH] Drop unnecessary custom wrap function --- app/assets/javascripts/index/query.js | 2 +- app/assets/javascripts/leaflet.map.js | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/app/assets/javascripts/index/query.js b/app/assets/javascripts/index/query.js index b49fcd6ca..e6a1b6e1c 100644 --- a/app/assets/javascripts/index/query.js +++ b/app/assets/javascripts/index/query.js @@ -251,7 +251,7 @@ OSM.Query = function (map) { */ function queryOverpass(lat, lng) { const latlng = L.latLng(lat, lng).wrap(), - bounds = map.getBounds().wrap(), + bounds = map.getBounds(), zoom = map.getZoom(), bbox = [bounds.getSouthWest(), bounds.getNorthEast()] .map(c => OSM.cropLocation(c, zoom)) diff --git a/app/assets/javascripts/leaflet.map.js b/app/assets/javascripts/leaflet.map.js index 2488a9db5..20b620046 100644 --- a/app/assets/javascripts/leaflet.map.js +++ b/app/assets/javascripts/leaflet.map.js @@ -2,10 +2,6 @@ L.extend(L.LatLngBounds.prototype, { getSize: function () { return (this._northEast.lat - this._southWest.lat) * (this._northEast.lng - this._southWest.lng); - }, - - wrap: function () { - return new L.LatLngBounds(this._southWest.wrap(), this._northEast.wrap()); } }); -- 2.39.5