create parent event target for the map, to allow stopping event propagation

This commit is contained in:
Éric Lemoine
2012-07-05 13:55:57 +02:00
parent 410d79faa1
commit 8e36850e7f
2 changed files with 16 additions and 6 deletions
+7
View File
@@ -108,6 +108,13 @@ ol.Map = function() {
* @type {Element}
*/
this.container_ = null;
// Create an EventTarget and set it as the map's parent EventTarget. With
// this we can have two groups of listeners: "map listeners" and "map
// parent listeners". And map listeners can stop event propagation, and
// thereby prevent map parent listeners from receiving events.
this.setParentEventTarget(new goog.events.EventTarget());
};
goog.inherits(ol.Map, goog.events.EventTarget);