Skip to content

Commit

Permalink
docs: Update some namespace and private tags
Browse files Browse the repository at this point in the history
  • Loading branch information
manthey committed Dec 12, 2024
1 parent 91b0d33 commit c4cbcec
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/annotation/annotation.js
Original file line number Diff line number Diff line change
Expand Up @@ -1252,6 +1252,7 @@ var annotation = function (type, args) {
/**
* Return actions needed for the specified state of this annotation.
*
* @private
* @param {object} m_this The current annotation instance.
* @param {function} s_actions The parent actions method.
* @param {string|undefined} state The state to return actions for. Defaults
Expand Down Expand Up @@ -1285,6 +1286,7 @@ function continuousVerticesActions(m_this, s_actions, state, name, originalArgs)
/**
* Process actions to allow drawing continuous vertices for an annotation.
*
* @private
* @param {object} m_this The current annotation instance.
* @param {geo.event} evt The action event.
* @param {string} name The name of this annotation.
Expand Down Expand Up @@ -1346,6 +1348,7 @@ function continuousVerticesProcessAction(m_this, evt, name) {
* that the aspect ratio of a rectangle-like selection is a specific value or
* range of values.
*
* @private
* @param {number|number[]|geo.geoSize|geo.geoSize[]} ratio Either a single
* aspect ratio, a single size, or a list of allowed aspect ratios and sizes.
* For instance, 1 will require that the selection square, 2 would require
Expand Down
3 changes: 2 additions & 1 deletion src/tileLayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ function modulo(a, b) {
/**
* Pick a subdomain from a list of subdomains based on a the tile location.
*
* @private
* @param {number} x The x tile coordinate.
* @param {number} y The y tile coordinate.
* @param {number} z The tile layer.
Expand All @@ -121,9 +122,9 @@ function m_getTileSubdomain(x, y, z, subdomains) {
* all equivalent. The comma-separated list can have subdomains that are of
* any length; the string and range both use one-character subdomains.
*
* @private
* @param {string} base The tile format string
* @returns {function} A conversion function.
* @private.
*/
function m_tileUrlFromTemplate(base) {
var xPattern = /\$?\{[xX]\}/g,
Expand Down
1 change: 1 addition & 0 deletions src/util/color.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ var m_memoizeConvertColor = {maxCount: 1000, count: 0, memo: {}};
* be returned quickly. If the memoization table gets over a certain size,
* just reset it.
*
* @private
* @param {geo.geoColor} origColor The original color specification.
* @param {geo.geoColorObject} resultColor The result of the conversion.
* @returns {geo.geoColorObject} The `resultColor`.
Expand Down
8 changes: 8 additions & 0 deletions src/util/polyops.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ const AlternateOpNames = {
*
* @param {object[]} seglist A PolyBool segment list.
* @returns {geo.polygonList|undefined} A polygon list.
* @private
*/
function seglistToPolygonList(seglist) {
// This single line doesn't arrange holes correctly
Expand Down Expand Up @@ -157,6 +158,7 @@ function seglistToPolygonList(seglist) {
* around 0.11 mm in ground distance.
* @param {object} seglist A seglist array as used by the polybool library.
* @returns {object} A seglist array.
* @private
*/
function polygonOperationSeglist(op, epsilon, seglist) {
op = 'select' + op.charAt(0).toUpperCase() + op.slice(1);
Expand Down Expand Up @@ -223,6 +225,7 @@ function polygonOperationSeglist(op, epsilon, seglist) {
* @param {geo.util.polyop.spec} [opts] Options for the operation. Only used
* if poly is an object with a toPolygonList method.
* @returns {geo.polygonList} A list of polygons.
* @memberof geo.util.polyops
*/
function toPolygonList(poly, mode, opts) {
mode = mode || {};
Expand Down Expand Up @@ -292,6 +295,7 @@ function toPolygonList(poly, mode, opts) {
* @param {geo.util.polyop.spec} [opts] Options for the operation. Only used
* if ``mode.style`` is an object with a fromPolygonList method.
* @returns {geo.polygonAny} A polygon in one of several formats.
* @memberof geo.util.polyops
*/
function fromPolygonList(poly, mode, opts) {
if (mode.style.fromPolygonList) {
Expand All @@ -316,6 +320,7 @@ function fromPolygonList(poly, mode, opts) {
/**
* Use a minimum style for output to include all of the results.
*
* @private
* @param {geo.polygonList} polylist A list of polygons.
* @param {string} style the proposed style.
* @returns {string} The preferred style.
Expand Down Expand Up @@ -346,6 +351,7 @@ function minimumPolygonStyle(polylist, style) {
* Generate the correspondence between the source polygons and the output
* polygons. A polygon corresponds if it has at least two points in common.
*
* @private
* @param {geo.polygonList} poly1 First set of source polygons.
* @param {geo.polygonList} poly2 Second set of source polygons.
* @param {geo.polygonList} newpoly Output polygons.
Expand Down Expand Up @@ -408,6 +414,7 @@ function generateCorrespondence(poly1, poly2, newpoly, results) {
/**
* Perform a general operation of a set of polygons.
*
* @private
* @param {string} op The operation to handle. One of union, intersect,
* difference, or xor.
* @param {geo.polygonAny|geo.util.polyop.spec} poly1 Either the first polygon
Expand Down Expand Up @@ -483,6 +490,7 @@ function generalOperationProcess(op, poly1, poly2, opts) {
/**
* Generate a polygon function for a specific operation.
*
* @private
* @param {string} op The operation to handle. One of union, intersect,
* difference, or xor.
* @returns {function} a function for the polygons.
Expand Down
5 changes: 5 additions & 0 deletions src/webgl/layer.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ var webgl_layer = function () {
* @param {number} [opacity] If specified, set the opacity. Otherwise,
* return the opacity.
* @returns {number|this} The current opacity or the current layer.
* @memberof geo.webgl.layer
*/
this.opacity = function (opacity) {
var result = s_opacity.apply(m_this, arguments);
Expand All @@ -36,6 +37,7 @@ var webgl_layer = function () {
* get it.
* @returns {boolean|this} either the visibility (if getting) or the layer
* (if setting).
* @memberof geo.webgl.layer
*/
this.visible = function (val) {
if (val === undefined) {
Expand All @@ -60,6 +62,7 @@ var webgl_layer = function () {
* truthy, allow other layers to have the same z-index. Otherwise,
* ensure that other layers have distinct z-indices from this one.
* @returns {number|this}
* @memberof geo.webgl.layer
*/
this.zIndex = function (zIndex, allowDuplicate) {
var result = s_zIndex.apply(m_this, arguments);
Expand All @@ -84,6 +87,7 @@ var webgl_layer = function () {
* @param {geo.webgl.webglRenderer} newRenderer The renderer to move to.
* @param {boolean} [rerender=false] If truthy, rerender after the switch.
* @returns {this}
* @memberof geo.webgl.layer
*/
this.switchRenderer = function (newRenderer, rerender) {
if (newRenderer instanceof webglRenderer && newRenderer !== m_this.renderer()) {
Expand Down Expand Up @@ -122,6 +126,7 @@ var webgl_layer = function () {
* Initialize after the layer is added to the map.
*
* @returns {this}
* @memberof geo.webgl.layer
*/
this._init = function () {

Expand Down
1 change: 1 addition & 0 deletions src/webgl/pointUtil.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ var pointFeature = require('../pointFeature');
* @param {this} m_this The point-like feature.
* @param {object} [arg] Feature definition object that might specify the
* primitive shape.
* @memberof geo.webgl
*/
function pointUtil(m_this, arg) {
arg = arg || {};
Expand Down
8 changes: 8 additions & 0 deletions src/webgl/tileLayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ var webgl_tileLayer = function () {
* Add a tile to the list of quads.
*
* @param {geo.tile} tile The tile to add and draw.
* @memberof geo.webgl.tileLayer
*/
this._drawTile = function (tile) {
if (!m_quadFeature) {
Expand Down Expand Up @@ -108,6 +109,7 @@ var webgl_tileLayer = function () {
* @param {boolean} [val] If specified, change the visibility, otherwise
* return it.
* @returns {boolean|this} The current visibility or the layer.
* @memberof geo.webgl.tileLayer
*/
this.visible = function (val) {
if (val === undefined) {
Expand All @@ -132,6 +134,7 @@ var webgl_tileLayer = function () {
* truthy, allow other layers to have the same z-index. Otherwise,
* ensure that other layers have distinct z-indices from this one.
* @returns {number|this}
* @memberof geo.webgl.tileLayer
*/
this.zIndex = function (zIndex, allowDuplicate) {
if (zIndex !== undefined) {
Expand All @@ -146,6 +149,7 @@ var webgl_tileLayer = function () {
*
* @param {geo.event} [evt] If specified, the layer add or remove event that
* triggered this. If `undefined`, clear the quads but don't redraw.
* @memberof geo.webgl.tileLayer
*/
this._clearQuads = function (evt) {
if (evt && (!evt.layer || !(evt.layer instanceof tileLayer) || !evt.layer.autoshareRenderer() || (
Expand All @@ -168,6 +172,7 @@ var webgl_tileLayer = function () {
*
* @param {object} request A value to pass to the parent class.
* @returns {this}
* @memberof geo.webgl.tileLayer
*/
this._update = function (request) {
s_update.call(m_this, request);
Expand All @@ -180,6 +185,7 @@ var webgl_tileLayer = function () {

/**
* Cleanup. This purges the texture and tile cache.
* @memberof geo.webgl.tileLayer
*/
this._cleanup = function () {
var tile;
Expand All @@ -197,6 +203,7 @@ var webgl_tileLayer = function () {

/**
* Destroy.
* @memberof geo.webgl.tileLayer
*/
this._exit = function () {
var map = m_this.map();
Expand All @@ -211,6 +218,7 @@ var webgl_tileLayer = function () {

/**
* Initialize after the layer is added to the map.
* @memberof geo.webgl.tileLayer
*/
this._init = function () {
s_init.apply(m_this, arguments);
Expand Down

0 comments on commit c4cbcec

Please sign in to comment.