mirror of
https://github.com/nasa/openmct.git
synced 2025-06-15 05:38:12 +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:
@ -87,6 +87,13 @@ define(
|
|||||||
modeOptions = new PlotModeOptions(telemetryObjects || []);
|
modeOptions = new PlotModeOptions(telemetryObjects || []);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Update all sub-plots
|
||||||
|
function update() {
|
||||||
|
modeOptions.getModeHandler()
|
||||||
|
.getSubPlots()
|
||||||
|
.forEach(updateSubplot);
|
||||||
|
}
|
||||||
|
|
||||||
$scope.$watch("telemetry.getTelemetryObjects()", setupModes);
|
$scope.$watch("telemetry.getTelemetryObjects()", setupModes);
|
||||||
$scope.$watch("telemetry.getMetadata()", setupAxes);
|
$scope.$watch("telemetry.getMetadata()", setupAxes);
|
||||||
$scope.$on("telemetryUpdate", plotTelemetry);
|
$scope.$on("telemetryUpdate", plotTelemetry);
|
||||||
@ -143,7 +150,8 @@ define(
|
|||||||
* getModeOptions()
|
* getModeOptions()
|
||||||
*/
|
*/
|
||||||
setMode: function (mode) {
|
setMode: function (mode) {
|
||||||
return modeOptions.setMode(mode);
|
modeOptions.setMode(mode);
|
||||||
|
plotTelemetry();
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Get all individual plots contained within this Plot view.
|
* Get all individual plots contained within this Plot view.
|
||||||
@ -156,12 +164,7 @@ define(
|
|||||||
/**
|
/**
|
||||||
* Explicitly update all plots.
|
* Explicitly update all plots.
|
||||||
*/
|
*/
|
||||||
update: function () {
|
update: update
|
||||||
modeOptions.getModeHandler()
|
|
||||||
.getSubPlots()
|
|
||||||
.forEach(updateSubplot);
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user