mirror of
https://github.com/nasa/openmct.git
synced 2025-02-20 17:33:23 +00:00
[Clocks/Timers] renaming of Abstract class
renaming AbstractStartTimerAction to AbstractTime
This commit is contained in:
parent
d94e8b10d8
commit
7fc66e2de8
@ -40,12 +40,12 @@ define(
|
||||
* time (typically wrapping `Date.now`)
|
||||
* @param {ActionContext} context the context for this action
|
||||
*/
|
||||
function AbstractStartTimerAction(now, context) {
|
||||
function AbstractTimerAction(now, context) {
|
||||
this.domainObject = context.domainObject;
|
||||
this.now = now;
|
||||
}
|
||||
|
||||
AbstractStartTimerAction.prototype.perform = function () {
|
||||
AbstractTimerAction.prototype.perform = function () {
|
||||
var domainObject = this.domainObject,
|
||||
now = this.now;
|
||||
|
||||
@ -56,6 +56,6 @@ define(
|
||||
return domainObject.useCapability('mutation', setTimestamp);
|
||||
};
|
||||
|
||||
return AbstractStartTimerAction;
|
||||
return AbstractTimerAction;
|
||||
}
|
||||
);
|
@ -21,8 +21,8 @@
|
||||
*****************************************************************************/
|
||||
|
||||
define(
|
||||
['./AbstractStartTimerAction'],
|
||||
function (AbstractStartTimerAction) {
|
||||
['./AbstractTimerAction'],
|
||||
function (AbstractTimerAction) {
|
||||
|
||||
/**
|
||||
* Implements the "Restart at 0" action.
|
||||
@ -39,11 +39,11 @@ define(
|
||||
* @param {ActionContext} context the context for this action
|
||||
*/
|
||||
function RestartTimerAction(now, context) {
|
||||
AbstractStartTimerAction.apply(this, [now, context]);
|
||||
AbstractTimerAction.apply(this, [now, context]);
|
||||
}
|
||||
|
||||
RestartTimerAction.prototype =
|
||||
Object.create(AbstractStartTimerAction.prototype);
|
||||
Object.create(AbstractTimerAction.prototype);
|
||||
|
||||
RestartTimerAction.appliesTo = function (context) {
|
||||
var model =
|
||||
|
@ -21,8 +21,8 @@
|
||||
*****************************************************************************/
|
||||
|
||||
define(
|
||||
['./AbstractStartTimerAction'],
|
||||
function (AbstractStartTimerAction) {
|
||||
['./AbstractTimerAction'],
|
||||
function (AbstractTimerAction) {
|
||||
|
||||
/**
|
||||
* Implements the "Start" action for timers.
|
||||
@ -39,11 +39,11 @@ define(
|
||||
* @param {ActionContext} context the context for this action
|
||||
*/
|
||||
function StartTimerAction(now, context) {
|
||||
AbstractStartTimerAction.apply(this, [now, context]);
|
||||
AbstractTimerAction.apply(this, [now, context]);
|
||||
}
|
||||
|
||||
StartTimerAction.prototype =
|
||||
Object.create(AbstractStartTimerAction.prototype);
|
||||
Object.create(AbstractTimerAction.prototype);
|
||||
|
||||
StartTimerAction.appliesTo = function (context) {
|
||||
var model =
|
||||
|
@ -21,8 +21,8 @@
|
||||
*****************************************************************************/
|
||||
|
||||
define(
|
||||
["../../src/actions/AbstractStartTimerAction"],
|
||||
function (AbstractStartTimerAction) {
|
||||
["../../src/actions/AbstractTimerAction"],
|
||||
function (AbstractTimerAction) {
|
||||
|
||||
describe("A timer's start/restart action", function () {
|
||||
var mockNow,
|
||||
@ -54,7 +54,7 @@ define(
|
||||
|
||||
testModel = {};
|
||||
|
||||
action = new AbstractStartTimerAction(mockNow, {
|
||||
action = new AbstractTimerAction(mockNow, {
|
||||
domainObject: mockDomainObject
|
||||
});
|
||||
});
|
Loading…
x
Reference in New Issue
Block a user