mirror of
https://github.com/nasa/openmct.git
synced 2025-04-12 13:47:55 +00:00
[Plot] Update plot immediately on mode change
Make sure current telemetry is drawn immediately upon switching between Overlaid and Stacked plot modes. WTD-625.
This commit is contained in:
parent
662412a31d
commit
921aad9e2f
@ -87,6 +87,13 @@ define(
|
||||
modeOptions = new PlotModeOptions(telemetryObjects || []);
|
||||
}
|
||||
|
||||
// Update all sub-plots
|
||||
function update() {
|
||||
modeOptions.getModeHandler()
|
||||
.getSubPlots()
|
||||
.forEach(updateSubplot);
|
||||
}
|
||||
|
||||
$scope.$watch("telemetry.getTelemetryObjects()", setupModes);
|
||||
$scope.$watch("telemetry.getMetadata()", setupAxes);
|
||||
$scope.$on("telemetryUpdate", plotTelemetry);
|
||||
@ -143,7 +150,8 @@ define(
|
||||
* getModeOptions()
|
||||
*/
|
||||
setMode: function (mode) {
|
||||
return modeOptions.setMode(mode);
|
||||
modeOptions.setMode(mode);
|
||||
plotTelemetry();
|
||||
},
|
||||
/**
|
||||
* Get all individual plots contained within this Plot view.
|
||||
@ -156,12 +164,7 @@ define(
|
||||
/**
|
||||
* Explicitly update all plots.
|
||||
*/
|
||||
update: function () {
|
||||
modeOptions.getModeHandler()
|
||||
.getSubPlots()
|
||||
.forEach(updateSubplot);
|
||||
}
|
||||
|
||||
update: update
|
||||
};
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user