Add new container which don't stop event propagation
and allow overlays to optionnally stop event propagation
This commit is contained in:
@@ -60,6 +60,12 @@ ol.Overlay = function(options) {
|
||||
|
||||
goog.base(this);
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {boolean}
|
||||
*/
|
||||
this.stopEvent_ = goog.isDef(options.stopEvent) ? options.stopEvent : false;
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {Element}
|
||||
@@ -202,8 +208,10 @@ ol.Overlay.prototype.handleMapChanged = function() {
|
||||
this.mapPostrenderListenerKey_ = goog.events.listen(map,
|
||||
ol.MapEventType.POSTRENDER, this.handleMapPostrender, false, this);
|
||||
this.updatePixelPosition_();
|
||||
goog.dom.append(
|
||||
/** @type {!Node} */ (map.getOverlayContainer()), this.element_);
|
||||
goog.dom.append(/** @type {!Node} */ (
|
||||
this.stopEvent_ ? map.getOverlayContainerStopEvent() :
|
||||
map.getOverlayContainer()),
|
||||
this.element_);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user