mirror of
https://github.com/nasa/openmct.git
synced 2025-05-06 18:48:27 +00:00
[Time Conductor] Retain domain selection in plot
Avoid various cases where domain selection is temporarily overwritten due to transient plot state (e.g. because no telemetry metadata is yet available due to asynchronous retrieval of delegates.)
This commit is contained in:
parent
7bd0e279b0
commit
9723c65016
@ -136,6 +136,13 @@ define(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getUpdater() {
|
||||||
|
if (!updater) {
|
||||||
|
recreateUpdater();
|
||||||
|
}
|
||||||
|
return updater;
|
||||||
|
}
|
||||||
|
|
||||||
// Handle new telemetry data in this plot
|
// Handle new telemetry data in this plot
|
||||||
function updateValues() {
|
function updateValues() {
|
||||||
self.pending = false;
|
self.pending = false;
|
||||||
@ -143,27 +150,23 @@ define(
|
|||||||
setupModes(handle.getTelemetryObjects());
|
setupModes(handle.getTelemetryObjects());
|
||||||
setupAxes(handle.getMetadata());
|
setupAxes(handle.getMetadata());
|
||||||
}
|
}
|
||||||
if (updater) {
|
getUpdater().update();
|
||||||
updater.update();
|
self.modeOptions.getModeHandler().plotTelemetry(updater);
|
||||||
self.modeOptions.getModeHandler().plotTelemetry(updater);
|
self.limitTracker.update();
|
||||||
}
|
|
||||||
if (self.limitTracker) {
|
|
||||||
self.limitTracker.update();
|
|
||||||
}
|
|
||||||
self.update();
|
self.update();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Display new historical data as it becomes available
|
// Display new historical data as it becomes available
|
||||||
function addHistoricalData(domainObject, series) {
|
function addHistoricalData(domainObject, series) {
|
||||||
self.pending = false;
|
self.pending = false;
|
||||||
updater.addHistorical(domainObject, series);
|
getUpdater().addHistorical(domainObject, series);
|
||||||
self.modeOptions.getModeHandler().plotTelemetry(updater);
|
self.modeOptions.getModeHandler().plotTelemetry(updater);
|
||||||
self.update();
|
self.update();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Issue a new request for historical telemetry
|
// Issue a new request for historical telemetry
|
||||||
function requestTelemetry() {
|
function requestTelemetry() {
|
||||||
if (handle && updater) {
|
if (handle) {
|
||||||
handle.request({}, addHistoricalData);
|
handle.request({}, addHistoricalData);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -171,7 +174,7 @@ define(
|
|||||||
// Requery for data entirely
|
// Requery for data entirely
|
||||||
function replot() {
|
function replot() {
|
||||||
if (handle) {
|
if (handle) {
|
||||||
recreateUpdater();
|
updater = undefined;
|
||||||
requestTelemetry();
|
requestTelemetry();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -187,12 +190,7 @@ define(
|
|||||||
updateValues,
|
updateValues,
|
||||||
true // Lossless
|
true // Lossless
|
||||||
);
|
);
|
||||||
if (handle) {
|
replot();
|
||||||
setupModes(handle.getTelemetryObjects());
|
|
||||||
setupAxes(handle.getMetadata());
|
|
||||||
recreateUpdater();
|
|
||||||
requestTelemetry();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Release the current subscription (called when scope is destroyed)
|
// Release the current subscription (called when scope is destroyed)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user