Skip to content

Commit 9a72c96

Browse files
author
Pete Richards
committed
[TCv2] different defaults by mode
1 parent f4e1879 commit 9a72c96

File tree

4 files changed

+22
-2
lines changed

4 files changed

+22
-2
lines changed

example/localTimeSystem/src/LocalTimeSystem.js

+8
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,14 @@ define([
7070
{
7171
key: 'local-default',
7272
name: 'Local 12 hour time system defaults',
73+
mode: 'fixed',
74+
deltas: {start: FIFTEEN_MINUTES, end: 0},
75+
bounds: {start: now - FIFTEEN_MINUTES, end: now}
76+
},
77+
{
78+
key: 'local-default',
79+
name: 'Local 12 hour time system defaults',
80+
mode: 'follow',
7381
deltas: {start: FIFTEEN_MINUTES, end: 0},
7482
bounds: {start: now - FIFTEEN_MINUTES, end: now}
7583
}

platform/features/conductor-v2/conductor/src/ui/modes/FixedMode.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,9 @@ define(
5353
TimeConductorMode.prototype.selectedTimeSystem.apply(this, arguments);
5454

5555
if (timeSystem) {
56-
var defaults = timeSystem.defaults()[0];
56+
var defaults = timeSystem.defaults().filter(function (d) {
57+
return d.mode === 'fixed';
58+
})[0];
5759

5860
var bounds = {
5961
start: defaults.bounds.start,

platform/features/conductor-v2/conductor/src/ui/modes/FollowMode.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,9 @@ define(
8787
this.tickSourceUnlisten();
8888
}
8989

90-
var defaults = timeSystem.defaults()[0];
90+
var defaults = timeSystem.defaults().filter(function (d) {
91+
return d.mode === 'follow';
92+
})[0];
9193

9294
if (arguments.length > 0) {
9395
var bounds = {

platform/features/conductor-v2/utcTimeSystem/src/UTCTimeSystem.js

+8
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,14 @@ define([
7070
{
7171
key: 'utc-default',
7272
name: 'UTC time system defaults',
73+
mode: 'follow',
74+
deltas: {start: FIFTEEN_MINUTES, end: 0},
75+
bounds: {start: now - FIFTEEN_MINUTES, end: now}
76+
},
77+
{
78+
key: 'utc-default',
79+
name: 'UTC time system defaults',
80+
mode: 'fixed',
7381
deltas: {start: FIFTEEN_MINUTES, end: 0},
7482
bounds: {start: now - FIFTEEN_MINUTES, end: now}
7583
}

0 commit comments

Comments
 (0)