mirror of
https://github.com/nasa/openmct.git
synced 2025-06-17 14:48:13 +00:00
Merged mode-specific defaults, with some refactoring
This commit is contained in:
@ -38,16 +38,6 @@ define(['../../../platform/features/conductor-v2/conductor/src/timeSystems/Local
|
||||
}
|
||||
LADTickSource.prototype = Object.create(LocalClock.prototype);
|
||||
|
||||
LADTickSource.prototype.tick = function () {
|
||||
console.log('data tick');
|
||||
var now = Date.now();
|
||||
this.listeners.forEach(function (listener){
|
||||
listener(now);
|
||||
});
|
||||
this.timeoutHandle = this.$timeout(this.tick.bind(this), this.period);
|
||||
};
|
||||
|
||||
|
||||
LADTickSource.prototype.type = function () {
|
||||
return 'data';
|
||||
};
|
||||
|
@ -26,6 +26,7 @@ define([
|
||||
'./LADTickSource'
|
||||
], function (TimeSystem, LocalClock, LADTickSource) {
|
||||
var FIFTEEN_MINUTES = 15 * 60 * 1000,
|
||||
THIRTY_MINUTES = 30 * 60 * 1000,
|
||||
DEFAULT_PERIOD = 1000;
|
||||
|
||||
/**
|
||||
@ -71,8 +72,16 @@ define([
|
||||
{
|
||||
key: 'local-default',
|
||||
name: 'Local 12 hour time system defaults',
|
||||
mode: 'fixed',
|
||||
deltas: {start: FIFTEEN_MINUTES, end: 0},
|
||||
bounds: {start: now - FIFTEEN_MINUTES, end: now}
|
||||
},
|
||||
{
|
||||
key: 'local-default',
|
||||
name: 'Local 12 hour time system defaults',
|
||||
mode: 'follow',
|
||||
deltas: {start: THIRTY_MINUTES, end: 0},
|
||||
bounds: {start: now - THIRTY_MINUTES, end: now}
|
||||
}
|
||||
];
|
||||
};
|
||||
|
Reference in New Issue
Block a user