[JSDoc] Add annotations
Bulk-add JSDoc annotations, WTD-1482.
This commit is contained in:
@@ -38,6 +38,7 @@ define(
|
||||
* in certain ranges; specifically, to keep x/y positions
|
||||
* non-negative in a fixed position view.
|
||||
*
|
||||
* @memberof platform/features/layout
|
||||
* @constructor
|
||||
* @param {Object} object the object to get/set values upon
|
||||
* @param {string} key the property to get/set
|
||||
@@ -56,4 +57,4 @@ define(
|
||||
|
||||
return AccessorMutator;
|
||||
}
|
||||
);
|
||||
);
|
||||
|
||||
@@ -34,6 +34,7 @@ define(
|
||||
* Note that arguments here are meant to match those expected
|
||||
* by `Array.prototype.map`
|
||||
*
|
||||
* @memberof platform/features/layout
|
||||
* @constructor
|
||||
* @param element the fixed position element, as stored in its
|
||||
* configuration
|
||||
@@ -50,6 +51,7 @@ define(
|
||||
* @memberof BoxProxy
|
||||
* @param {string} fill the new fill color
|
||||
* @returns {string} the fill color
|
||||
* @memberof platform/features/layout.BoxProxy#
|
||||
*/
|
||||
proxy.fill = new AccessorMutator(element, 'fill');
|
||||
|
||||
@@ -58,4 +60,4 @@ define(
|
||||
|
||||
return BoxProxy;
|
||||
}
|
||||
);
|
||||
);
|
||||
|
||||
@@ -85,6 +85,7 @@ define(
|
||||
* The ElementFactory creates new instances of elements for the
|
||||
* fixed position view, prompting for user input where necessary.
|
||||
* @param {DialogService} dialogService service to request user input
|
||||
* @memberof platform/features/layout
|
||||
* @constructor
|
||||
*/
|
||||
function ElementFactory(dialogService) {
|
||||
@@ -94,6 +95,7 @@ define(
|
||||
* @param {string} type the type of element to create
|
||||
* @returns {Promise|object} the created element, or a promise
|
||||
* for that element
|
||||
* @memberof platform/features/layout.ElementFactory#
|
||||
*/
|
||||
createElement: function (type) {
|
||||
var initialState = INITIAL_STATES[type] || {};
|
||||
@@ -112,4 +114,4 @@ define(
|
||||
|
||||
return ElementFactory;
|
||||
}
|
||||
);
|
||||
);
|
||||
|
||||
@@ -34,4 +34,4 @@ define(
|
||||
"fixed.text": TextProxy
|
||||
};
|
||||
}
|
||||
);
|
||||
);
|
||||
|
||||
@@ -48,6 +48,7 @@ define(
|
||||
* Note that arguments here are meant to match those expected
|
||||
* by `Array.prototype.map`
|
||||
*
|
||||
* @memberof platform/features/layout
|
||||
* @constructor
|
||||
* @param element the fixed position element, as stored in its
|
||||
* configuration
|
||||
@@ -60,6 +61,7 @@ define(
|
||||
return {
|
||||
/**
|
||||
* The element as stored in the view configuration.
|
||||
* @memberof platform/features/layout.ElementProxy#
|
||||
*/
|
||||
element: element,
|
||||
/**
|
||||
@@ -67,6 +69,7 @@ define(
|
||||
* Units are in fixed position grid space.
|
||||
* @param {number} [x] the new x position (if setting)
|
||||
* @returns {number} the x position
|
||||
* @memberof platform/features/layout.ElementProxy#
|
||||
*/
|
||||
x: new AccessorMutator(element, 'x', clamp),
|
||||
/**
|
||||
@@ -74,12 +77,14 @@ define(
|
||||
* Units are in fixed position grid space.
|
||||
* @param {number} [y] the new y position (if setting)
|
||||
* @returns {number} the y position
|
||||
* @memberof platform/features/layout.ElementProxy#
|
||||
*/
|
||||
y: new AccessorMutator(element, 'y', clamp),
|
||||
/**
|
||||
* Get and/or set the stroke color of this element.
|
||||
* @param {string} [stroke] the new stroke color (if setting)
|
||||
* @returns {string} the stroke color
|
||||
* @memberof platform/features/layout.ElementProxy#
|
||||
*/
|
||||
stroke: new AccessorMutator(element, 'stroke'),
|
||||
/**
|
||||
@@ -87,6 +92,7 @@ define(
|
||||
* Units are in fixed position grid space.
|
||||
* @param {number} [w] the new width (if setting)
|
||||
* @returns {number} the width
|
||||
* @memberof platform/features/layout.ElementProxy#
|
||||
*/
|
||||
width: new AccessorMutator(element, 'width'),
|
||||
/**
|
||||
@@ -94,12 +100,14 @@ define(
|
||||
* Units are in fixed position grid space.
|
||||
* @param {number} [h] the new height (if setting)
|
||||
* @returns {number} the height
|
||||
* @memberof platform/features/layout.ElementProxy#
|
||||
*/
|
||||
height: new AccessorMutator(element, 'height'),
|
||||
/**
|
||||
* Change the display order of this element.
|
||||
* @param {string} o where to move this element;
|
||||
* one of "top", "up", "down", or "bottom"
|
||||
* @memberof platform/features/layout.ElementProxy#
|
||||
*/
|
||||
order: function (o) {
|
||||
var delta = ORDERS[o] || 0,
|
||||
@@ -120,6 +128,7 @@ define(
|
||||
},
|
||||
/**
|
||||
* Remove this element from the fixed position view.
|
||||
* @memberof platform/features/layout.ElementProxy#
|
||||
*/
|
||||
remove: function () {
|
||||
if (elements[index] === element) {
|
||||
@@ -129,6 +138,7 @@ define(
|
||||
/**
|
||||
* Get handles to control specific features of this element,
|
||||
* e.g. corner size.
|
||||
* @memberof platform/features/layout.ElementProxy#
|
||||
*/
|
||||
handles: function () {
|
||||
return handles;
|
||||
@@ -138,4 +148,4 @@ define(
|
||||
|
||||
return ElementProxy;
|
||||
}
|
||||
);
|
||||
);
|
||||
|
||||
@@ -32,6 +32,7 @@ define(
|
||||
* Note that arguments here are meant to match those expected
|
||||
* by `Array.prototype.map`
|
||||
*
|
||||
* @memberof platform/features/layout
|
||||
* @constructor
|
||||
* @param element the fixed position element, as stored in its
|
||||
* configuration
|
||||
@@ -45,6 +46,7 @@ define(
|
||||
* Get and/or set the displayed text of this element.
|
||||
* @param {string} [text] the new text (if setting)
|
||||
* @returns {string} the text
|
||||
* @memberof platform/features/layout.ImageProxy#
|
||||
*/
|
||||
proxy.url = new AccessorMutator(element, 'url');
|
||||
|
||||
@@ -53,4 +55,4 @@ define(
|
||||
|
||||
return ImageProxy;
|
||||
}
|
||||
);
|
||||
);
|
||||
|
||||
@@ -30,6 +30,7 @@ define(
|
||||
* This is used to support drag handles for line elements
|
||||
* in a fixed position view. Field names for opposite ends
|
||||
* are provided to avoid zero-length lines.
|
||||
* @memberof platform/features/layout
|
||||
* @constructor
|
||||
* @param element the line element
|
||||
* @param {string} xProperty field which stores x position
|
||||
@@ -43,6 +44,7 @@ define(
|
||||
* Get/set the x position of the lower-right corner
|
||||
* of the handle-controlled element, changing size
|
||||
* as necessary.
|
||||
* @memberof platform/features/layout.LineHandle#
|
||||
*/
|
||||
x: function (value) {
|
||||
if (arguments.length > 0) {
|
||||
@@ -60,6 +62,7 @@ define(
|
||||
* Get/set the y position of the lower-right corner
|
||||
* of the handle-controlled element, changing size
|
||||
* as necessary.
|
||||
* @memberof platform/features/layout.LineHandle#
|
||||
*/
|
||||
y: function (value) {
|
||||
if (arguments.length > 0) {
|
||||
@@ -79,4 +82,4 @@ define(
|
||||
return LineHandle;
|
||||
|
||||
}
|
||||
);
|
||||
);
|
||||
|
||||
@@ -29,6 +29,7 @@ define(
|
||||
/**
|
||||
* Selection/diplay proxy for line elements of a fixed position
|
||||
* view.
|
||||
* @memberof platform/features/layout
|
||||
* @constructor
|
||||
* @param element the fixed position element, as stored in its
|
||||
* configuration
|
||||
@@ -46,6 +47,7 @@ define(
|
||||
* Get the top-left x coordinate, in grid space, of
|
||||
* this line's bounding box.
|
||||
* @returns {number} the x coordinate
|
||||
* @memberof platform/features/layout.LineProxy#
|
||||
*/
|
||||
proxy.x = function (v) {
|
||||
var x = Math.min(element.x, element.x2),
|
||||
@@ -61,6 +63,7 @@ define(
|
||||
* Get the top-left y coordinate, in grid space, of
|
||||
* this line's bounding box.
|
||||
* @returns {number} the y coordinate
|
||||
* @memberof platform/features/layout.LineProxy#
|
||||
*/
|
||||
proxy.y = function (v) {
|
||||
var y = Math.min(element.y, element.y2),
|
||||
@@ -76,6 +79,7 @@ define(
|
||||
* Get the width, in grid space, of
|
||||
* this line's bounding box.
|
||||
* @returns {number} the width
|
||||
* @memberof platform/features/layout.LineProxy#
|
||||
*/
|
||||
proxy.width = function () {
|
||||
return Math.max(Math.abs(element.x - element.x2), 1);
|
||||
@@ -85,6 +89,7 @@ define(
|
||||
* Get the height, in grid space, of
|
||||
* this line's bounding box.
|
||||
* @returns {number} the height
|
||||
* @memberof platform/features/layout.LineProxy#
|
||||
*/
|
||||
proxy.height = function () {
|
||||
return Math.max(Math.abs(element.y - element.y2), 1);
|
||||
@@ -95,6 +100,7 @@ define(
|
||||
* the top-left corner, of the first point in this line
|
||||
* segment.
|
||||
* @returns {number} the x position of the first point
|
||||
* @memberof platform/features/layout.LineProxy#
|
||||
*/
|
||||
proxy.x1 = function () {
|
||||
return element.x - proxy.x();
|
||||
@@ -105,6 +111,7 @@ define(
|
||||
* the top-left corner, of the first point in this line
|
||||
* segment.
|
||||
* @returns {number} the y position of the first point
|
||||
* @memberof platform/features/layout.LineProxy#
|
||||
*/
|
||||
proxy.y1 = function () {
|
||||
return element.y - proxy.y();
|
||||
@@ -115,6 +122,7 @@ define(
|
||||
* the top-left corner, of the second point in this line
|
||||
* segment.
|
||||
* @returns {number} the x position of the second point
|
||||
* @memberof platform/features/layout.LineProxy#
|
||||
*/
|
||||
proxy.x2 = function () {
|
||||
return element.x2 - proxy.x();
|
||||
@@ -125,6 +133,7 @@ define(
|
||||
* the top-left corner, of the second point in this line
|
||||
* segment.
|
||||
* @returns {number} the y position of the second point
|
||||
* @memberof platform/features/layout.LineProxy#
|
||||
*/
|
||||
proxy.y2 = function () {
|
||||
return element.y2 - proxy.y();
|
||||
@@ -134,6 +143,7 @@ define(
|
||||
* Get element handles for changing the position of end
|
||||
* points of this line.
|
||||
* @returns {LineHandle[]} line handles for both end points
|
||||
* @memberof platform/features/layout.LineProxy#
|
||||
*/
|
||||
proxy.handles = function () {
|
||||
return handles;
|
||||
@@ -144,4 +154,4 @@ define(
|
||||
|
||||
return LineProxy;
|
||||
}
|
||||
);
|
||||
);
|
||||
|
||||
@@ -29,6 +29,7 @@ define(
|
||||
* Handle for changing width/height properties of an element.
|
||||
* This is used to support drag handles for different
|
||||
* element types in a fixed position view.
|
||||
* @memberof platform/features/layout
|
||||
* @constructor
|
||||
*/
|
||||
function ResizeHandle(element, minWidth, minHeight) {
|
||||
@@ -41,6 +42,7 @@ define(
|
||||
* Get/set the x position of the lower-right corner
|
||||
* of the handle-controlled element, changing size
|
||||
* as necessary.
|
||||
* @memberof platform/features/layout.ResizeHandle#
|
||||
*/
|
||||
x: function (value) {
|
||||
if (arguments.length > 0) {
|
||||
@@ -55,6 +57,7 @@ define(
|
||||
* Get/set the y position of the lower-right corner
|
||||
* of the handle-controlled element, changing size
|
||||
* as necessary.
|
||||
* @memberof platform/features/layout.ResizeHandle#
|
||||
*/
|
||||
y: function (value) {
|
||||
if (arguments.length > 0) {
|
||||
@@ -71,4 +74,4 @@ define(
|
||||
return ResizeHandle;
|
||||
|
||||
}
|
||||
);
|
||||
);
|
||||
|
||||
@@ -35,6 +35,7 @@ define(
|
||||
* Note that arguments here are meant to match those expected
|
||||
* by `Array.prototype.map`
|
||||
*
|
||||
* @memberof platform/features/layout
|
||||
* @constructor
|
||||
* @param element the fixed position element, as stored in its
|
||||
* configuration
|
||||
@@ -70,4 +71,4 @@ define(
|
||||
|
||||
return TelemetryProxy;
|
||||
}
|
||||
);
|
||||
);
|
||||
|
||||
@@ -32,6 +32,7 @@ define(
|
||||
* Note that arguments here are meant to match those expected
|
||||
* by `Array.prototype.map`
|
||||
*
|
||||
* @memberof platform/features/layout
|
||||
* @constructor
|
||||
* @param element the fixed position element, as stored in its
|
||||
* configuration
|
||||
@@ -45,6 +46,7 @@ define(
|
||||
* Get and/or set the text color of this element.
|
||||
* @param {string} [color] the new text color (if setting)
|
||||
* @returns {string} the text color
|
||||
* @memberof platform/features/layout.TextProxy#
|
||||
*/
|
||||
proxy.color = new AccessorMutator(element, 'color');
|
||||
|
||||
@@ -52,6 +54,7 @@ define(
|
||||
* Get and/or set the displayed text of this element.
|
||||
* @param {string} [text] the new text (if setting)
|
||||
* @returns {string} the text
|
||||
* @memberof platform/features/layout.TextProxy#
|
||||
*/
|
||||
proxy.text = new AccessorMutator(element, 'text');
|
||||
|
||||
@@ -60,4 +63,4 @@ define(
|
||||
|
||||
return TextProxy;
|
||||
}
|
||||
);
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user