[JSDoc] Add annotations

Bulk-add JSDoc annotations, WTD-1482.
This commit is contained in:
Victor Woeltjen
2015-08-07 11:44:54 -07:00
parent 14f97eae9c
commit c08a460d30
239 changed files with 939 additions and 185 deletions

View File

@ -31,6 +31,7 @@ define(
* for the domain or range axis, sufficient to populate
* selectors.
*
* @memberof platform/features/plot
* @constructor
* @param {string} axisType the field in metadatas to
* look at for axis options; usually one of
@ -70,12 +71,14 @@ define(
* an array of objects, where each object contains a
* "key" field and a "name" field (for machine- and
* human-readable names respectively)
* @memberof platform/features/plot.PlotAxis#
*/
options: options,
/**
* The currently chosen option for this axis. An
* initial value is provided; this will be updated
* directly form the plot template.
* @memberof platform/features/plot.PlotAxis#
*/
active: options[0] || defaultValue
};
@ -84,4 +87,4 @@ define(
return PlotAxis;
}
);
);

View File

@ -34,6 +34,7 @@ define(
INITIAL_SIZE = 675; // 1/128 of MAX_POINTS
/**
* @memberof platform/features/plot
* @constructor
* @param {TelemetryHandle} handle the handle to telemetry access
* @param {string} range the key to use when looking up range values
@ -66,4 +67,4 @@ define(
return PlotLimitTracker;
}
);
);

View File

@ -70,6 +70,8 @@ define(
* Add a point to this plot line.
* @param {number} domainValue the domain value
* @param {number} rangeValue the range value
* @constructor
* @memberof platform/features/plot
*/
addPoint: function (domainValue, rangeValue) {
var index;
@ -112,4 +114,4 @@ define(
return PlotLine;
}
);
);

View File

@ -31,6 +31,7 @@ define(
* @param {number} domainOffset number to subtract from domain values
* @param {number} initialSize initial buffer size
* @param {number} maxSize maximum buffer size
* @memberof platform/features/plot
* @constructor
*/
function PlotLineBuffer(domainOffset, initialSize, maxSize) {
@ -104,6 +105,7 @@ define(
/**
* Get the WebGL-displayable buffer of points to plot.
* @returns {Float32Array} displayable buffer for this line
* @memberof platform/features/plot.PlotLineBuffer#
*/
getBuffer: function () {
return buffer;
@ -111,6 +113,7 @@ define(
/**
* Get the number of points stored in this buffer.
* @returns {number} the number of points stored
* @memberof platform/features/plot.PlotLineBuffer#
*/
getLength: function () {
return length;
@ -120,6 +123,7 @@ define(
* buffer. Unlike range extrema, these will change as the
* buffer gets trimmed.
* @returns {number[]} min, max domain values
* @memberof platform/features/plot.PlotLineBuffer#
*/
getDomainExtrema: function () {
// Since these are ordered in the buffer, assume
@ -134,6 +138,7 @@ define(
* buffer. Note that these values may have been trimmed out at
* some point.
* @returns {number[]} min, max range values
* @memberof platform/features/plot.PlotLineBuffer#
*/
getRangeExtrema: function () {
return rangeExtrema;
@ -146,6 +151,7 @@ define(
* @param {number} count number of values to remove
* @param {boolean} [fromEnd] true if the most recent
* values should be removed
* @memberof platform/features/plot.PlotLineBuffer#
*/
trim: function (count, fromEnd) {
// If we're removing values from the start...
@ -170,6 +176,7 @@ define(
* series
* @returns {boolean} true if insertion succeeded; otherwise
* false
* @memberof platform/features/plot.PlotLineBuffer#
*/
insert: function (series, index) {
var sz = series.getPointCount(),
@ -211,6 +218,7 @@ define(
},
/**
* Append a single data point.
* @memberof platform/features/plot.PlotLineBuffer#
*/
insertPoint: function (domainValue, rangeValue, index) {
// Don't allow
@ -241,6 +249,7 @@ define(
* occurs, this will return -1.
* @param {number} timestamp timestamp to insert
* @returns {number} the index for insertion (or -1)
* @memberof platform/features/plot.PlotLineBuffer#
*/
findInsertionIndex: function (timestamp) {
var value = timestamp - domainOffset;
@ -259,3 +268,4 @@ define(
return PlotLineBuffer;
}
);

View File

@ -78,6 +78,7 @@ define(
* by index, in various color formats. All PlotPalette methods are
* static, so there is no need for a constructor call; using
* this will simply return PlotPalette itself.
* @memberof platform/features/plot
* @constructor
*/
function PlotPalette() {
@ -131,4 +132,4 @@ define(
return PlotPalette;
}
);
);

View File

@ -37,6 +37,7 @@ define(
* along the domain axis, and the second element describes the same
* along the range axis.
*
* @memberof platform/features/plot
* @constructor
* @param {number[]} origin the plot's origin, initially
* @param {number[]} dimensions the plot's dimensions, initially
@ -91,6 +92,7 @@ define(
* panning or zooming relative to the base value has
* been applied.
* @returns {number} the depth of the stack
* @memberof platform/features/plot.PlotPanZoomStack#
*/
getDepth: getDepth,
@ -99,6 +101,7 @@ define(
* become the active pan-zoom state.
* @param {number[]} origin the new origin
* @param {number[]} dimensions the new dimensions
* @memberof platform/features/plot.PlotPanZoomStack#
*/
pushPanZoom: pushPanZoom,
@ -109,6 +112,7 @@ define(
* stack, this acts as a no-op (that is, the lowest
* pan-zoom state on the stack cannot be popped, to ensure
* that some pan-zoom state is always available.)
* @memberof platform/features/plot.PlotPanZoomStack#
*/
popPanZoom: popPanZoom,
@ -119,6 +123,7 @@ define(
* interfering with the user's chosen zoom level.
* @param {number[]} origin the base origin
* @param {number[]} dimensions the base dimensions
* @memberof platform/features/plot.PlotPanZoomStack#
*/
setBasePanZoom: setBasePanZoom,
@ -126,6 +131,7 @@ define(
* Clear the pan-zoom stack down to its bottom element;
* in effect, pop all elements but the last, e.g. to remove
* any temporary user modifications to pan-zoom state.
* @memberof platform/features/plot.PlotPanZoomStack#
*/
clearPanZoom: clearPanZoom,
@ -134,6 +140,7 @@ define(
* of the stack), expressed as an object with "origin" and
* "dimensions" fields.
* @returns {object} the current pan-zoom state
* @memberof platform/features/plot.PlotPanZoomStack#
*/
getPanZoom: getPanZoom,
@ -141,6 +148,7 @@ define(
* Get the current origin, as represented on the top of the
* stack.
* @returns {number[]} the current plot origin
* @memberof platform/features/plot.PlotPanZoomStack#
*/
getOrigin: getOrigin,
@ -148,6 +156,7 @@ define(
* Get the current dimensions, as represented on the top of
* the stack.
* @returns {number[]} the current plot dimensions
* @memberof platform/features/plot.PlotPanZoomStack#
*/
getDimensions: getDimensions
};
@ -155,4 +164,4 @@ define(
return PlotPanZoomStack;
}
);
);

View File

@ -32,6 +32,7 @@ define(
* remain independent upon the range axis. This supports panning
* and zooming in stacked-plot mode (and, importantly,
* stepping back through those states.)
* @memberof platform/features/plot
* @constructor
* @param {number} count the number of stacks to include in this
* group
@ -112,6 +113,7 @@ define(
* stack, this acts as a no-op (that is, the lowest
* pan-zoom state on the stack cannot be popped, to ensure
* that some pan-zoom state is always available.)
* @memberof platform/features/plot.PlotPanZoomStackGroup#
*/
popPanZoom: popPanZoom,
@ -123,6 +125,7 @@ define(
* interfering with the user's chosen pan/zoom states.
* @param {number[]} origin the base origin
* @param {number[]} dimensions the base dimensions
* @memberof platform/features/plot.PlotPanZoomStackGroup#
*/
setBasePanZoom: setBasePanZoom,
@ -131,6 +134,7 @@ define(
* their bottom element; in effect, pop all elements
* but the last, e.g. to remove any temporary user
* modifications to pan-zoom state.
* @memberof platform/features/plot.PlotPanZoomStackGroup#
*/
clearPanZoom: clearPanZoom,
/**
@ -140,6 +144,7 @@ define(
* panning or zooming relative to the base value has
* been applied.
* @returns {number} the depth of the stacks in this group
* @memberof platform/features/plot.PlotPanZoomStackGroup#
*/
getDepth: function () {
// All stacks are kept in sync, so look up depth
@ -160,6 +165,7 @@ define(
* @param {number} index the index of the stack to get
* @returns {PlotPanZoomStack} the pan-zoom stack in the
* group identified by that index
* @memberof platform/features/plot.PlotPanZoomStackGroup#
*/
getPanZoomStack: function (index) {
return decoratedStacks[index];
@ -170,4 +176,4 @@ define(
return PlotPanZoomStackGroup;
}
);
);

View File

@ -36,6 +36,7 @@ define(
* PlotPosition was instantiated. Care should be taken when retaining
* PlotPosition objects across changes to the pan-zoom stack.
*
* @memberof platform/features/plot
* @constructor
* @param {number} x the horizontal pixel position in the plot area
* @param {number} y the vertical pixel position in the plot area
@ -68,6 +69,7 @@ define(
/**
* Get the domain value corresponding to this pixel position.
* @returns {number} the domain value
* @memberof platform/features/plot.PlotPosition#
*/
getDomain: function () {
return position[0];
@ -75,6 +77,7 @@ define(
/**
* Get the range value corresponding to this pixel position.
* @returns {number} the range value
* @memberof platform/features/plot.PlotPosition#
*/
getRange: function () {
return position[1];
@ -84,6 +87,7 @@ define(
* pixel position.
* @returns {number[]} an array containing the domain and
* the range value, in that order
* @memberof platform/features/plot.PlotPosition#
*/
getPosition: function () {
return position;
@ -94,4 +98,4 @@ define(
return PlotPosition;
}
);
);

View File

@ -36,6 +36,7 @@ define(
* preparing them to be rendered. It creates a WebGL-plottable
* Float32Array for each trace, and tracks the boundaries of the
* data sets (since this is convenient to do during the same pass).
* @memberof platform/features/plot
* @constructor
* @param {Telemetry[]} datas telemetry data objects
* @param {string} domain the key to use when looking up domain values
@ -92,6 +93,7 @@ define(
* data sets. This is given as a two-element array where the
* first element is domain, and second is range.
* @returns {number[]} the dimensions which bound this data set
* @memberof platform/features/plot.PlotPreparer#
*/
getDimensions: function () {
return [max[0] - min[0], max[1] - min[1]];
@ -102,6 +104,7 @@ define(
* first element is domain, and second is range.
* The domain value here is not adjusted by the domain offset.
* @returns {number[]} the origin of this data set's boundary
* @memberof platform/features/plot.PlotPreparer#
*/
getOrigin: function () {
return min;
@ -112,6 +115,7 @@ define(
* preparer, in order to minimize loss-of-precision due to
* conversion to the 32-bit float format needed by WebGL.
* @returns {number} the domain offset
* @memberof platform/features/plot.PlotPreparer#
*/
getDomainOffset: function () {
return domainOffset;
@ -132,6 +136,7 @@ define(
* cause aliasing artifacts (particularly for timestamps)
*
* @returns {Float32Array[]} the buffers for these traces
* @memberof platform/features/plot.PlotPreparer#
*/
getBuffers: function () {
return buffers;
@ -142,4 +147,4 @@ define(
return PlotPreparer;
}
);
);

View File

@ -28,6 +28,8 @@ define(
/**
* Provides a window on a telemetry data series, to support
* insertion into a plot line.
* @constructor
* @memberof platform/features/plot
*/
function PlotSeriesWindow(series, domain, range, start, end) {
return {
@ -65,4 +67,4 @@ define(
return PlotSeriesWindow;
}
);
);

View File

@ -31,6 +31,7 @@ define(
* domain and range axes of the plot, to support the plot
* template.
*
* @memberof platform/features/plot
* @constructor
* @param {PlotPanZoomStack} panZoomStack the pan-zoom stack for
* this plot, used to determine plot boundaries
@ -62,6 +63,7 @@ define(
* Generate tick marks for the domain axis.
* @param {number} count the number of ticks
* @returns {string[]} labels for those ticks
* @memberof platform/features/plot.PlotTickGenerator#
*/
generateDomainTicks: function (count) {
var panZoom = panZoomStack.getPanZoom();
@ -77,6 +79,7 @@ define(
* Generate tick marks for the range axis.
* @param {number} count the number of ticks
* @returns {string[]} labels for those ticks
* @memberof platform/features/plot.PlotTickGenerator#
*/
generateRangeTicks: function (count) {
var panZoom = panZoomStack.getPanZoom();
@ -93,4 +96,4 @@ define(
return PlotTickGenerator;
}
);
);

View File

@ -39,6 +39,7 @@ define(
* preparing them to be rendered. It creates a WebGL-plottable
* Float32Array for each trace, and tracks the boundaries of the
* data sets (since this is convenient to do during the same pass).
* @memberof platform/features/plot
* @constructor
* @param {TelemetryHandle} handle the handle to telemetry access
* @param {string} domain the key to use when looking up domain values
@ -277,6 +278,7 @@ define(
* data sets. This is given as a two-element array where the
* first element is domain, and second is range.
* @returns {number[]} the dimensions which bound this data set
* @memberof platform/features/plot.PlotUpdater#
*/
getDimensions: function () {
return dimensions;
@ -287,6 +289,7 @@ define(
* first element is domain, and second is range.
* The domain value here is not adjusted by the domain offset.
* @returns {number[]} the origin of this data set's boundary
* @memberof platform/features/plot.PlotUpdater#
*/
getOrigin: function () {
// Pad range if necessary
@ -298,6 +301,7 @@ define(
* preparer, in order to minimize loss-of-precision due to
* conversion to the 32-bit float format needed by WebGL.
* @returns {number} the domain offset
* @memberof platform/features/plot.PlotUpdater#
*/
getDomainOffset: function () {
return domainOffset;
@ -318,16 +322,19 @@ define(
* cause aliasing artifacts (particularly for timestamps)
*
* @returns {Float32Array[]} the buffers for these traces
* @memberof platform/features/plot.PlotUpdater#
*/
getLineBuffers: function () {
return bufferArray;
},
/**
* Update with latest data.
* @memberof platform/features/plot.PlotUpdater#
*/
update: update,
/**
* Fill in historical data.
* @memberof platform/features/plot.PlotUpdater#
*/
addHistorical: setHistorical
};
@ -337,3 +344,4 @@ define(
}
);