Use JSDoc's stock event documentation
This commit is contained in:
@@ -21,7 +21,6 @@
|
||||
"apidoc/plugins/inheritdoc",
|
||||
"apidoc/plugins/exports",
|
||||
"apidoc/plugins/todo",
|
||||
"apidoc/plugins/event",
|
||||
"apidoc/plugins/observable",
|
||||
"apidoc/plugins/stability"
|
||||
],
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
var util = require('util');
|
||||
exports.defineTags = function(dictionary) {
|
||||
dictionary.defineTag('event', {
|
||||
mustHaveValue: true,
|
||||
canHaveType: false,
|
||||
canHaveName: true,
|
||||
onTagged: function(doclet, tag) {
|
||||
var parts = tag.text.split(' ');
|
||||
if (!doclet.events) {
|
||||
doclet.events = [];
|
||||
}
|
||||
doclet.events.push({
|
||||
name: tag.value.name,
|
||||
description: parts.slice(1).join(' ')
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
@@ -21,6 +21,12 @@ exports.defineTags = function(dictionary) {
|
||||
description: description,
|
||||
readonly: readonly
|
||||
});
|
||||
if (!doclet.fires) {
|
||||
doclet.fires = [];
|
||||
}
|
||||
if (doclet.fires.indexOf('{@link ol.ObjectEvent} ol.event:ObjectEvent') === -1) {
|
||||
doclet.fires.push('{@link ol.ObjectEvent} ol.event:ObjectEvent');
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
@@ -22,14 +22,12 @@ exports.defineTags = function(dictionary) {
|
||||
description: description,
|
||||
readonly: readonly
|
||||
});
|
||||
} else if (parts[0] === 'event') {
|
||||
if (!doclet.events) {
|
||||
doclet.events = [];
|
||||
if (!doclet.fires) {
|
||||
doclet.fires = [];
|
||||
}
|
||||
if (doclet.fires.indexOf('{@link ol.ObjectEvent} ol.event:ObjectEvent') === -1) {
|
||||
doclet.fires.push('{@link ol.ObjectEvent} ol.event:ObjectEvent');
|
||||
}
|
||||
doclet.events.push({
|
||||
name: parts[1],
|
||||
description: parts.slice(2).join(' ')
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
<table class="props">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th class="last">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<?js
|
||||
obj.forEach(function(prop) {
|
||||
if (!prop) { return; }
|
||||
var setter = prop.readonly ? 'no' : 'yes';
|
||||
?>
|
||||
<tr>
|
||||
<td class="name"><code><?js= prop.name ?></code></td>
|
||||
<td class="description last"><?js= prop.description ?></td>
|
||||
</tr>
|
||||
<?js }); ?>
|
||||
</tbody>
|
||||
</table>
|
||||
Reference in New Issue
Block a user