[TCv2] different defaults by mode

This commit is contained in:
Pete Richards 2016-08-03 18:06:39 -07:00
parent f4e1879a2d
commit 9a72c96ea4
4 changed files with 22 additions and 2 deletions

View File

@ -70,6 +70,14 @@ 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: FIFTEEN_MINUTES, end: 0},
bounds: {start: now - FIFTEEN_MINUTES, end: now}
}

View File

@ -53,7 +53,9 @@ define(
TimeConductorMode.prototype.selectedTimeSystem.apply(this, arguments);
if (timeSystem) {
var defaults = timeSystem.defaults()[0];
var defaults = timeSystem.defaults().filter(function (d) {
return d.mode === 'fixed';
})[0];
var bounds = {
start: defaults.bounds.start,

View File

@ -87,7 +87,9 @@ define(
this.tickSourceUnlisten();
}
var defaults = timeSystem.defaults()[0];
var defaults = timeSystem.defaults().filter(function (d) {
return d.mode === 'follow';
})[0];
if (arguments.length > 0) {
var bounds = {

View File

@ -70,6 +70,14 @@ define([
{
key: 'utc-default',
name: 'UTC time system defaults',
mode: 'follow',
deltas: {start: FIFTEEN_MINUTES, end: 0},
bounds: {start: now - FIFTEEN_MINUTES, end: now}
},
{
key: 'utc-default',
name: 'UTC time system defaults',
mode: 'fixed',
deltas: {start: FIFTEEN_MINUTES, end: 0},
bounds: {start: now - FIFTEEN_MINUTES, end: now}
}