Export ol.DragBoxEvent coordinate as a property, not a function
This commit is contained in:
@@ -18,6 +18,16 @@ oli.CollectionEvent = function() {};
|
||||
oli.CollectionEvent.prototype.element;
|
||||
|
||||
|
||||
|
||||
/** @interface */
|
||||
oli.DragBoxEvent;
|
||||
|
||||
|
||||
/** @type {ol.Coordinate} */
|
||||
oli.DragBoxEvent.prototype.coordinate;
|
||||
|
||||
|
||||
|
||||
/** @interface */
|
||||
oli.DrawEvent;
|
||||
|
||||
|
||||
@@ -1,4 +1,2 @@
|
||||
@exportSymbol ol.interaction.DragBox
|
||||
@exportProperty ol.interaction.DragBox.prototype.getGeometry
|
||||
|
||||
@exportProperty ol.DragBoxEvent.prototype.getCoordinate
|
||||
|
||||
@@ -44,30 +44,22 @@ ol.DragBoxEventType = {
|
||||
* @param {ol.Coordinate} coordinate The event coordinate.
|
||||
* @extends {goog.events.Event}
|
||||
* @constructor
|
||||
* @implements {oli.DragBoxEvent}
|
||||
*/
|
||||
ol.DragBoxEvent = function(type, coordinate) {
|
||||
goog.base(this, type);
|
||||
|
||||
/**
|
||||
* The coordinate of the drag event.
|
||||
* @const
|
||||
* @type {ol.Coordinate}
|
||||
* @private
|
||||
*/
|
||||
this.coordinate_ = coordinate;
|
||||
this.coordinate = coordinate;
|
||||
|
||||
};
|
||||
goog.inherits(ol.DragBoxEvent, goog.events.Event);
|
||||
|
||||
|
||||
/**
|
||||
* Get the name of the property associated with this event.
|
||||
* @return {ol.Coordinate} Event coordinate.
|
||||
*/
|
||||
ol.DragBoxEvent.prototype.getCoordinate = function() {
|
||||
return this.coordinate_;
|
||||
};
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
|
||||
Reference in New Issue
Block a user