mirror of
https://github.com/nasa/openmct.git
synced 2025-06-20 16:10:23 +00:00
[Time Conductor] Tweak plot requery
Tweak approach to requerying in plot, and track pending state so there is a visual indication that plotted data may be incomplete during panning with time conductor. WTD-1515
This commit is contained in:
@ -128,6 +128,7 @@ define(
|
|||||||
|
|
||||||
// Handle new telemetry data in this plot
|
// Handle new telemetry data in this plot
|
||||||
function updateValues() {
|
function updateValues() {
|
||||||
|
self.pending = false;
|
||||||
if (handle) {
|
if (handle) {
|
||||||
setupModes(handle.getTelemetryObjects());
|
setupModes(handle.getTelemetryObjects());
|
||||||
}
|
}
|
||||||
@ -143,6 +144,7 @@ define(
|
|||||||
|
|
||||||
// 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;
|
||||||
updater.addHistorical(domainObject, series);
|
updater.addHistorical(domainObject, series);
|
||||||
self.modeOptions.getModeHandler().plotTelemetry(updater);
|
self.modeOptions.getModeHandler().plotTelemetry(updater);
|
||||||
self.update();
|
self.update();
|
||||||
@ -184,14 +186,16 @@ define(
|
|||||||
|
|
||||||
// Respond to a display bounds change (requery for data)
|
// Respond to a display bounds change (requery for data)
|
||||||
function changeDisplayBounds(event, bounds) {
|
function changeDisplayBounds(event, bounds) {
|
||||||
setBasePanZoom(bounds);
|
self.pending = true;
|
||||||
if (handle) {
|
releaseSubscription();
|
||||||
recreateUpdater();
|
|
||||||
throttledRequery();
|
throttledRequery();
|
||||||
}
|
setBasePanZoom(bounds);
|
||||||
}
|
}
|
||||||
|
|
||||||
throttledRequery = throttle(requestTelemetry, 250);
|
// Reestablish/reissue request for telemetry
|
||||||
|
throttledRequery = throttle(function () {
|
||||||
|
subscribe($scope.domainObject);
|
||||||
|
}, 250);
|
||||||
|
|
||||||
this.modeOptions = new PlotModeOptions([], subPlotFactory);
|
this.modeOptions = new PlotModeOptions([], subPlotFactory);
|
||||||
this.updateValues = updateValues;
|
this.updateValues = updateValues;
|
||||||
@ -202,6 +206,8 @@ define(
|
|||||||
.forEach(updateSubplot);
|
.forEach(updateSubplot);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
self.pending = true;
|
||||||
|
|
||||||
// Subscribe to telemetry when a domain object becomes available
|
// Subscribe to telemetry when a domain object becomes available
|
||||||
$scope.$watch('domainObject', subscribe);
|
$scope.$watch('domainObject', subscribe);
|
||||||
|
|
||||||
@ -308,7 +314,7 @@ define(
|
|||||||
PlotController.prototype.isRequestPending = function () {
|
PlotController.prototype.isRequestPending = function () {
|
||||||
// Placeholder; this should reflect request state
|
// Placeholder; this should reflect request state
|
||||||
// when requesting historical telemetry
|
// when requesting historical telemetry
|
||||||
return false;
|
return this.pending;
|
||||||
};
|
};
|
||||||
|
|
||||||
return PlotController;
|
return PlotController;
|
||||||
|
Reference in New Issue
Block a user