Moves the set Mode and set Time system calls after the set bounds because the side effect of setClockOffsets and setBounds overrides the defaults.

This commit is contained in:
Peter Di Pasquale 2024-12-15 15:03:36 -08:00
parent 5cc3cd4310
commit 7f991401bb

View File

@ -140,9 +140,6 @@ export default function (config) {
}
}
openmct.time.setMode(defaultMode, defaultClock ? clockOffsets : defaultBounds);
openmct.time.setTimeSystem(defaults.timeSystem, defaultBounds);
//We are going to set the clockOffsets in fixed time mode since the conductor components down the line need these
if (clockOffsets && defaultMode === FIXED_MODE_KEY) {
openmct.time.setClockOffsets(clockOffsets);
@ -151,6 +148,8 @@ export default function (config) {
if (defaultBounds && defaultMode === REALTIME_MODE_KEY) {
openmct.time.setBounds(clockOffsets);
}
openmct.time.setMode(defaultMode, defaultClock ? clockOffsets : defaultBounds);
openmct.time.setTimeSystem(defaults.timeSystem, defaultBounds);
openmct.on('start', function () {
mountComponent(openmct, config);