diff --git a/externs/oli.js b/externs/oli.js index 70ba0a7b0c..81bc3cd27a 100644 --- a/externs/oli.js +++ b/externs/oli.js @@ -72,3 +72,12 @@ oli.render.Event.prototype.glContext; /** @type {ol.render.IRender|undefined} */ oli.render.Event.prototype.render; + + + +/** @interface */ +oli.source.VectorEvent; + + +/** @type {ol.Feature} */ +oli.source.VectorEvent.prototype.feature; diff --git a/src/ol/source/vectorsource.exports b/src/ol/source/vectorsource.exports index a0aef2893b..6117cb3ec8 100644 --- a/src/ol/source/vectorsource.exports +++ b/src/ol/source/vectorsource.exports @@ -8,5 +8,3 @@ @exportProperty ol.source.Vector.prototype.getAllFeatures @exportProperty ol.source.Vector.prototype.getAllFeaturesAtCoordinate @exportProperty ol.source.Vector.prototype.removeFeature - -@exportProperty ol.source.VectorEvent.prototype.getFeature diff --git a/src/ol/source/vectorsource.js b/src/ol/source/vectorsource.js index b08834df8a..91b5b869a7 100644 --- a/src/ol/source/vectorsource.js +++ b/src/ol/source/vectorsource.js @@ -342,6 +342,7 @@ ol.source.Vector.prototype.removeFeatureInternal = function(feature) { /** * @constructor * @extends {goog.events.Event} + * @implements {oli.source.VectorEvent} * @param {string} type Type. * @param {ol.Feature=} opt_feature Feature. */ @@ -350,18 +351,9 @@ ol.source.VectorEvent = function(type, opt_feature) { goog.base(this, type); /** - * @private * @type {ol.Feature|undefined} */ - this.feature_ = opt_feature; + this.feature = opt_feature; }; goog.inherits(ol.source.VectorEvent, goog.events.Event); - - -/** - * @return {ol.Feature|undefined} Feature. - */ -ol.source.VectorEvent.prototype.getFeature = function() { - return this.feature_; -};