[Imagery] Add JSDoc

Add JSDoc to classes implementing the Imagery view, WTD-1170.
This commit is contained in:
Victor Woeltjen 2015-06-17 20:31:47 -07:00
parent 12954f8fc3
commit 2690a8b8e2
3 changed files with 40 additions and 4 deletions

View File

@ -5,8 +5,9 @@
{
"name": "Imagery",
"key": "imagery",
"glyph": "I",
"glyph": "\u00E3",
"templateUrl": "templates/imagery.html",
"priority": "preferred",
"needs": [ "telemetry" ]
}
],
@ -20,7 +21,7 @@
{
"key": "ImageryController",
"implementation": "controllers/ImageryController.js",
"depends": [ "$scope", "telemetryHandler", "telemetryFormatter" ]
"depends": [ "$scope", "telemetryHandler" ]
}
],
"directives": [

View File

@ -27,9 +27,13 @@ define(
"use strict";
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 = "",
time = "",
imageUrl = "",
@ -75,18 +79,44 @@ define(
$scope.$on("$destroy", releaseSubscription);
return {
/**
* Get the time portion (hours, minutes, seconds) of the
* timestamp associated with the incoming image telemetry.
* @returns {string} the time
*/
getTime: function () {
return time;
},
/**
* Get the date portion (month, year) of the
* timestamp associated with the incoming image telemetry.
* @returns {string} the date
*/
getDate: function () {
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 () {
return "UTC";
},
/**
* Get the URL of the image telemetry to display.
* @returns {string} URL for telemetry image
*/
getImageUrl: function () {
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) {
if (arguments.length > 0 && state !== paused) {
paused = state;

View File

@ -25,6 +25,11 @@ define(
function () {
"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 hasImageTelemetry(domainObject) {
var telemetry = domainObject &&