From 38d35398d13812cf41d43daeacd2a20c82d5b71d Mon Sep 17 00:00:00 2001 From: Scott Date: Mon, 16 Oct 2017 18:03:08 -0700 Subject: [PATCH] fix spelling of focusRangeMS --- lib/client/chart.js | 2 +- lib/client/index.js | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/client/chart.js b/lib/client/chart.js index 7361c1a7098..32a15ba0155 100644 --- a/lib/client/chart.js +++ b/lib/client/chart.js @@ -511,7 +511,7 @@ function init (client, d3, $) { var updateBrush = d3.select('.brush').transition(); updateBrush - .call(chart.brush.extent([new Date(dataRange[1].getTime() - client.foucusRangeMS), dataRange[1]])); + .call(chart.brush.extent([new Date(dataRange[1].getTime() - client.focusRangeMS), dataRange[1]])); client.brushed(true); renderer.addContextCircles(); diff --git a/lib/client/index.js b/lib/client/index.js index ac801e2561e..f8ca8e56fbe 100644 --- a/lib/client/index.js +++ b/lib/client/index.js @@ -221,7 +221,7 @@ client.load = function load(serverSettings, callback) { client.hashauth.initAuthentication(client.afterAuth); - client.foucusRangeMS = times.hours(client.settings.focusHours).msecs; + client.focusRangeMS = times.hours(client.settings.focusHours).msecs; $('.focus-range li[data-hours=' + client.settings.focusHours + ']').addClass('selected'); client.brushed = brushed; client.formatTime = formatTime; @@ -365,7 +365,7 @@ client.load = function load(serverSettings, callback) { d3.select('.brush') .transition() .duration(UPDATE_TRANS_MS) - .call(chart.brush.extent([new Date(dataRange[1].getTime() - client.foucusRangeMS), dataRange[1]])); + .call(chart.brush.extent([new Date(dataRange[1].getTime() - client.focusRangeMS), dataRange[1]])); if (!skipBrushing) { brushed(); @@ -385,14 +385,14 @@ client.load = function load(serverSettings, callback) { var brushExtent = chart.brush.extent(); // ensure that brush extent is fixed at 3.5 hours - if (brushExtent[1].getTime() - brushExtent[0].getTime() !== client.foucusRangeMS) { + if (brushExtent[1].getTime() - brushExtent[0].getTime() !== client.focusRangeMS) { // ensure that brush updating is with the time range - if (brushExtent[0].getTime() + client.foucusRangeMS > client.dataExtent()[1].getTime()) { - brushExtent[0] = new Date(brushExtent[1].getTime() - client.foucusRangeMS); + if (brushExtent[0].getTime() + client.focusRangeMS > client.dataExtent()[1].getTime()) { + brushExtent[0] = new Date(brushExtent[1].getTime() - client.focusRangeMS); d3.select('.brush') .call(chart.brush.extent([brushExtent[0], brushExtent[1]])); } else { - brushExtent[1] = new Date(brushExtent[0].getTime() + client.foucusRangeMS); + brushExtent[1] = new Date(brushExtent[0].getTime() + client.focusRangeMS); d3.select('.brush') .call(chart.brush.extent([brushExtent[0], brushExtent[1]])); } @@ -868,7 +868,7 @@ client.load = function load(serverSettings, callback) { $('.focus-range li').removeClass('selected'); li.addClass('selected'); var hours = Number(li.data('hours')); - client.foucusRangeMS = times.hours(hours).msecs; + client.focusRangeMS = times.hours(hours).msecs; Storages.localStorage.set('focusHours', hours); refreshChart(); } else {