From b9f2f7bcb49f4011f7e702067c0ddc394d10e98c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Lemoine?= Date: Tue, 27 Aug 2013 22:07:03 +0200 Subject: [PATCH] Add ol.CollectionEvent#getElement --- src/ol/collection.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/ol/collection.js b/src/ol/collection.js index e73eb3376e..993efd2a6c 100644 --- a/src/ol/collection.js +++ b/src/ol/collection.js @@ -35,14 +35,23 @@ ol.CollectionEvent = function(type, opt_elem, opt_target) { goog.base(this, type, opt_target); /** + * @private * @type {*} */ - this.elem = opt_elem; + this.elem_ = opt_elem; }; goog.inherits(ol.CollectionEvent, goog.events.Event); +/** + * @return {*} The element to which this event pertains. + */ +ol.CollectionEvent.prototype.getElement = function() { + return this.elem_; +}; + + /** * @enum {string} */