Make ol.Map#setView do not accept undefined
With this change map.setView(null) is permitted, but map.setView(undefined) is not. map.getView now always returns a defined value, which may be null is setView was called with null.
This commit is contained in:
@@ -101,7 +101,7 @@ ol.interaction.MouseWheelZoom.prototype.doZoom_ = function(map) {
|
||||
var delta = goog.math.clamp(this.delta_, -maxDelta, maxDelta);
|
||||
|
||||
var view = map.getView();
|
||||
goog.asserts.assert(goog.isDef(view));
|
||||
goog.asserts.assert(!goog.isNull(view));
|
||||
|
||||
map.render();
|
||||
ol.interaction.Interaction.zoomByDelta(map, view, -delta, this.lastAnchor_,
|
||||
|
||||
Reference in New Issue
Block a user