Use JSDoc's stock event documentation

This commit is contained in:
ahocevar
2014-03-25 18:21:08 +01:00
parent f37245963c
commit 7e850ca33d
8 changed files with 32 additions and 66 deletions

View File

@@ -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(' ')
});
}
}
});