From bc7342b127009df8198e9c724999b8e4f73f8f01 Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Sat, 20 Jun 2015 11:30:20 -0700 Subject: [PATCH] [Plot] Make plot fixed duration a global default WTD-1273. --- platform/features/plot/bundle.json | 18 ++++++++++++++++-- platform/features/plot/src/PlotController.js | 10 ++++++++-- 2 files changed, 24 insertions(+), 4 deletions(-) diff --git a/platform/features/plot/bundle.json b/platform/features/plot/bundle.json index 2a7d6e9c73..600782c41f 100644 --- a/platform/features/plot/bundle.json +++ b/platform/features/plot/bundle.json @@ -23,8 +23,22 @@ { "key": "PlotController", "implementation": "PlotController.js", - "depends": [ "$scope", "telemetryFormatter", "telemetryHandler", "throttle" ] + "depends": [ + "$scope", + "telemetryFormatter", + "telemetryHandler", + "throttle", + "PLOT_FIXED_DURATION" + ] + } + ], + "constants": [ + { + "key": "PLOT_FIXED_DURATION", + "value": 900000, + "priority": "fallback", + "comment": "Fifteen minutes." } ] } -} \ No newline at end of file +} diff --git a/platform/features/plot/src/PlotController.js b/platform/features/plot/src/PlotController.js index 106e0f94d5..7eeca3b786 100644 --- a/platform/features/plot/src/PlotController.js +++ b/platform/features/plot/src/PlotController.js @@ -51,7 +51,13 @@ define( * * @constructor */ - function PlotController($scope, telemetryFormatter, telemetryHandler, throttle) { + function PlotController( + $scope, + telemetryFormatter, + telemetryHandler, + throttle, + PLOT_FIXED_DURATION + ) { var subPlotFactory = new SubPlotFactory(telemetryFormatter), modeOptions = new PlotModeOptions([], subPlotFactory), subplots = [], @@ -100,7 +106,7 @@ define( handle, ($scope.axes[0].active || {}).key, ($scope.axes[1].active || {}).key, - 15000 // 15 seconds + PLOT_FIXED_DURATION ); }