Simplify fires annotations

This commit is contained in:
Andreas Hocevar
2014-04-30 17:55:27 +02:00
parent f22aac1e22
commit 7271b50d5a
21 changed files with 26 additions and 27 deletions

View File

@@ -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.

View File

@@ -43,7 +43,7 @@ var self = this;
<?js if (data.fires && fires.length) { ?>
<h5>Fires:</h5>
<ul><?js fires.forEach(function(f) { ?>
<?js= self.partial('fires.tmpl', self.linkto(f) ) ?>
<?js= self.partial('fires.tmpl', self.linkto(f.replace('event:', '')) ) ?>
<?js }); ?></ul>
<?js } ?>

View File

@@ -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

View File

@@ -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
*/

View File

@@ -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
*/

View File

@@ -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
*/

View File

@@ -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
*/

View File

@@ -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
*/

View File

@@ -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

View File

@@ -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

View File

@@ -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
*/

View File

@@ -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

View File

@@ -108,7 +108,7 @@ ol.ObjectAccessor.prototype.transform = function(from, to) {
* @constructor
* @extends {ol.Observable}
* @param {Object.<string, *>=} opt_values Values.
* @fires {@link ol.ObjectEvent} ol.ObjectEvent
* @fires ol.ObjectEvent
* @todo api
*/
ol.Object = function(opt_values) {

View File

@@ -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
*/

View File

@@ -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
*/

View File

@@ -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
*/

View File

@@ -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
*/

View File

@@ -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
*/

View File

@@ -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
*/

View File

@@ -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
*/

View File

@@ -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
*/