Convert ol.DrawEvent#getFeature method into feature property
This commit is contained in:
@@ -18,6 +18,15 @@ oli.CollectionEvent = function() {};
|
|||||||
oli.CollectionEvent.prototype.element;
|
oli.CollectionEvent.prototype.element;
|
||||||
|
|
||||||
|
|
||||||
|
/** @interface */
|
||||||
|
oli.DrawEvent;
|
||||||
|
|
||||||
|
|
||||||
|
/** @type {ol.Feature} */
|
||||||
|
oli.DrawEvent.prototype.feature;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/** @interface */
|
/** @interface */
|
||||||
oli.ObjectEvent;
|
oli.ObjectEvent;
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1 @@
|
|||||||
@exportSymbol ol.interaction.Draw
|
@exportSymbol ol.interaction.Draw
|
||||||
|
|
||||||
@exportProperty ol.DrawEvent.prototype.getFeature
|
|
||||||
|
|||||||
@@ -38,6 +38,7 @@ ol.DrawEventType = {
|
|||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
* @extends {goog.events.Event}
|
* @extends {goog.events.Event}
|
||||||
|
* @implements {oli.DrawEvent}
|
||||||
* @param {ol.DrawEventType} type Type.
|
* @param {ol.DrawEventType} type Type.
|
||||||
* @param {ol.Feature} feature The feature drawn.
|
* @param {ol.Feature} feature The feature drawn.
|
||||||
*/
|
*/
|
||||||
@@ -46,23 +47,14 @@ ol.DrawEvent = function(type, feature) {
|
|||||||
goog.base(this, type);
|
goog.base(this, type);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
|
||||||
* @type {ol.Feature}
|
* @type {ol.Feature}
|
||||||
*/
|
*/
|
||||||
this.feature_ = feature;
|
this.feature = feature;
|
||||||
|
|
||||||
};
|
};
|
||||||
goog.inherits(ol.DrawEvent, goog.events.Event);
|
goog.inherits(ol.DrawEvent, goog.events.Event);
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return {ol.Feature} The feature drawn to which this event pertains.
|
|
||||||
*/
|
|
||||||
ol.DrawEvent.prototype.getFeature = function() {
|
|
||||||
return this.feature_;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Interaction that allows drawing geometries
|
* Interaction that allows drawing geometries
|
||||||
|
|||||||
Reference in New Issue
Block a user