Use our own null function for handleMapPostrender

If we use ol.control.Control.prototype.handleMapPostrender = goog.nullFunction the API doc doesn't show the mapEvent parameter of the handleMapPostRender function.
This commit is contained in:
Éric Lemoine
2013-05-10 10:56:39 +02:00
parent 88352092ee
commit 3a4fc2a99a

View File

@@ -76,7 +76,7 @@ ol.control.Control.prototype.getMap = function() {
* UI. * UI.
* @param {ol.MapEvent} mapEvent Map event. * @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_) ? var target = goog.isDef(this.target_) ?
this.target_ : map.getOverlayContainer(); this.target_ : map.getOverlayContainer();
goog.dom.appendChild(target, this.element); 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, this.listenerKeys.push(goog.events.listen(map,
ol.MapEventType.POSTRENDER, this.handleMapPostrender, false, this)); ol.MapEventType.POSTRENDER, this.handleMapPostrender, false, this));
} }