From b7cb18c494958c559c7390fecfc66650ad4ddf8c Mon Sep 17 00:00:00 2001 From: David Tsay Date: Thu, 14 Nov 2024 10:50:32 -0800 Subject: [PATCH] add priority to time conductor `boundsChanged` event listeners --- src/plugins/timeConductor/ConductorComponent.vue | 6 +++++- src/plugins/timeConductor/ConductorInputsRealtime.vue | 2 +- src/plugins/timeConductor/ConductorPopUp.vue | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/plugins/timeConductor/ConductorComponent.vue b/src/plugins/timeConductor/ConductorComponent.vue index 1f9339c9bf..ef08ae8042 100644 --- a/src/plugins/timeConductor/ConductorComponent.vue +++ b/src/plugins/timeConductor/ConductorComponent.vue @@ -156,7 +156,11 @@ export default { this.setTimeSystem(this.copy(this.openmct.time.getTimeSystem())); - this.openmct.time.on(TIME_CONTEXT_EVENTS.boundsChanged, _.throttle(this.handleNewBounds, 300)); + this.openmct.time.on( + TIME_CONTEXT_EVENTS.boundsChanged, + _.throttle(this.handleNewBounds, 300), + this.openmct.priority.HIGH + ); this.openmct.time.on(TIME_CONTEXT_EVENTS.timeSystemChanged, this.setTimeSystem); this.openmct.time.on(TIME_CONTEXT_EVENTS.modeChanged, this.setMode); }, diff --git a/src/plugins/timeConductor/ConductorInputsRealtime.vue b/src/plugins/timeConductor/ConductorInputsRealtime.vue index ec98b823f5..e7842d9b44 100644 --- a/src/plugins/timeConductor/ConductorInputsRealtime.vue +++ b/src/plugins/timeConductor/ConductorInputsRealtime.vue @@ -173,7 +173,7 @@ export default { this.setViewFromOffsets(offsets); if (this.timeContext) { - this.timeContext.on(TIME_CONTEXT_EVENTS.boundsChanged, this.handleNewBounds); + this.timeContext.on(TIME_CONTEXT_EVENTS.boundsChanged, this.handleNewBounds, this.openmct.priority.HIGH); this.timeContext.on(TIME_CONTEXT_EVENTS.clockOffsetsChanged, this.setViewFromOffsets); } else { this.openmct.time.on(TIME_CONTEXT_EVENTS.boundsChanged, this.handleNewBounds); diff --git a/src/plugins/timeConductor/ConductorPopUp.vue b/src/plugins/timeConductor/ConductorPopUp.vue index 4d699774c0..170ecfe1d4 100644 --- a/src/plugins/timeConductor/ConductorPopUp.vue +++ b/src/plugins/timeConductor/ConductorPopUp.vue @@ -205,7 +205,7 @@ export default { this.timeContext = this.openmct.time.getContextForView(this.objectPath); this.timeContext.on(TIME_CONTEXT_EVENTS.clockChanged, this.setViewFromClock); - this.timeContext.on(TIME_CONTEXT_EVENTS.boundsChanged, this.setBounds); + this.timeContext.on(TIME_CONTEXT_EVENTS.boundsChanged, this.setBounds, this.openmct.priority.HIGH); this.setViewFromClock(this.timeContext.getClock()); this.setBounds(this.timeContext.getBounds());