Export ol.DragBoxEvent coordinate as a property, not a function

This commit is contained in:
Tom Payne
2014-03-02 12:24:09 +01:00
parent 95674a5a4c
commit b2aa9bb19f
3 changed files with 13 additions and 13 deletions

View File

@@ -18,6 +18,16 @@ oli.CollectionEvent = function() {};
oli.CollectionEvent.prototype.element; oli.CollectionEvent.prototype.element;
/** @interface */
oli.DragBoxEvent;
/** @type {ol.Coordinate} */
oli.DragBoxEvent.prototype.coordinate;
/** @interface */ /** @interface */
oli.DrawEvent; oli.DrawEvent;

View File

@@ -1,4 +1,2 @@
@exportSymbol ol.interaction.DragBox @exportSymbol ol.interaction.DragBox
@exportProperty ol.interaction.DragBox.prototype.getGeometry @exportProperty ol.interaction.DragBox.prototype.getGeometry
@exportProperty ol.DragBoxEvent.prototype.getCoordinate

View File

@@ -44,30 +44,22 @@ ol.DragBoxEventType = {
* @param {ol.Coordinate} coordinate The event coordinate. * @param {ol.Coordinate} coordinate The event coordinate.
* @extends {goog.events.Event} * @extends {goog.events.Event}
* @constructor * @constructor
* @implements {oli.DragBoxEvent}
*/ */
ol.DragBoxEvent = function(type, coordinate) { ol.DragBoxEvent = function(type, coordinate) {
goog.base(this, type); goog.base(this, type);
/** /**
* The coordinate of the drag event. * The coordinate of the drag event.
* @const
* @type {ol.Coordinate} * @type {ol.Coordinate}
* @private
*/ */
this.coordinate_ = coordinate; this.coordinate = coordinate;
}; };
goog.inherits(ol.DragBoxEvent, goog.events.Event); 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 * @constructor