diff --git a/platform/features/plot/bundle.js b/platform/features/plot/bundle.js index c09a965197..bec42694b3 100644 --- a/platform/features/plot/bundle.js +++ b/platform/features/plot/bundle.js @@ -25,6 +25,7 @@ define([ "./src/PlotController", "./src/policies/PlotViewPolicy", "./src/PlotOptionsController", + "./src/services/ExportImageService", "text!./res/templates/plot.html", "text!./res/templates/plot-options-browse.html", 'legacyRegistry' @@ -33,6 +34,7 @@ define([ PlotController, PlotViewPolicy, PlotOptionsController, + ExportImageService, plotTemplate, plotOptionsBrowseTemplate, legacyRegistry @@ -71,6 +73,7 @@ define([ "depends": [ "$scope", "$element", + "ExportImageService", "telemetryFormatter", "telemetryHandler", "throttle", @@ -85,6 +88,13 @@ define([ ] } ], + "services": [ + { + "key": "ExportImageService", + "implementation": ExportImageService, + "depends": [] + } + ], "constants": [ { "key": "PLOT_FIXED_DURATION", diff --git a/platform/features/plot/src/PlotController.js b/platform/features/plot/src/PlotController.js index fa7e1dc726..074e17f9b6 100644 --- a/platform/features/plot/src/PlotController.js +++ b/platform/features/plot/src/PlotController.js @@ -32,8 +32,7 @@ define( "./elements/PlotLimitTracker", "./elements/PlotTelemetryFormatter", "./modes/PlotModeOptions", - "./SubPlotFactory", - "./services/ExportImageService" + "./SubPlotFactory" ], function ( PlotUpdater, @@ -42,8 +41,7 @@ define( PlotLimitTracker, PlotTelemetryFormatter, PlotModeOptions, - SubPlotFactory, - ExportImageService + SubPlotFactory ) { var AXIS_DEFAULTS = [ @@ -66,6 +64,7 @@ define( function PlotController( $scope, $element, + ExportImageService, telemetryFormatter, telemetryHandler, throttle, @@ -250,7 +249,7 @@ define( self.pending = true; self.$element = $element; - self.ExportImageService = new ExportImageService(); + self.ExportImageService = ExportImageService; // Initialize axes; will get repopulated when telemetry // metadata becomes available.