From 13d964488f47a857001f8afaf77dc02886d06fe2 Mon Sep 17 00:00:00 2001 From: Tim Schaub Date: Tue, 3 Jun 2014 11:39:15 -0600 Subject: [PATCH 1/4] Make getFeatureById method exportable --- src/ol/source/vectorsource.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ol/source/vectorsource.js b/src/ol/source/vectorsource.js index 03b4ffb3b6..b8e32af113 100644 --- a/src/ol/source/vectorsource.js +++ b/src/ol/source/vectorsource.js @@ -346,6 +346,7 @@ ol.source.Vector.prototype.getExtent = function() { * * @param {string|number} id Feature identifier. * @return {ol.Feature} The feature (or `null` if not found). + * @todo api */ ol.source.Vector.prototype.getFeatureById = function(id) { var feature = this.idIndex_[id.toString()]; From 559feba1ed487760d4e288863b25e99a30238637 Mon Sep 17 00:00:00 2001 From: Tim Schaub Date: Tue, 3 Jun 2014 12:43:45 -0600 Subject: [PATCH 2/4] Add interface for map events so properties can be disambiguated --- externs/oli.js | 18 ++++++++++++++++++ src/ol/mapevent.js | 1 + 2 files changed, 19 insertions(+) diff --git a/externs/oli.js b/externs/oli.js index 91ae1d9875..7f1d49940b 100644 --- a/externs/oli.js +++ b/externs/oli.js @@ -75,6 +75,23 @@ oli.MapBrowserEvent.prototype.pixel; +/** @interface */ +oli.MapEvent; + + +/** + * @type {ol.Map} + */ +oli.MapEvent.prototype.map; + + +/** + * @type {olx.FrameState} + */ +oli.MapEvent.prototype.frameState; + + + /** * @interface */ @@ -111,6 +128,7 @@ oli.interaction.DragAndDropEvent.prototype.projection; oli.interaction.DragAndDropEvent.prototype.file; + /** @interface */ oli.render.Event; diff --git a/src/ol/mapevent.js b/src/ol/mapevent.js index 4ac3bf4fd2..b411a1f7bf 100644 --- a/src/ol/mapevent.js +++ b/src/ol/mapevent.js @@ -27,6 +27,7 @@ ol.MapEventType = { /** * @constructor * @extends {goog.events.Event} + * @implements {oli.MapEvent} * @param {string} type Event type. * @param {ol.Map} map Map. * @param {?olx.FrameState=} opt_frameState Frame state. From 0f04236fc48674fcd9d7423e5e0fe6afa9643d94 Mon Sep 17 00:00:00 2001 From: Tim Schaub Date: Tue, 3 Jun 2014 12:45:03 -0600 Subject: [PATCH 3/4] Make map property of ol.MapEvent exportable --- src/ol/mapevent.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/ol/mapevent.js b/src/ol/mapevent.js index b411a1f7bf..a8e45a09fa 100644 --- a/src/ol/mapevent.js +++ b/src/ol/mapevent.js @@ -37,7 +37,9 @@ ol.MapEvent = function(type, map, opt_frameState) { goog.base(this, type); /** + * The map where the event occurred. * @type {ol.Map} + * @todo api */ this.map = map; From a9fc53e8dae9a840b7836fef0c64621490d7ab94 Mon Sep 17 00:00:00 2001 From: Tim Schaub Date: Tue, 3 Jun 2014 12:45:45 -0600 Subject: [PATCH 4/4] Make frameState property of ol.MapEvent exportable --- src/ol/mapevent.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/ol/mapevent.js b/src/ol/mapevent.js index a8e45a09fa..4eb7afaedb 100644 --- a/src/ol/mapevent.js +++ b/src/ol/mapevent.js @@ -44,7 +44,9 @@ ol.MapEvent = function(type, map, opt_frameState) { this.map = map; /** + * The frame state at the time of the event. * @type {?olx.FrameState} + * @todo api */ this.frameState = goog.isDef(opt_frameState) ? opt_frameState : null;