From b2aa9bb19fefb32d878443ab6f3194407df7c340 Mon Sep 17 00:00:00 2001 From: Tom Payne Date: Sun, 2 Mar 2014 12:24:09 +0100 Subject: [PATCH] Export ol.DragBoxEvent coordinate as a property, not a function --- externs/oli.js | 10 ++++++++++ src/ol/interaction/dragboxinteraction.exports | 2 -- src/ol/interaction/dragboxinteraction.js | 14 +++----------- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/externs/oli.js b/externs/oli.js index 731886a2d8..9e4d5632fe 100644 --- a/externs/oli.js +++ b/externs/oli.js @@ -18,6 +18,16 @@ oli.CollectionEvent = function() {}; oli.CollectionEvent.prototype.element; + +/** @interface */ +oli.DragBoxEvent; + + +/** @type {ol.Coordinate} */ +oli.DragBoxEvent.prototype.coordinate; + + + /** @interface */ oli.DrawEvent; diff --git a/src/ol/interaction/dragboxinteraction.exports b/src/ol/interaction/dragboxinteraction.exports index 7553395958..7b578e067a 100644 --- a/src/ol/interaction/dragboxinteraction.exports +++ b/src/ol/interaction/dragboxinteraction.exports @@ -1,4 +1,2 @@ @exportSymbol ol.interaction.DragBox @exportProperty ol.interaction.DragBox.prototype.getGeometry - -@exportProperty ol.DragBoxEvent.prototype.getCoordinate diff --git a/src/ol/interaction/dragboxinteraction.js b/src/ol/interaction/dragboxinteraction.js index 44cdf04267..f12f1c2f7c 100644 --- a/src/ol/interaction/dragboxinteraction.js +++ b/src/ol/interaction/dragboxinteraction.js @@ -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