[Plot] Make plot fixed duration a global default

WTD-1273.
This commit is contained in:
Victor Woeltjen
2015-06-20 11:30:20 -07:00
parent f3cbcf0abe
commit bc7342b127
2 changed files with 24 additions and 4 deletions

View File

@@ -23,7 +23,21 @@
{ {
"key": "PlotController", "key": "PlotController",
"implementation": "PlotController.js", "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."
} }
] ]
} }

View File

@@ -51,7 +51,13 @@ define(
* *
* @constructor * @constructor
*/ */
function PlotController($scope, telemetryFormatter, telemetryHandler, throttle) { function PlotController(
$scope,
telemetryFormatter,
telemetryHandler,
throttle,
PLOT_FIXED_DURATION
) {
var subPlotFactory = new SubPlotFactory(telemetryFormatter), var subPlotFactory = new SubPlotFactory(telemetryFormatter),
modeOptions = new PlotModeOptions([], subPlotFactory), modeOptions = new PlotModeOptions([], subPlotFactory),
subplots = [], subplots = [],
@@ -100,7 +106,7 @@ define(
handle, handle,
($scope.axes[0].active || {}).key, ($scope.axes[0].active || {}).key,
($scope.axes[1].active || {}).key, ($scope.axes[1].active || {}).key,
15000 // 15 seconds PLOT_FIXED_DURATION
); );
} }