diff --git a/platform/features/plot/res/templates/plot.html b/platform/features/plot/res/templates/plot.html index 4d95150cab..5101438bd9 100644 --- a/platform/features/plot/res/templates/plot.html +++ b/platform/features/plot/res/templates/plot.html @@ -1,4 +1,3 @@ - @@ -114,7 +113,7 @@ - +
@@ -143,9 +142,6 @@
-
- - +
- diff --git a/platform/features/plot/src/PlotController.js b/platform/features/plot/src/PlotController.js index 9b8c60b351..ceb04a8708 100644 --- a/platform/features/plot/src/PlotController.js +++ b/platform/features/plot/src/PlotController.js @@ -30,10 +30,11 @@ define( * * @constructor */ - function PlotController($scope, telemetryFormatter) { + function PlotController($scope, telemetryFormatter, telemetrySubscriber) { var subPlotFactory = new SubPlotFactory(telemetryFormatter), modeOptions = new PlotModeOptions([], subPlotFactory), subplots = [], + subscription, domainOffset; // Populate the scope with axis information (specifically, options @@ -99,9 +100,18 @@ define( .forEach(updateSubplot); } - $scope.$watch("telemetry.getTelemetryObjects()", setupModes); - $scope.$watch("telemetry.getMetadata()", setupAxes); - $scope.$on("telemetryUpdate", plotTelemetry); + function updateValues() { + + } + + // Create a new subscription; telemetrySubscriber gets + // to do the meaningful work here. + function subscribe(domainObject) { + subscription = domainObject && telemetrySubscriber.subscribe( + domainObject, + updateValues + ); + } return { /** @@ -169,7 +179,13 @@ define( /** * Explicitly update all plots. */ - update: update + update: update, + /** + * Check if a request is pending (to show the wait spinner) + */ + isRequestPending: function () { + return false; + } }; }