]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/javascripts/map.js.erb
Compute size of rich text preview pane correctly
[rails.git] / app / assets / javascripts / map.js.erb
index a18292aaaad74083a26c119d1a206605b2dfb64a..928575eb5312a04ec04d86704ec8fcfcaba6d60b 100644 (file)
@@ -29,6 +29,10 @@ L.extend(L.LatLngBounds.prototype, {
   getSize: function () {
     return (this._northEast.lat - this._southWest.lat) *
            (this._northEast.lng - this._southWest.lng);
   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());
   }
 });
 
   }
 });