Files
openlayers/apidoc/plugins/observable.js
Andreas Hocevar 5a13488b11 Stop adding ObjectEvent links manually
Now that the links are removed from event annotations, we no
longer need to do this, because inheritance works.
2014-05-02 12:06:48 +02:00

30 lines
779 B
JavaScript

var util = require('util');
exports.defineTags = function(dictionary) {
dictionary.defineTag('observable', {
mustHaveValue: true,
canHaveType: true,
canHaveName: true,
onTagged: function(doclet, tag) {
if (!doclet.observables) {
doclet.observables = [];
}
var description = tag.value.description;
var readonly = description.split(' ').shift() === 'readonly';
if (readonly) {
description = description.split(' ').slice(1).join(' ');
}
doclet.observables.push({
name: tag.value.name,
type: {
names: tag.value.type.names
},
description: description,
readonly: readonly
});
if (!doclet.fires) {
doclet.fires = [];
}
}
});
};