mirror of
https://github.com/nasa/openmct.git
synced 2025-04-09 04:14:32 +00:00
Do not respond to bounds tick changes (#3106)
Co-authored-by: Deep Tailor <deep.j.tailor@nasa.gov>
This commit is contained in:
parent
0399766ccd
commit
31ac67b393
@ -24,7 +24,7 @@ import {
|
||||
setAllSearchParams
|
||||
} from 'utils/openmctLocation';
|
||||
|
||||
const TIME_EVENTS = ['bounds', 'timeSystem', 'clock', 'clockOffsets'];
|
||||
const TIME_EVENTS = ['timeSystem', 'clock', 'clockOffsets'];
|
||||
const SEARCH_MODE = 'tc.mode';
|
||||
const SEARCH_TIME_SYSTEM = 'tc.timeSystem';
|
||||
const SEARCH_START_BOUND = 'tc.startBound';
|
||||
@ -42,6 +42,7 @@ export default class URLTimeSettingsSynchronizer {
|
||||
this.destroy = this.destroy.bind(this);
|
||||
this.updateTimeSettings = this.updateTimeSettings.bind(this);
|
||||
this.setUrlFromTimeApi = this.setUrlFromTimeApi.bind(this);
|
||||
this.updateBounds = this.updateBounds.bind(this);
|
||||
|
||||
openmct.on('start', this.initialize);
|
||||
openmct.on('destroy', this.destroy);
|
||||
@ -54,7 +55,7 @@ export default class URLTimeSettingsSynchronizer {
|
||||
TIME_EVENTS.forEach(event => {
|
||||
this.openmct.time.on(event, this.setUrlFromTimeApi);
|
||||
});
|
||||
|
||||
this.openmct.time.on('bounds', this.updateBounds);
|
||||
}
|
||||
|
||||
destroy() {
|
||||
@ -65,6 +66,7 @@ export default class URLTimeSettingsSynchronizer {
|
||||
TIME_EVENTS.forEach(event => {
|
||||
this.openmct.time.off(event, this.setUrlFromTimeApi);
|
||||
});
|
||||
this.openmct.time.on('bounds', this.updateBounds);
|
||||
}
|
||||
|
||||
updateTimeSettings() {
|
||||
@ -72,7 +74,6 @@ export default class URLTimeSettingsSynchronizer {
|
||||
if (!this.isUrlUpdateInProgress) {
|
||||
let timeParameters = this.parseParametersFromUrl();
|
||||
|
||||
|
||||
if (this.areTimeParametersValid(timeParameters)) {
|
||||
this.setTimeApiFromUrl(timeParameters);
|
||||
} else {
|
||||
@ -138,6 +139,12 @@ export default class URLTimeSettingsSynchronizer {
|
||||
}
|
||||
}
|
||||
|
||||
updateBounds(bounds, isTick) {
|
||||
if (!isTick) {
|
||||
this.setUrlFromTimeApi();
|
||||
}
|
||||
}
|
||||
|
||||
setUrlFromTimeApi() {
|
||||
let searchParams = getAllSearchParams();
|
||||
let clock = this.openmct.time.clock();
|
||||
|
Loading…
x
Reference in New Issue
Block a user