[Clocks/Timers] Update code style for actions

https://github.com/nasa/openmctweb/issues/209
This commit is contained in:
Victor Woeltjen
2015-12-09 12:17:32 -08:00
parent 89a93e2966
commit e30a82432d
3 changed files with 45 additions and 13 deletions

View File

@@ -31,12 +31,25 @@ define(
*
* Behaves the same as (and delegates functionality to)
* the "Start" action.
* @implements Action
*
* @extends {platform/features/clock.AbstractTimerAction}
* @implements {Action}
* @memberof platform/features/clock
* @constructor
* @param {Function} now a function which returns the current
* time (typically wrapping `Date.now`)
* @param {ActionContext} context the context for this action
*/
function RestartTimerAction(now, context) {
return new AbstractStartTimerAction(now, context);
AbstractStartTimerAction.prototype.apply(
this,
[ now, context ]
);
}
RestartTimerAction.prototype =
Object.create(AbstractStartTimerAction.prototype);
RestartTimerAction.appliesTo = function (context) {
var model =
(context.domainObject && context.domainObject.getModel())