diff --git a/jsdoc.conf.json b/jsdoc.conf.json index 3affb7e973..7b94c91f4f 100644 --- a/jsdoc.conf.json +++ b/jsdoc.conf.json @@ -5,6 +5,7 @@ "plugins": [ "jsdoc/plugins/events", "jsdoc/plugins/typedef_augments", + "jsdoc/plugins/dot_in_name", "node_modules/jsdoc-autoprivate/autoprivate.js", "plugins/markdown" ], diff --git a/jsdoc/plugins/dot_in_name.js b/jsdoc/plugins/dot_in_name.js new file mode 100644 index 0000000000..3da09b16b5 --- /dev/null +++ b/jsdoc/plugins/dot_in_name.js @@ -0,0 +1,15 @@ +/** + * Allow doclet names to include a dot. The text '_DOT_' is replaced by a dot + * in the documentation. + */ +var dotToken = '_DOT_'; + +exports.handlers = { + processingComplete: function (e) { + e.doclets.forEach(function (doclet) { + if (doclet.name.indexOf(dotToken) >= 0) { + doclet.name = doclet.name.replace(new RegExp(dotToken, 'g'), '.'); + } + }); + } +}; diff --git a/src/choroplethFeature.js b/src/choroplethFeature.js index 3fb89196d7..964fa035bb 100644 --- a/src/choroplethFeature.js +++ b/src/choroplethFeature.js @@ -162,6 +162,9 @@ var choroplethFeature = function (arg) { * A uniform getter that always returns a function even for constant values. * If undefined input, return all the choropleth values as an object. * + * @function choropleth_DOT_get + * @memberof geo.choroplethFeature + * @instance * @param {string|undefined} key defines one of the attributes of a * choropleth. * @return {function} diff --git a/src/feature.js b/src/feature.js index 7314b47ae3..371e0ea8fd 100644 --- a/src/feature.js +++ b/src/feature.js @@ -440,6 +440,9 @@ var feature = function (arg) { * A uniform getter that always returns a function even for constant styles. * This can also return all defined styles as functions in a single object. * + * @function style_DOT_get + * @memberof geo.feature + * @instance * @param {string} [key] If defined, return a function for the named style. * Otherwise, return an object with a function for all defined styles. * @returns {function|object} Either a function for the named style or an diff --git a/src/meshFeature.js b/src/meshFeature.js index 5b2ef63120..ea0c5c77d9 100644 --- a/src/meshFeature.js +++ b/src/meshFeature.js @@ -157,6 +157,9 @@ var meshFeature = function (arg) { * A uniform getter that always returns a function even for constant values. * If undefined input, return all the mesh values as an object. * + * @function mesh_DOT_get + * @memberof geo.meshFeature + * @instance * @param {string|undefined} key The name of the mesh key or `undefined` to * return an object with all keys as functions. * @returns {object|function} A function related to the key, or an object