[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

@ -29,6 +29,7 @@ define(
/**
* Create a new chart which uses Canvas's 2D API for rendering.
*
* @memberof platform/features/plot
* @constructor
* @param {CanvasElement} canvas the canvas object to render upon
* @throws {Error} an error is thrown if Canvas's 2D API is unavailable.
@ -66,6 +67,7 @@ define(
return {
/**
* Clear the chart.
* @memberof platform/features/plot.Canvas2DChart#
*/
clear: function () {
width = canvas.width;
@ -78,6 +80,7 @@ define(
* vertical dimensions of the chart
* @param {number[]} origin the horizontal/vertical
* origin of the chart
* @memberof platform/features/plot.Canvas2DChart#
*/
setDimensions: function (newDimensions, newOrigin) {
dimensions = newDimensions;
@ -92,6 +95,7 @@ define(
* the line, as an RGBA color where each element
* is in the range of 0.0-1.0
* @param {number} points the number of points to draw
* @memberof platform/features/plot.Canvas2DChart#
*/
drawLine: function (buf, color, points) {
var i;
@ -123,6 +127,7 @@ define(
* @param {number[]} color the color to use when drawing
* the rectangle, as an RGBA color where each element
* is in the range of 0.0-1.0
* @memberof platform/features/plot.Canvas2DChart#
*/
drawSquare: function (min, max, color) {
var x1 = x(min[0]),
@ -138,4 +143,4 @@ define(
return Canvas2DChart;
}
);
);

View File

@ -49,6 +49,7 @@ define(
/**
* Create a new chart which uses WebGL for rendering.
*
* @memberof platform/features/plot
* @constructor
* @param {CanvasElement} canvas the canvas object to render upon
* @throws {Error} an error is thrown if WebGL is unavailable.
@ -115,6 +116,7 @@ define(
return {
/**
* Clear the chart.
* @memberof platform/features/plot.GLChart#
*/
clear: function () {
// Set the viewport size; note that we use the width/height
@ -134,6 +136,7 @@ define(
* vertical dimensions of the chart
* @param {number[]} origin the horizontal/vertical
* origin of the chart
* @memberof platform/features/plot.GLChart#
*/
setDimensions: function (dimensions, origin) {
if (dimensions && dimensions.length > 0 &&
@ -151,6 +154,7 @@ define(
* the line, as an RGBA color where each element
* is in the range of 0.0-1.0
* @param {number} points the number of points to draw
* @memberof platform/features/plot.GLChart#
*/
drawLine: function (buf, color, points) {
doDraw(gl.LINE_STRIP, buf, color, points);
@ -163,6 +167,7 @@ define(
* @param {number[]} color the color to use when drawing
* the rectangle, as an RGBA color where each element
* is in the range of 0.0-1.0
* @memberof platform/features/plot.GLChart#
*/
drawSquare: function (min, max, color) {
doDraw(gl.TRIANGLE_FAN, new Float32Array(
@ -173,4 +178,4 @@ define(
}
return GLChart;
}
);
);

View File

@ -61,6 +61,7 @@ define(
* * `color`: The color of the box, as a four-element RGBA
* array, where each element is in the range of 0.0-1.0
*
* @memberof platform/features/plot
* @constructor
*/
function MCTChart($interval, $log) {
@ -208,3 +209,4 @@ define(
return MCTChart;
}
);

View File

@ -50,6 +50,7 @@ define(
* * Handling user interactions.
* * Deciding what needs to be drawn in the chart area.
*
* @memberof platform/features/plot
* @constructor
*/
function PlotController(
@ -190,6 +191,7 @@ define(
* for plotting the trace at the specified index.
* @param {number} index the index of the trace
* @returns {string} the color, in #RRGGBB form
* @memberof platform/features/plot.PlotController#
*/
getColor: function (index) {
return PlotPalette.getStringColor(index);
@ -199,6 +201,7 @@ define(
* of its default state (to determine whether back/unzoom
* controls should be shown)
* @returns {boolean} true if not in default state
* @memberof platform/features/plot.PlotController#
*/
isZoomed: function () {
return modeOptions.getModeHandler().isZoomed();
@ -206,12 +209,14 @@ define(
/**
* Undo the most recent pan/zoom change and restore
* the prior state.
* @memberof platform/features/plot.PlotController#
*/
stepBackPanZoom: function () {
return modeOptions.getModeHandler().stepBackPanZoom();
},
/**
* Undo all pan/zoom changes and restore the initial state.
* @memberof platform/features/plot.PlotController#
*/
unzoom: function () {
return modeOptions.getModeHandler().unzoom();
@ -219,6 +224,7 @@ define(
/**
* Get the mode options (Stacked/Overlaid) that are applicable
* for this plot.
* @memberof platform/features/plot.PlotController#
*/
getModeOptions: function () {
return modeOptions.getModeOptions();
@ -226,6 +232,7 @@ define(
/**
* Get the current mode that is applicable to this plot. This
* will include key, name, and glyph fields.
* @memberof platform/features/plot.PlotController#
*/
getMode: function () {
return modeOptions.getMode();
@ -234,6 +241,7 @@ define(
* Set the mode which should be active in this plot.
* @param mode one of the mode options returned from
* getModeOptions()
* @memberof platform/features/plot.PlotController#
*/
setMode: function (mode) {
modeOptions.setMode(mode);
@ -243,6 +251,7 @@ define(
* Get all individual plots contained within this Plot view.
* (Multiple may be contained when in Stacked mode).
* @returns {SubPlot[]} all subplots in this Plot view
* @memberof platform/features/plot.PlotController#
*/
getSubPlots: function () {
return modeOptions.getModeHandler().getSubPlots();
@ -251,6 +260,7 @@ define(
* Get the CSS class to apply to the legend for this domain
* object; this will reflect limit state.
* @returns {string} the CSS class
* @memberof platform/features/plot.PlotController#
*/
getLegendClass: function (telemetryObject) {
return limitTracker &&
@ -258,10 +268,12 @@ define(
},
/**
* Explicitly update all plots.
* @memberof platform/features/plot.PlotController#
*/
update: update,
/**
* Check if a request is pending (to show the wait spinner)
* @memberof platform/features/plot.PlotController#
*/
isRequestPending: function () {
// Placeholder; this should reflect request state
@ -274,3 +286,4 @@ define(
return PlotController;
}
);

View File

@ -36,6 +36,7 @@ define(
* A SubPlot is an individual plot within a Plot View (which
* may contain multiple plots, specifically when in Stacked
* plot mode.)
* @memberof platform/features/plot
* @constructor
* @param {DomainObject[]} telemetryObjects the domain objects
* which will be plotted in this sub-plot
@ -214,6 +215,7 @@ define(
* represented in this sub-plot.
* @returns {DomainObject[]} the domain objects which
* will have data plotted in this sub-plot
* @memberof platform/features/plot.SubPlot#
*/
getTelemetryObjects: function () {
return telemetryObjects;
@ -223,6 +225,7 @@ define(
* template for this sub-plot's domain axis, as prepared
* by the PlotTickGenerator.
* @returns {Array} tick marks for the domain axis
* @memberof platform/features/plot.SubPlot#
*/
getDomainTicks: function () {
return domainTicks;
@ -232,6 +235,7 @@ define(
* template for this sub-plot's range axis, as prepared
* by the PlotTickGenerator.
* @returns {Array} tick marks for the range axis
* @memberof platform/features/plot.SubPlot#
*/
getRangeTicks: function () {
return rangeTicks;
@ -243,6 +247,7 @@ define(
* attribute, and should have the same internal format
* expected by that directive.
* @return {object} the drawing object
* @memberof platform/features/plot.SubPlot#
*/
getDrawingObject: function () {
return draw;
@ -252,6 +257,7 @@ define(
* current mouse position.
* @returns {string[]} the displayable domain and range
* coordinates over which the mouse is hovered
* @memberof platform/features/plot.SubPlot#
*/
getHoverCoordinates: function () {
return hoverCoordinates;
@ -259,6 +265,7 @@ define(
/**
* Handle mouse movement over the chart area.
* @param $event the mouse event
* @memberof platform/features/plot.SubPlot#
*/
hover: function ($event) {
isHovering = true;
@ -277,6 +284,7 @@ define(
/**
* Continue a previously-start pan or zoom gesture.
* @param $event the mouse event
* @memberof platform/features/plot.SubPlot#
*/
continueDrag: function ($event) {
mousePosition = toMousePosition($event);
@ -292,6 +300,7 @@ define(
/**
* Initiate a marquee zoom action.
* @param $event the mouse event
* @memberof platform/features/plot.SubPlot#
*/
startDrag: function ($event) {
subPlotBounds = $event.target.getBoundingClientRect();
@ -318,6 +327,7 @@ define(
/**
* Complete a marquee zoom action.
* @param $event the mouse event
* @memberof platform/features/plot.SubPlot#
*/
endDrag: function ($event) {
mousePosition = toMousePosition($event);
@ -338,6 +348,7 @@ define(
/**
* Update the drawing bounds, marquee box, and
* tick marks for this subplot.
* @memberof platform/features/plot.SubPlot#
*/
update: function () {
updateDrawingBounds();
@ -355,6 +366,7 @@ define(
* the value of this to position that marquee box
* correctly.
* @param {number} value the domain offset
* @memberof platform/features/plot.SubPlot#
*/
setDomainOffset: function (value) {
domainOffset = value;
@ -365,6 +377,7 @@ define(
* an argument, set that state.
* @param {boolean} [state] the new hovering state
* @returns {boolean} the hovering state
* @memberof platform/features/plot.SubPlot#
*/
isHovering: function (state) {
if (state !== undefined) {
@ -379,3 +392,4 @@ define(
}
);

View File

@ -31,6 +31,7 @@ define(
* in a reference to the telemetryFormatter, which will be
* used to represent telemetry values (timestamps or data
* values) as human-readable strings.
* @memberof platform/features/plot
* @constructor
*/
function SubPlotFactory(telemetryFormatter) {
@ -44,6 +45,7 @@ define(
* @returns {SubPlot} the instantiated sub-plot
* @method
* @memberof SubPlotFactory
* @memberof platform/features/plot.SubPlotFactory#
*/
createSubPlot: function (telemetryObjects, panZoomStack) {
return new SubPlot(
@ -58,4 +60,4 @@ define(
return SubPlotFactory;
}
);
);

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(
}
);

View File

@ -44,6 +44,7 @@ define(
* are applicable in a given plot view, maintains current
* selection state thereof, and provides handlers for the
* different behaviors associated with these modes.
* @memberof platform/features/plot
* @constructor
* @param {DomainObject[]} the telemetry objects being
* represented in this plot view
@ -61,6 +62,7 @@ define(
* and view-level interactions with pan-zoom state.
* @returns {PlotOverlayMode|PlotStackMode} a handler
* for the current mode
* @memberof platform/features/plot.PlotModeOptions#
*/
getModeHandler: function () {
// Lazily initialize
@ -77,6 +79,7 @@ define(
* mode contains a `name` and `glyph` field suitable
* for display in a template.
* @return {Array} the available modes
* @memberof platform/features/plot.PlotModeOptions#
*/
getModeOptions: function () {
return options;
@ -86,6 +89,7 @@ define(
* This will be one of the elements returned from
* `getModeOptions`.
* @return {object} the current mode
* @memberof platform/features/plot.PlotModeOptions#
*/
getMode: function () {
return mode;
@ -96,6 +100,7 @@ define(
* returned by `getModeOptions`.
* @param {object} option one of the plot mode options
* from `getModeOptions`
* @memberof platform/features/plot.PlotModeOptions#
*/
setMode: function (option) {
if (mode !== option) {
@ -110,4 +115,4 @@ define(
return PlotModeOptions;
}
);
);

View File

@ -29,6 +29,7 @@ define(
/**
* Handles plotting in Overlaid mode. In overlaid mode, there
* is one sub-plot which contains all plotted objects.
* @memberof platform/features/plot
* @constructor
* @param {DomainObject[]} the domain objects to be plotted
*/
@ -68,12 +69,14 @@ define(
/**
* Plot telemetry to the sub-plot(s) managed by this mode.
* @param {PlotPreparer} prepared the prepared data to plot
* @memberof platform/features/plot.PlotOverlayMode#
*/
plotTelemetry: plotTelemetry,
/**
* Get all sub-plots to be displayed in this mode; used
* to populate the plot template.
* @return {SubPlot[]} all sub-plots to display in this mode
* @memberof platform/features/plot.PlotOverlayMode#
*/
getSubPlots: function () {
return subplots;
@ -83,6 +86,7 @@ define(
* there are some temporary user modifications to the
* current pan-zoom state.)
* @returns {boolean} true if not in the base pan-zoom state
* @memberof platform/features/plot.PlotOverlayMode#
*/
isZoomed: function () {
return panZoomStack.getDepth() > 1;
@ -90,6 +94,7 @@ define(
/**
* Undo the most recent pan/zoom change and restore
* the prior state.
* @memberof platform/features/plot.PlotOverlayMode#
*/
stepBackPanZoom: function () {
panZoomStack.popPanZoom();
@ -104,4 +109,4 @@ define(
return PlotOverlayMode;
}
);
);

View File

@ -29,6 +29,7 @@ define(
/**
* Handles plotting in Stacked mode. In stacked mode, there
* is one sub-plot for each plotted object.
* @memberof platform/features/plot
* @constructor
* @param {DomainObject[]} the domain objects to be plotted
*/
@ -77,12 +78,14 @@ define(
/**
* Plot telemetry to the sub-plot(s) managed by this mode.
* @param {PlotPreparer} prepared the prepared data to plot
* @memberof platform/features/plot.PlotStackMode#
*/
plotTelemetry: plotTelemetry,
/**
* Get all sub-plots to be displayed in this mode; used
* to populate the plot template.
* @return {SubPlot[]} all sub-plots to display in this mode
* @memberof platform/features/plot.PlotStackMode#
*/
getSubPlots: function () {
return subplots;
@ -92,6 +95,7 @@ define(
* there are some temporary user modifications to the
* current pan-zoom state.)
* @returns {boolean} true if not in the base pan-zoom state
* @memberof platform/features/plot.PlotStackMode#
*/
isZoomed: function () {
return panZoomStackGroup.getDepth() > 1;
@ -99,6 +103,7 @@ define(
/**
* Undo the most recent pan/zoom change and restore
* the prior state.
* @memberof platform/features/plot.PlotStackMode#
*/
stepBackPanZoom: function () {
panZoomStackGroup.popPanZoom();
@ -108,6 +113,7 @@ define(
},
/**
* Undo all pan/zoom changes and restore the initial state.
* @memberof platform/features/plot.PlotStackMode#
*/
unzoom: function () {
panZoomStackGroup.clearPanZoom();
@ -120,4 +126,4 @@ define(
return PlotStackMode;
}
);
);

View File

@ -29,6 +29,8 @@ define(
* Policy preventing the Plot view from being made available for
* domain objects which have non-numeric telemetry.
* @implements {Policy}
* @constructor
* @memberof platform/features/plot
*/
function PlotViewPolicy() {
function hasImageTelemetry(domainObject) {
@ -63,3 +65,4 @@ define(
return PlotViewPolicy;
}
);