mirror of
https://github.com/nasa/openmct.git
synced 2025-05-17 07:53:15 +00:00
Time conductor Improvement 625 (#2432)
* when utc based time systems are switched, the bounds will stay the same * inline check for utcBased time systems
This commit is contained in:
parent
7fe4a77c43
commit
c760190a29
@ -167,6 +167,7 @@ export default {
|
|||||||
this.xAxis.scale(this.xScale);
|
this.xAxis.scale(this.xScale);
|
||||||
this.xAxis.tickFormat(utcMultiTimeFormat);
|
this.xAxis.tickFormat(utcMultiTimeFormat);
|
||||||
this.axisElement.call(this.xAxis);
|
this.axisElement.call(this.xAxis);
|
||||||
|
this.setScale();
|
||||||
},
|
},
|
||||||
getActiveFormatter() {
|
getActiveFormatter() {
|
||||||
let timeSystem = this.openmct.time.timeSystem();
|
let timeSystem = this.openmct.time.timeSystem();
|
||||||
|
@ -60,7 +60,6 @@ export default {
|
|||||||
.filter(menuOption => menuOption.clock === (clock && clock.key))
|
.filter(menuOption => menuOption.clock === (clock && clock.key))
|
||||||
.map(menuOption => JSON.parse(JSON.stringify(this.openmct.time.timeSystems.get(menuOption.timeSystem))));
|
.map(menuOption => JSON.parse(JSON.stringify(this.openmct.time.timeSystems.get(menuOption.timeSystem))));
|
||||||
},
|
},
|
||||||
|
|
||||||
setTimeSystemFromView(timeSystem) {
|
setTimeSystemFromView(timeSystem) {
|
||||||
if (timeSystem.key !== this.selectedTimeSystem.key) {
|
if (timeSystem.key !== this.selectedTimeSystem.key) {
|
||||||
let activeClock = this.openmct.time.clock();
|
let activeClock = this.openmct.time.clock();
|
||||||
@ -69,7 +68,15 @@ export default {
|
|||||||
timeSystem: timeSystem.key
|
timeSystem: timeSystem.key
|
||||||
});
|
});
|
||||||
if (activeClock === undefined) {
|
if (activeClock === undefined) {
|
||||||
this.openmct.time.timeSystem(timeSystem.key, configuration.bounds);
|
let bounds;
|
||||||
|
|
||||||
|
if (this.selectedTimeSystem.isUTCBased && timeSystem.isUTCBased) {
|
||||||
|
bounds = this.openmct.time.bounds();
|
||||||
|
} else {
|
||||||
|
bounds = configuration.bounds;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.openmct.time.timeSystem(timeSystem.key, bounds);
|
||||||
} else {
|
} else {
|
||||||
this.openmct.time.timeSystem(timeSystem.key);
|
this.openmct.time.timeSystem(timeSystem.key);
|
||||||
this.openmct.time.clockOffsets(configuration.clockOffsets);
|
this.openmct.time.clockOffsets(configuration.clockOffsets);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user