From 1020c384bbb601af764402a40b294fc6ccf46dd2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20Kr=C3=B6g?= Date: Sat, 11 Jan 2020 23:46:52 +0100 Subject: [PATCH 1/3] Fix two missing apidoc links Add IconAnchorUnits and IconOrigin to the api. --- src/ol/style/IconAnchorUnits.js | 7 +++++++ src/ol/style/IconOrigin.js | 13 +++++++++++++ 2 files changed, 20 insertions(+) diff --git a/src/ol/style/IconAnchorUnits.js b/src/ol/style/IconAnchorUnits.js index eaa549d3ce..95d9562bc2 100644 --- a/src/ol/style/IconAnchorUnits.js +++ b/src/ol/style/IconAnchorUnits.js @@ -5,8 +5,15 @@ /** * Icon anchor units. One of 'fraction', 'pixels'. * @enum {string} + * @api */ export default { + /** + * Anchor is a fraction + */ FRACTION: 'fraction', + /** + * Anchor is in pixels + */ PIXELS: 'pixels' }; diff --git a/src/ol/style/IconOrigin.js b/src/ol/style/IconOrigin.js index d1bad0bdf7..f756a5df2d 100644 --- a/src/ol/style/IconOrigin.js +++ b/src/ol/style/IconOrigin.js @@ -5,10 +5,23 @@ /** * Icon origin. One of 'bottom-left', 'bottom-right', 'top-left', 'top-right'. * @enum {string} + * @api */ export default { + /** + * Origin is at bottom left + */ BOTTOM_LEFT: 'bottom-left', + /** + * Origin is at bottom right + */ BOTTOM_RIGHT: 'bottom-right', + /** + * Origin is at top left + */ TOP_LEFT: 'top-left', + /** + * Origin is at top right + */ TOP_RIGHT: 'top-right' }; From a6a5b72c57d3a9cceaad2ab4dde45df177a861bb Mon Sep 17 00:00:00 2001 From: Andreas Hocevar Date: Fri, 27 Mar 2020 12:24:41 +0100 Subject: [PATCH 2/3] Only mark items as api, not enums --- src/ol/style/IconAnchorUnits.js | 3 ++- src/ol/style/IconOrigin.js | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/ol/style/IconAnchorUnits.js b/src/ol/style/IconAnchorUnits.js index 95d9562bc2..af81e71ff2 100644 --- a/src/ol/style/IconAnchorUnits.js +++ b/src/ol/style/IconAnchorUnits.js @@ -5,15 +5,16 @@ /** * Icon anchor units. One of 'fraction', 'pixels'. * @enum {string} - * @api */ export default { /** * Anchor is a fraction + * @api */ FRACTION: 'fraction', /** * Anchor is in pixels + * @api */ PIXELS: 'pixels' }; diff --git a/src/ol/style/IconOrigin.js b/src/ol/style/IconOrigin.js index f756a5df2d..7ef62e96c8 100644 --- a/src/ol/style/IconOrigin.js +++ b/src/ol/style/IconOrigin.js @@ -5,23 +5,26 @@ /** * Icon origin. One of 'bottom-left', 'bottom-right', 'top-left', 'top-right'. * @enum {string} - * @api */ export default { /** * Origin is at bottom left + * @api */ BOTTOM_LEFT: 'bottom-left', /** * Origin is at bottom right + * @api */ BOTTOM_RIGHT: 'bottom-right', /** * Origin is at top left + * @api */ TOP_LEFT: 'top-left', /** * Origin is at top right + * @api */ TOP_RIGHT: 'top-right' }; From dd44ecf18516425516dbd58756a2c55a0f06c521 Mon Sep 17 00:00:00 2001 From: Andreas Hocevar Date: Sat, 28 Mar 2020 10:51:25 +0100 Subject: [PATCH 3/3] Only document enums when they have API properties --- config/jsdoc/api/plugins/api.js | 12 +++++------- config/jsdoc/api/template/tmpl/method.tmpl | 11 ++++------- 2 files changed, 9 insertions(+), 14 deletions(-) diff --git a/config/jsdoc/api/plugins/api.js b/config/jsdoc/api/plugins/api.js index c384d86dad..53e0a8c174 100644 --- a/config/jsdoc/api/plugins/api.js +++ b/config/jsdoc/api/plugins/api.js @@ -73,9 +73,6 @@ function includeAugments(doclet) { }); } cls._hideConstructor = true; - if (!cls.undocumented) { - cls._documented = true; - } } } } @@ -182,13 +179,14 @@ exports.handlers = { doclet._hideConstructor = true; includeAugments(doclet); sortOtherMembers(doclet); - } else if (!doclet._hideConstructor - && !(doclet.longname in defaultExports && byLongname[doclet.longname].some(d => d.isEnum))) { + } else if (!doclet._hideConstructor) { // Remove all other undocumented symbols doclet.undocumented = true; } - if (doclet._documented) { - delete doclet.undocumented; + if (doclet.memberof && byLongname[doclet.memberof] && + byLongname[doclet.memberof][0].isEnum && + !byLongname[doclet.memberof][0].properties.some(p => p.stability)) { + byLongname[doclet.memberof][0].undocumented = true; } } }, diff --git a/config/jsdoc/api/template/tmpl/method.tmpl b/config/jsdoc/api/template/tmpl/method.tmpl index a5ddc77f5d..9ff68aa638 100644 --- a/config/jsdoc/api/template/tmpl/method.tmpl +++ b/config/jsdoc/api/template/tmpl/method.tmpl @@ -64,7 +64,7 @@ var self = this;
  • - - - () - + + + () -