diff --git a/platform/features/plot/src/PlotController.js b/platform/features/plot/src/PlotController.js index 6d90325b85..d6acdb6a5c 100644 --- a/platform/features/plot/src/PlotController.js +++ b/platform/features/plot/src/PlotController.js @@ -149,11 +149,11 @@ define( if (handle) { setupModes(handle.getTelemetryObjects()); setupAxes(handle.getMetadata()); + getUpdater().update(); + self.modeOptions.getModeHandler().plotTelemetry(updater); + self.limitTracker.update(); + self.update(); } - getUpdater().update(); - self.modeOptions.getModeHandler().plotTelemetry(updater); - self.limitTracker.update(); - self.update(); } // Display new historical data as it becomes available diff --git a/platform/features/plot/test/PlotControllerSpec.js b/platform/features/plot/test/PlotControllerSpec.js index dcae177920..addbdf5032 100644 --- a/platform/features/plot/test/PlotControllerSpec.js +++ b/platform/features/plot/test/PlotControllerSpec.js @@ -169,8 +169,9 @@ define( mockDomainObject ]); - // Make an object available + // Make an object available; invoke handler's callback mockScope.$watch.mostRecentCall.args[1](mockDomainObject); + mockHandler.handle.mostRecentCall.args[1](); expect(controller.getModeOptions().length).toEqual(1); @@ -181,8 +182,9 @@ define( mockDomainObject ]); - // Make an object available + // Make an object available; invoke handler's callback mockScope.$watch.mostRecentCall.args[1](mockDomainObject); + mockHandler.handle.mostRecentCall.args[1](); expect(controller.getModeOptions().length).toEqual(2); });