From 82ee08963822147cae86ddc6d17556143e7bfb71 Mon Sep 17 00:00:00 2001 From: John Firebaugh Date: Wed, 10 Jun 2015 17:42:12 -0400 Subject: [PATCH] Document nested arrays in a documentationjs-compatible way Refs https://github.com/documentationjs/documentation/issues/97 --- js/symbol/check_max_angle.js | 2 +- js/symbol/clip_line.js | 4 ++-- js/symbol/collision_feature.js | 4 ++-- js/symbol/quads.js | 14 +++++++------- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/js/symbol/check_max_angle.js b/js/symbol/check_max_angle.js index 050c2c52a3b..17bf5e45c57 100644 --- a/js/symbol/check_max_angle.js +++ b/js/symbol/check_max_angle.js @@ -6,7 +6,7 @@ module.exports = checkMaxAngle; * Labels placed around really sharp angles aren't readable. Check if any * part of the potential label has a combined angle that is too big. * - * @param {Point[]} line + * @param {Array} line * @param {Anchor} anchor The point on the line around which the label is anchored. * @param {number} labelLength The length of the label in geometry units. * @param {number} windowSize The check fails if the combined angles within a part of the line that is `windowSize` long is too big. diff --git a/js/symbol/clip_line.js b/js/symbol/clip_line.js index 7050518704e..13c446239cd 100644 --- a/js/symbol/clip_line.js +++ b/js/symbol/clip_line.js @@ -7,12 +7,12 @@ module.exports = clipLine; /** * Returns the part of a multiline that intersects with the provided rectangular box. * - * @param {Point[][]} lines + * @param {Array>} lines * @param {number} x1 the left edge of the box * @param {number} y1 the top edge of the box * @param {number} x2 the right edge of the box * @param {number} y2 the bottom edge of the box - * @returns {Point[][]} lines + * @returns {Array>} lines * @private */ function clipLine(lines, x1, y1, x2, y2) { diff --git a/js/symbol/collision_feature.js b/js/symbol/collision_feature.js index ab96a442384..dcf2e10c871 100644 --- a/js/symbol/collision_feature.js +++ b/js/symbol/collision_feature.js @@ -12,7 +12,7 @@ module.exports = CollisionFeature; * objects. * * @class CollisionFeature - * @param {Point[]} line The geometry the label is placed on. + * @param {Array} line The geometry the label is placed on. * @param {Anchor} anchor The point along the line around which the label is anchored. * @param {Object} shaped The text or icon shaping results. * @param {number} boxScale A magic number used to convert from glyph metrics units to geometry units. @@ -50,7 +50,7 @@ function CollisionFeature(line, anchor, shaped, boxScale, padding, alignLine) { /** * Create a set of CollisionBox objects for a line. * - * @param {Point[]} line + * @param {Array} line * @param {Anchor} anchor * @param {number} labelLength The length of the label in geometry units. * @param {number} boxSize The size of the collision boxes that will be created. diff --git a/js/symbol/quads.js b/js/symbol/quads.js index 4f0d75e1cf2..956b74c5b1e 100644 --- a/js/symbol/quads.js +++ b/js/symbol/quads.js @@ -45,10 +45,10 @@ function SymbolQuad(anchorPoint, tl, tr, bl, br, tex, angle, minScale, maxScale) * @param {Anchor} anchor * @param {PositionedIcon} shapedIcon * @param {number} boxScale A magic number for converting glyph metric units to geometry units. - * @param {Point[][]} line + * @param {Array>} line * @param {LayoutProperties} layout * @param {boolean} alongLine Whether the icon should be placed along the line. - * @returns {SymbolQuad[]} + * @returns {Array} * @private */ function getIconQuads(anchor, shapedIcon, boxScale, line, layout, alongLine) { @@ -91,10 +91,10 @@ function getIconQuads(anchor, shapedIcon, boxScale, line, layout, alongLine) { * @param {Anchor} anchor * @param {Shaping} shaping * @param {number} boxScale A magic number for converting from glyph metric units to geometry units. - * @param {Point[][]} line + * @param {Array>} line * @param {LayoutProperties} layout * @param {boolean} alongLine Whether the label should be placed along the line. - * @returns {SymbolQuad[]} + * @returns {Array} * @private */ function getGlyphQuads(anchor, shaping, boxScale, line, layout, alongLine) { @@ -181,14 +181,14 @@ function getGlyphQuads(anchor, shaping, boxScale, line, layout, alongLine) { * This creates all the instances of a glyph that are necessary to render a label. * * We need a - * @param {Object[]} glyphInstances An empty array that glyphInstances are added to. + * @param {Array} glyphInstances An empty array that glyphInstances are added to. * @param {Anchor} anchor * @param {number} offset The glyph's offset from the center of the label. - * @param {Point[]} line + * @param {Array} line * @param {number} segment The index of the segment of the line on which the anchor exists. * @param {boolean} forward If true get the glyphs that come later on the line, otherwise get the glyphs that come earlier. * - * @returns {Object[]} glyphInstances + * @returns {Array} glyphInstances * @private */ function getSegmentGlyphs(glyphs, anchor, offset, line, segment, forward) {