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 } ?>