diff --git a/src/ol/control/control.js b/src/ol/control/control.js index 7760d6e3f2..e63ba7671a 100644 --- a/src/ol/control/control.js +++ b/src/ol/control/control.js @@ -76,7 +76,7 @@ ol.control.Control.prototype.getMap = function() { * UI. * @param {ol.MapEvent} mapEvent Map event. */ -ol.control.Control.prototype.handleMapPostrender = goog.nullFunction; +ol.control.Control.prototype.handleMapPostrender = function(mapEvent) {}; /** @@ -98,7 +98,8 @@ ol.control.Control.prototype.setMap = function(map) { var target = goog.isDef(this.target_) ? this.target_ : map.getOverlayContainer(); goog.dom.appendChild(target, this.element); - if (this.handleMapPostrender !== goog.nullFunction) { + if (this.handleMapPostrender !== + ol.control.Control.prototype.handleMapPostrender) { this.listenerKeys.push(goog.events.listen(map, ol.MapEventType.POSTRENDER, this.handleMapPostrender, false, this)); }