diff --git a/apidoc/plugins/exports.js b/apidoc/plugins/exports.js index 6f268734bf..73f6dae2ed 100644 --- a/apidoc/plugins/exports.js +++ b/apidoc/plugins/exports.js @@ -37,7 +37,6 @@ function collectOliExports(source) { for (; i < ii; ++i) { property = 'ol.' + oli[i].match(/oli.([^;]*)/)[1] .replace('.prototype.', '#'); - api.push(property); unexported.push(property); } } @@ -73,7 +72,6 @@ exports.handlers = { } } if (api.indexOf(e.doclet.longname) > -1) { - // Add params, links and events of API symbols to the API var names, name; var params = e.doclet.params; if (params) { @@ -92,19 +90,9 @@ exports.handlers = { var links = e.doclet.comment.match(/\{@link ([^\}]*)\}/g); if (links) { for (i=0, ii=links.length; i < ii; ++i) { - if (unexported.indexOf(links[i]) === -1) { - unexported.push(links[i].match(/\{@link (.*)\}/)[1]); - } - } - } - var fires = e.doclet.fires; - var event; - if (fires) { - for (i = 0, ii = fires.length; i < ii; ++i) { - event = fires[i].split(' ').pop(); - name = event.replace('event:', ''); - if (unexported.indexOf(name) === -1) { - unexported.push(name); + var link = links[i].match(/\{@link (.*)\}/)[1]; + if (unexported.indexOf(link) === -1) { + unexported.push(link); } } } @@ -114,25 +102,13 @@ exports.handlers = { parseComplete: function(e) { for (var j = e.doclets.length - 1; j >= 0; --j) { var doclet = e.doclets[j]; - if (doclet.kind == 'namespace') { + if (doclet.kind == 'namespace' || doclet.kind == 'event' || doclet.fires) { continue; } var fqn = doclet.longname; if (fqn) { - doclet.unexported = (unexported.indexOf(fqn) !== -1); - var undocumented = (api.indexOf(fqn) === -1 && !doclet.unexported); - // Remove parents that are not part of the API - var parent; - var parents = doclet.augments; - if (parents) { - for (var i = parents.length - 1; i >= 0; --i) { - parent = parents[i]; - if (api.indexOf(parent) === -1 && unexported.indexOf(parent) === -1) { - parents.splice(i, 1); - } - } - } - if (undocumented) { + doclet.unexported = (api.indexOf(fqn) === -1 && unexported.indexOf(fqn) !== -1); + if (api.indexOf(fqn) === -1 && unexported.indexOf(fqn) === -1) { e.doclets.splice(j, 1); } } diff --git a/apidoc/template/static/styles/jsdoc-default.css b/apidoc/template/static/styles/jsdoc-default.css index 56bbb5b4e4..4b6945c4b9 100644 --- a/apidoc/template/static/styles/jsdoc-default.css +++ b/apidoc/template/static/styles/jsdoc-default.css @@ -211,7 +211,7 @@ dt.tag-source, dd.tag-source { .description { margin-bottom: 1em; - margin-left: -16px; + margin-left: 0px; margin-top: 1em; }