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 } ?>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user