We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 2c17b8c + 52a12e3 commit d7e0143Copy full SHA for d7e0143
leaflet/static/leaflet/leaflet.forms.js
@@ -177,12 +177,7 @@ L.GeometryField = L.Class.extend({
177
// Change view extent
178
if (this.drawnItems.getLayers().length > 0) {
179
var bounds = this.drawnItems.getBounds();
180
- // In case of points, fitBounds() fails.
181
- // https://github.com/makinacorpus/django-leaflet/issues/90
182
- if (!bounds._southWest.equals(bounds._northEast))
183
- this._map.fitBounds(bounds);
184
- else
185
- this._map.setView(bounds._northEast, this.default_zoom);
+ this._map.fitBounds(this.drawnItems.getBounds());
186
}
187
// Else keep view extent set by django-leaflet template tag
188
},
0 commit comments