Simplify fires annotations
This commit is contained in:
@@ -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.
|
||||
|
||||
|
||||
@@ -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 } ?>
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
*/
|
||||
|
||||
@@ -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
|
||||
*/
|
||||
|
||||
@@ -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
|
||||
*/
|
||||
|
||||
@@ -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
|
||||
*/
|
||||
|
||||
@@ -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
|
||||
*/
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
*/
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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
|
||||
*/
|
||||
|
||||
@@ -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
|
||||
*/
|
||||
|
||||
@@ -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
|
||||
*/
|
||||
|
||||
@@ -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
|
||||
*/
|
||||
|
||||
@@ -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
|
||||
*/
|
||||
|
||||
@@ -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
|
||||
*/
|
||||
|
||||
@@ -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
|
||||
*/
|
||||
|
||||
@@ -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
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user