mirror of
https://github.com/nasa/openmct.git
synced 2025-02-22 18:12:57 +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`)
|
* time (typically wrapping `Date.now`)
|
||||||
* @param {ActionContext} context the context for this action
|
* @param {ActionContext} context the context for this action
|
||||||
*/
|
*/
|
||||||
function AbstractStartTimerAction(now, context) {
|
function AbstractTimerAction(now, context) {
|
||||||
this.domainObject = context.domainObject;
|
this.domainObject = context.domainObject;
|
||||||
this.now = now;
|
this.now = now;
|
||||||
}
|
}
|
||||||
|
|
||||||
AbstractStartTimerAction.prototype.perform = function () {
|
AbstractTimerAction.prototype.perform = function () {
|
||||||
var domainObject = this.domainObject,
|
var domainObject = this.domainObject,
|
||||||
now = this.now;
|
now = this.now;
|
||||||
|
|
||||||
@ -56,6 +56,6 @@ define(
|
|||||||
return domainObject.useCapability('mutation', setTimestamp);
|
return domainObject.useCapability('mutation', setTimestamp);
|
||||||
};
|
};
|
||||||
|
|
||||||
return AbstractStartTimerAction;
|
return AbstractTimerAction;
|
||||||
}
|
}
|
||||||
);
|
);
|
@ -21,8 +21,8 @@
|
|||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
define(
|
define(
|
||||||
['./AbstractStartTimerAction'],
|
['./AbstractTimerAction'],
|
||||||
function (AbstractStartTimerAction) {
|
function (AbstractTimerAction) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Implements the "Restart at 0" action.
|
* Implements the "Restart at 0" action.
|
||||||
@ -39,11 +39,11 @@ define(
|
|||||||
* @param {ActionContext} context the context for this action
|
* @param {ActionContext} context the context for this action
|
||||||
*/
|
*/
|
||||||
function RestartTimerAction(now, context) {
|
function RestartTimerAction(now, context) {
|
||||||
AbstractStartTimerAction.apply(this, [now, context]);
|
AbstractTimerAction.apply(this, [now, context]);
|
||||||
}
|
}
|
||||||
|
|
||||||
RestartTimerAction.prototype =
|
RestartTimerAction.prototype =
|
||||||
Object.create(AbstractStartTimerAction.prototype);
|
Object.create(AbstractTimerAction.prototype);
|
||||||
|
|
||||||
RestartTimerAction.appliesTo = function (context) {
|
RestartTimerAction.appliesTo = function (context) {
|
||||||
var model =
|
var model =
|
||||||
|
@ -21,8 +21,8 @@
|
|||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
define(
|
define(
|
||||||
['./AbstractStartTimerAction'],
|
['./AbstractTimerAction'],
|
||||||
function (AbstractStartTimerAction) {
|
function (AbstractTimerAction) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Implements the "Start" action for timers.
|
* Implements the "Start" action for timers.
|
||||||
@ -39,11 +39,11 @@ define(
|
|||||||
* @param {ActionContext} context the context for this action
|
* @param {ActionContext} context the context for this action
|
||||||
*/
|
*/
|
||||||
function StartTimerAction(now, context) {
|
function StartTimerAction(now, context) {
|
||||||
AbstractStartTimerAction.apply(this, [now, context]);
|
AbstractTimerAction.apply(this, [now, context]);
|
||||||
}
|
}
|
||||||
|
|
||||||
StartTimerAction.prototype =
|
StartTimerAction.prototype =
|
||||||
Object.create(AbstractStartTimerAction.prototype);
|
Object.create(AbstractTimerAction.prototype);
|
||||||
|
|
||||||
StartTimerAction.appliesTo = function (context) {
|
StartTimerAction.appliesTo = function (context) {
|
||||||
var model =
|
var model =
|
||||||
|
@ -21,8 +21,8 @@
|
|||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
define(
|
define(
|
||||||
["../../src/actions/AbstractStartTimerAction"],
|
["../../src/actions/AbstractTimerAction"],
|
||||||
function (AbstractStartTimerAction) {
|
function (AbstractTimerAction) {
|
||||||
|
|
||||||
describe("A timer's start/restart action", function () {
|
describe("A timer's start/restart action", function () {
|
||||||
var mockNow,
|
var mockNow,
|
||||||
@ -54,7 +54,7 @@ define(
|
|||||||
|
|
||||||
testModel = {};
|
testModel = {};
|
||||||
|
|
||||||
action = new AbstractStartTimerAction(mockNow, {
|
action = new AbstractTimerAction(mockNow, {
|
||||||
domainObject: mockDomainObject
|
domainObject: mockDomainObject
|
||||||
});
|
});
|
||||||
});
|
});
|
Loading…
x
Reference in New Issue
Block a user