[Imagery] Add JSDoc
Add JSDoc to classes implementing the Imagery view, WTD-1170.
This commit is contained in:
@@ -5,8 +5,9 @@
|
|||||||
{
|
{
|
||||||
"name": "Imagery",
|
"name": "Imagery",
|
||||||
"key": "imagery",
|
"key": "imagery",
|
||||||
"glyph": "I",
|
"glyph": "\u00E3",
|
||||||
"templateUrl": "templates/imagery.html",
|
"templateUrl": "templates/imagery.html",
|
||||||
|
"priority": "preferred",
|
||||||
"needs": [ "telemetry" ]
|
"needs": [ "telemetry" ]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@@ -20,7 +21,7 @@
|
|||||||
{
|
{
|
||||||
"key": "ImageryController",
|
"key": "ImageryController",
|
||||||
"implementation": "controllers/ImageryController.js",
|
"implementation": "controllers/ImageryController.js",
|
||||||
"depends": [ "$scope", "telemetryHandler", "telemetryFormatter" ]
|
"depends": [ "$scope", "telemetryHandler" ]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"directives": [
|
"directives": [
|
||||||
|
|||||||
@@ -27,9 +27,13 @@ define(
|
|||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
var DATE_FORMAT = "YYYY-DDD",
|
var DATE_FORMAT = "YYYY-DDD",
|
||||||
TIME_FORMAT = "HH:mm:ss";
|
TIME_FORMAT = "HH:mm:ss.SSS";
|
||||||
|
|
||||||
function ImageryController($scope, telemetryHandler, telemetryFormatter) {
|
/**
|
||||||
|
* Controller for the "Imagery" view of a domain object which
|
||||||
|
* provides image telemetry.
|
||||||
|
*/
|
||||||
|
function ImageryController($scope, telemetryHandler) {
|
||||||
var date = "",
|
var date = "",
|
||||||
time = "",
|
time = "",
|
||||||
imageUrl = "",
|
imageUrl = "",
|
||||||
@@ -75,18 +79,44 @@ define(
|
|||||||
$scope.$on("$destroy", releaseSubscription);
|
$scope.$on("$destroy", releaseSubscription);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
/**
|
||||||
|
* Get the time portion (hours, minutes, seconds) of the
|
||||||
|
* timestamp associated with the incoming image telemetry.
|
||||||
|
* @returns {string} the time
|
||||||
|
*/
|
||||||
getTime: function () {
|
getTime: function () {
|
||||||
return time;
|
return time;
|
||||||
},
|
},
|
||||||
|
/**
|
||||||
|
* Get the date portion (month, year) of the
|
||||||
|
* timestamp associated with the incoming image telemetry.
|
||||||
|
* @returns {string} the date
|
||||||
|
*/
|
||||||
getDate: function () {
|
getDate: function () {
|
||||||
return date;
|
return date;
|
||||||
},
|
},
|
||||||
|
/**
|
||||||
|
* Get the time zone for the displayed time/date corresponding
|
||||||
|
* to the timestamp associated with the incoming image
|
||||||
|
* telemetry.
|
||||||
|
* @returns {string} the time
|
||||||
|
*/
|
||||||
getZone: function () {
|
getZone: function () {
|
||||||
return "UTC";
|
return "UTC";
|
||||||
},
|
},
|
||||||
|
/**
|
||||||
|
* Get the URL of the image telemetry to display.
|
||||||
|
* @returns {string} URL for telemetry image
|
||||||
|
*/
|
||||||
getImageUrl: function () {
|
getImageUrl: function () {
|
||||||
return imageUrl;
|
return imageUrl;
|
||||||
},
|
},
|
||||||
|
/**
|
||||||
|
* Getter-setter for paused state of the view (true means
|
||||||
|
* paused, false means not.)
|
||||||
|
* @param {boolean} [state] the state to set
|
||||||
|
* @returns {boolean} the current state
|
||||||
|
*/
|
||||||
paused: function (state) {
|
paused: function (state) {
|
||||||
if (arguments.length > 0 && state !== paused) {
|
if (arguments.length > 0 && state !== paused) {
|
||||||
paused = state;
|
paused = state;
|
||||||
|
|||||||
@@ -25,6 +25,11 @@ define(
|
|||||||
function () {
|
function () {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Policy preventing the Imagery view from being made available for
|
||||||
|
* domain objects which do not have associated image telemetry.
|
||||||
|
* @implements {Policy}
|
||||||
|
*/
|
||||||
function ImageryViewPolicy() {
|
function ImageryViewPolicy() {
|
||||||
function hasImageTelemetry(domainObject) {
|
function hasImageTelemetry(domainObject) {
|
||||||
var telemetry = domainObject &&
|
var telemetry = domainObject &&
|
||||||
|
|||||||
Reference in New Issue
Block a user