Convert ol.source.VectorEvent#getFeature method into feature property
This commit is contained in:
@@ -72,3 +72,12 @@ oli.render.Event.prototype.glContext;
|
|||||||
|
|
||||||
/** @type {ol.render.IRender|undefined} */
|
/** @type {ol.render.IRender|undefined} */
|
||||||
oli.render.Event.prototype.render;
|
oli.render.Event.prototype.render;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/** @interface */
|
||||||
|
oli.source.VectorEvent;
|
||||||
|
|
||||||
|
|
||||||
|
/** @type {ol.Feature} */
|
||||||
|
oli.source.VectorEvent.prototype.feature;
|
||||||
|
|||||||
@@ -8,5 +8,3 @@
|
|||||||
@exportProperty ol.source.Vector.prototype.getAllFeatures
|
@exportProperty ol.source.Vector.prototype.getAllFeatures
|
||||||
@exportProperty ol.source.Vector.prototype.getAllFeaturesAtCoordinate
|
@exportProperty ol.source.Vector.prototype.getAllFeaturesAtCoordinate
|
||||||
@exportProperty ol.source.Vector.prototype.removeFeature
|
@exportProperty ol.source.Vector.prototype.removeFeature
|
||||||
|
|
||||||
@exportProperty ol.source.VectorEvent.prototype.getFeature
|
|
||||||
|
|||||||
@@ -342,6 +342,7 @@ ol.source.Vector.prototype.removeFeatureInternal = function(feature) {
|
|||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
* @extends {goog.events.Event}
|
* @extends {goog.events.Event}
|
||||||
|
* @implements {oli.source.VectorEvent}
|
||||||
* @param {string} type Type.
|
* @param {string} type Type.
|
||||||
* @param {ol.Feature=} opt_feature Feature.
|
* @param {ol.Feature=} opt_feature Feature.
|
||||||
*/
|
*/
|
||||||
@@ -350,18 +351,9 @@ ol.source.VectorEvent = function(type, opt_feature) {
|
|||||||
goog.base(this, type);
|
goog.base(this, type);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
|
||||||
* @type {ol.Feature|undefined}
|
* @type {ol.Feature|undefined}
|
||||||
*/
|
*/
|
||||||
this.feature_ = opt_feature;
|
this.feature = opt_feature;
|
||||||
|
|
||||||
};
|
};
|
||||||
goog.inherits(ol.source.VectorEvent, goog.events.Event);
|
goog.inherits(ol.source.VectorEvent, goog.events.Event);
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return {ol.Feature|undefined} Feature.
|
|
||||||
*/
|
|
||||||
ol.source.VectorEvent.prototype.getFeature = function() {
|
|
||||||
return this.feature_;
|
|
||||||
};
|
|
||||||
|
|||||||
Reference in New Issue
Block a user