Remove the requirement to provide a size to ol.View#fit()

This commit is contained in:
Andreas Hocevar
2016-12-16 11:03:54 +01:00
parent 40afb9d40d
commit 20155ce2a7
14 changed files with 72 additions and 48 deletions
+1 -2
View File
@@ -73,6 +73,5 @@ ol.control.ZoomToExtent.prototype.handleZoomToExtent_ = function() {
var map = this.getMap();
var view = map.getView();
var extent = !this.extent_ ? view.getProjection().getExtent() : this.extent_;
var size = /** @type {ol.Size} */ (map.getSize());
view.fit(extent, size);
view.fit(extent);
};