From 7271b50d5a5c59fab1db4e25a84766d6b4a4ae5c Mon Sep 17 00:00:00 2001 From: Andreas Hocevar Date: Wed, 30 Apr 2014 17:55:27 +0200 Subject: [PATCH] Simplify fires annotations --- apidoc/readme.md | 8 ++++---- apidoc/template/tmpl/method.tmpl | 2 +- src/ol/collection.js | 2 +- src/ol/interaction/draganddropinteraction.js | 3 +-- src/ol/interaction/dragboxinteraction.js | 2 +- src/ol/interaction/drawinteraction.js | 2 +- src/ol/layer/heatmaplayer.js | 2 +- src/ol/layer/imagelayer.js | 2 +- src/ol/layer/layer.js | 2 +- src/ol/layer/tilelayer.js | 2 +- src/ol/layer/vectorlayer.js | 2 +- src/ol/map.js | 6 +++--- src/ol/object.js | 2 +- src/ol/source/geojsonsource.js | 2 +- src/ol/source/gpxsource.js | 2 +- src/ol/source/igcsource.js | 2 +- src/ol/source/kmlsource.js | 2 +- src/ol/source/osmxmlsource.js | 2 +- src/ol/source/staticvectorsource.js | 2 +- src/ol/source/topojsonsource.js | 2 +- src/ol/source/vectorsource.js | 2 +- 21 files changed, 26 insertions(+), 27 deletions(-) diff --git a/apidoc/readme.md b/apidoc/readme.md index bdedae5f89..94a4e68f65 100644 --- a/apidoc/readme.md +++ b/apidoc/readme.md @@ -62,13 +62,13 @@ oli.MapBrowserEvent.prototype.coordinate; ``` To document which events are fired by a class or method, the `@fires` annotation is used: ```js - * @fires {@link ol.MapBrowserEvent} ol.MapBrowserEvent - * @fires {@link ol.MapEvent} ol.MapEvent - * @fires {@link ol.render.Event} ol.render.Event + * @fires ol.MapBrowserEvent + * @fires ol.MapEvent + * @fires ol.render.Event * ... */ ol.Map = function(options) { // ... }; ``` -Again, note the syntax of the `@fires` annotation. The link is necessary to provide a link to the documentation of the event, and the name of the event class is necessary for JSDoc3 to know which event we are talking about. + diff --git a/apidoc/template/tmpl/method.tmpl b/apidoc/template/tmpl/method.tmpl index 1bb11a2091..088e5f46ef 100644 --- a/apidoc/template/tmpl/method.tmpl +++ b/apidoc/template/tmpl/method.tmpl @@ -43,7 +43,7 @@ var self = this;
Fires:
diff --git a/src/ol/collection.js b/src/ol/collection.js index 667c6fa0a0..2e3b85b53a 100644 --- a/src/ol/collection.js +++ b/src/ol/collection.js @@ -67,7 +67,7 @@ ol.CollectionProperty = { * A mutable MVC Array. * @constructor * @extends {ol.Object} - * @fires {@link ol.CollectionEvent} ol.CollectionEvent + * @fires ol.CollectionEvent * @param {Array=} opt_array Array. * @todo observable length {number} readonly the length of the array * @todo api diff --git a/src/ol/interaction/draganddropinteraction.js b/src/ol/interaction/draganddropinteraction.js index a1a31bc010..16315d75ef 100644 --- a/src/ol/interaction/draganddropinteraction.js +++ b/src/ol/interaction/draganddropinteraction.js @@ -19,8 +19,7 @@ goog.require('ol.proj'); /** * @constructor * @extends {ol.interaction.Interaction} - * @fires {@link ol.interaction.DragAndDropEvent} - * ol.interaction.DragAndDropEvent + * @fires ol.interaction.DragAndDropEvent * @param {olx.interaction.DragAndDropOptions=} opt_options Options. * @todo api */ diff --git a/src/ol/interaction/dragboxinteraction.js b/src/ol/interaction/dragboxinteraction.js index d24e2bee68..a8209ba54e 100644 --- a/src/ol/interaction/dragboxinteraction.js +++ b/src/ol/interaction/dragboxinteraction.js @@ -76,7 +76,7 @@ goog.inherits(ol.DragBoxEvent, goog.events.Event); * * @constructor * @extends {ol.interaction.Pointer} - * @fires {@link ol.DragBoxEvent} ol.DragBoxEvent + * @fires ol.DragBoxEvent * @param {olx.interaction.DragBoxOptions=} opt_options Options. * @todo api */ diff --git a/src/ol/interaction/drawinteraction.js b/src/ol/interaction/drawinteraction.js index c58c005445..15d36386e5 100644 --- a/src/ol/interaction/drawinteraction.js +++ b/src/ol/interaction/drawinteraction.js @@ -68,7 +68,7 @@ goog.inherits(ol.DrawEvent, goog.events.Event); * Interaction that allows drawing geometries * @constructor * @extends {ol.interaction.Pointer} - * @fires {@link ol.DrawEvent} ol.DrawEvent + * @fires ol.DrawEvent * @param {olx.interaction.DrawOptions} options Options. * @todo api */ diff --git a/src/ol/layer/heatmaplayer.js b/src/ol/layer/heatmaplayer.js index ff756312f6..141520319b 100644 --- a/src/ol/layer/heatmaplayer.js +++ b/src/ol/layer/heatmaplayer.js @@ -23,7 +23,7 @@ ol.layer.HeatmapLayerProperty = { /** * @constructor * @extends {ol.layer.Vector} - * @fires {@link ol.render.Event} ol.render.Event + * @fires ol.render.Event * @param {olx.layer.HeatmapOptions=} opt_options Options. * @todo api */ diff --git a/src/ol/layer/imagelayer.js b/src/ol/layer/imagelayer.js index 22414b83b5..3bb117c739 100644 --- a/src/ol/layer/imagelayer.js +++ b/src/ol/layer/imagelayer.js @@ -7,7 +7,7 @@ goog.require('ol.layer.Layer'); /** * @constructor * @extends {ol.layer.Layer} - * @fires {@link ol.render.Event} ol.render.Event + * @fires ol.render.Event * @param {olx.layer.LayerOptions} options Layer options. * @todo api */ diff --git a/src/ol/layer/layer.js b/src/ol/layer/layer.js index 26bffd25cd..64a3ea67b6 100644 --- a/src/ol/layer/layer.js +++ b/src/ol/layer/layer.js @@ -12,7 +12,7 @@ goog.require('ol.source.Source'); /** * @constructor * @extends {ol.layer.Base} - * @fires {@link ol.render.Event} ol.render.Event + * @fires ol.render.Event * @param {olx.layer.LayerOptions} options Layer options. * @todo observable brightness {number} the brightness of the layer * @todo observable contrast {number} the contrast of the layer diff --git a/src/ol/layer/tilelayer.js b/src/ol/layer/tilelayer.js index 502f8aefaf..abac60b5ac 100644 --- a/src/ol/layer/tilelayer.js +++ b/src/ol/layer/tilelayer.js @@ -16,7 +16,7 @@ ol.layer.TileProperty = { /** * @constructor * @extends {ol.layer.Layer} - * @fires {@link ol.render.Event} ol.render.Event + * @fires ol.render.Event * @param {olx.layer.TileOptions} options Tile layer options. * @todo observable preload {number} the level to preload tiles up to * @todo api diff --git a/src/ol/layer/vectorlayer.js b/src/ol/layer/vectorlayer.js index 5252255461..ea9f0210d6 100644 --- a/src/ol/layer/vectorlayer.js +++ b/src/ol/layer/vectorlayer.js @@ -19,7 +19,7 @@ ol.layer.VectorProperty = { * * @constructor * @extends {ol.layer.Layer} - * @fires {@link ol.render.Event} ol.render.Event + * @fires ol.render.Event * @param {olx.layer.VectorOptions=} opt_options Options. * @todo api */ diff --git a/src/ol/map.js b/src/ol/map.js index 05f180dc17..d5a8e8dd2f 100644 --- a/src/ol/map.js +++ b/src/ol/map.js @@ -156,10 +156,10 @@ ol.MapProperty = { * @constructor * @extends {ol.Object} * @param {olx.MapOptions} options Map options. - * @fires {@link ol.MapBrowserEvent} ol.MapBrowserEvent - * @fires {@link ol.MapEvent} ol.MapEvent - * @fires {@link ol.render.Event} ol.render.Event * @todo observable layergroup {ol.layer.Group} a layer group containing the + * @fires ol.MapBrowserEvent + * @fires ol.MapEvent + * @fires ol.render.Event * layers in this map. * @todo observable size {ol.Size} the size in pixels of the map in the DOM * @todo observable target {string|Element} the Element or id of the Element diff --git a/src/ol/object.js b/src/ol/object.js index ecab3f413e..1841c4bd0f 100644 --- a/src/ol/object.js +++ b/src/ol/object.js @@ -108,7 +108,7 @@ ol.ObjectAccessor.prototype.transform = function(from, to) { * @constructor * @extends {ol.Observable} * @param {Object.=} opt_values Values. - * @fires {@link ol.ObjectEvent} ol.ObjectEvent + * @fires ol.ObjectEvent * @todo api */ ol.Object = function(opt_values) { diff --git a/src/ol/source/geojsonsource.js b/src/ol/source/geojsonsource.js index 49cbde0918..caa5b371dc 100644 --- a/src/ol/source/geojsonsource.js +++ b/src/ol/source/geojsonsource.js @@ -8,7 +8,7 @@ goog.require('ol.source.StaticVector'); /** * @constructor * @extends {ol.source.StaticVector} - * @fires {@link ol.source.VectorEvent} ol.source.VectorEvent + * @fires ol.source.VectorEvent * @param {olx.source.GeoJSONOptions=} opt_options Options. * @todo api */ diff --git a/src/ol/source/gpxsource.js b/src/ol/source/gpxsource.js index 4e6f8b1a69..cb9d6a012c 100644 --- a/src/ol/source/gpxsource.js +++ b/src/ol/source/gpxsource.js @@ -8,7 +8,7 @@ goog.require('ol.source.StaticVector'); /** * @constructor * @extends {ol.source.StaticVector} - * @fires {@link ol.source.VectorEvent} ol.source.VectorEvent + * @fires ol.source.VectorEvent * @param {olx.source.GPXOptions=} opt_options Options. * @todo api */ diff --git a/src/ol/source/igcsource.js b/src/ol/source/igcsource.js index a909088327..12015841a5 100644 --- a/src/ol/source/igcsource.js +++ b/src/ol/source/igcsource.js @@ -8,7 +8,7 @@ goog.require('ol.source.StaticVector'); /** * @constructor * @extends {ol.source.StaticVector} - * @fires {@link ol.source.VectorEvent} ol.source.VectorEvent + * @fires ol.source.VectorEvent * @param {olx.source.IGCOptions=} opt_options Options. * @todo api */ diff --git a/src/ol/source/kmlsource.js b/src/ol/source/kmlsource.js index 949e25f2d6..2ad6d10c40 100644 --- a/src/ol/source/kmlsource.js +++ b/src/ol/source/kmlsource.js @@ -8,7 +8,7 @@ goog.require('ol.source.StaticVector'); /** * @constructor * @extends {ol.source.StaticVector} - * @fires {@link ol.source.VectorEvent} ol.source.VectorEvent + * @fires ol.source.VectorEvent * @param {olx.source.KMLOptions=} opt_options Options. * @todo api */ diff --git a/src/ol/source/osmxmlsource.js b/src/ol/source/osmxmlsource.js index b6d80c20fc..735af17fa1 100644 --- a/src/ol/source/osmxmlsource.js +++ b/src/ol/source/osmxmlsource.js @@ -8,7 +8,7 @@ goog.require('ol.source.StaticVector'); /** * @constructor * @extends {ol.source.StaticVector} - * @fires {@link ol.source.VectorEvent} ol.source.VectorEvent + * @fires ol.source.VectorEvent * @param {olx.source.OSMXMLOptions=} opt_options Options. * @todo api */ diff --git a/src/ol/source/staticvectorsource.js b/src/ol/source/staticvectorsource.js index 9133cd25b8..3baf406036 100644 --- a/src/ol/source/staticvectorsource.js +++ b/src/ol/source/staticvectorsource.js @@ -8,7 +8,7 @@ goog.require('ol.source.State'); /** * @constructor * @extends {ol.source.FormatVector} - * @fires {@link ol.source.VectorEvent} ol.source.VectorEvent + * @fires ol.source.VectorEvent * @param {olx.source.StaticVectorOptions} options Options. * @todo api */ diff --git a/src/ol/source/topojsonsource.js b/src/ol/source/topojsonsource.js index 5e68221b4d..1a67265eb5 100644 --- a/src/ol/source/topojsonsource.js +++ b/src/ol/source/topojsonsource.js @@ -8,7 +8,7 @@ goog.require('ol.source.StaticVector'); /** * @constructor * @extends {ol.source.StaticVector} - * @fires {@link ol.source.VectorEvent} ol.source.VectorEvent + * @fires ol.source.VectorEvent * @param {olx.source.TopoJSONOptions=} opt_options Options. * @todo api */ diff --git a/src/ol/source/vectorsource.js b/src/ol/source/vectorsource.js index f7a5d6239e..e16c38130b 100644 --- a/src/ol/source/vectorsource.js +++ b/src/ol/source/vectorsource.js @@ -41,7 +41,7 @@ ol.source.VectorEventType = { /** * @constructor * @extends {ol.source.Source} - * @fires {@link ol.source.VectorEvent} ol.source.VectorEvent + * @fires ol.source.VectorEvent * @param {olx.source.VectorOptions=} opt_options Vector source options. * @todo api */