mirror of
https://github.com/bckelley/cgm-remote-monitor.git
synced 2026-08-24 03:14:12 -05:00
fix spelling of focusRangeMS
This commit is contained in:
+7
-7
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user