[Telemetry] Refactor plot to use TelemetryFormatter

Refactor plot view to use an injected telemetry formatter,
instead of explicitly including moment. WTD-599.
This commit is contained in:
Victor Woeltjen
2014-12-24 10:59:34 -08:00
parent b080f90f64
commit fc0376296d
8 changed files with 62 additions and 14 deletions

View File

@ -22,14 +22,14 @@ define(
* @param {PlotPanZoomStack} panZoomStack the stack of pan-zoom
* states which is applicable to this sub-plot
*/
function SubPlot(telemetryObjects, panZoomStack) {
function SubPlot(telemetryObjects, panZoomStack, telemetryFormatter) {
// We are used from a template often, so maintain
// state in local variables to allow for fast look-up,
// as is normal for controllers.
var draw = {},
rangeTicks = [],
domainTicks = [],
formatter = new PlotFormatter(),
formatter = telemetryFormatter,
domainOffset,
mousePosition,
marqueeStart,