mirror of
https://github.com/nasa/openmct.git
synced 2025-06-19 23:53:49 +00:00
[Scrolling] Add JSDoc, clean up
Clean up scripts for Scrolling List view and add some JSDoc. WTD-534.
This commit is contained in:
@ -9,19 +9,31 @@ define(
|
||||
"use strict";
|
||||
|
||||
/**
|
||||
* A column which will report telemetry range values
|
||||
* (typically, measurements.) Used by the ScrollingListController.
|
||||
*
|
||||
* @constructor
|
||||
* @param rangeMetadata an object with the machine- and human-
|
||||
* readable names for this range (in `key` and `name`
|
||||
* fields, respectively.)
|
||||
*/
|
||||
function RangeColumn(rangeMetadata) {
|
||||
return {
|
||||
/**
|
||||
* Get the title to display in this column's header.
|
||||
* @returns {string} the title to display
|
||||
*/
|
||||
getTitle: function () {
|
||||
return rangeMetadata.name;
|
||||
},
|
||||
/**
|
||||
* Get the text to display inside a row under this
|
||||
* column.
|
||||
* @returns {string} the text to display
|
||||
*/
|
||||
getValue: function (domainObject, data, index) {
|
||||
return data.getRangeValue(
|
||||
index,
|
||||
rangeMetadata.key
|
||||
);
|
||||
var value = data.getRangeValue(index, rangeMetadata.key);
|
||||
return value && value.toFixed(3);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user