Convert ol.CollectionEvent#getElement method into element property

This commit is contained in:
Tom Payne
2014-01-23 18:30:36 +01:00
parent 1e52d30d59
commit 3d68a3550e
6 changed files with 28 additions and 29 deletions
+4 -12
View File
@@ -26,32 +26,24 @@ ol.CollectionEventType = {
/**
* @constructor
* @extends {goog.events.Event}
* @implements {oli.CollectionEvent}
* @param {ol.CollectionEventType} type Type.
* @param {*=} opt_elem Element.
* @param {*=} opt_element Element.
* @param {Object=} opt_target Target.
*/
ol.CollectionEvent = function(type, opt_elem, opt_target) {
ol.CollectionEvent = function(type, opt_element, opt_target) {
goog.base(this, type, opt_target);
/**
* @private
* @type {*}
*/
this.elem_ = opt_elem;
this.element = opt_element;
};
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}
*/