From 5061b42f5e133a17132897f82f59170787ce80b0 Mon Sep 17 00:00:00 2001 From: Dan Vanderkam Date: Mon, 19 Dec 2011 15:50:44 -0500 Subject: [PATCH] squash a few remaining "use strict" errors --- dygraph-range-selector.js | 7 ++++--- dygraph-utils.js | 4 ++-- dygraph.js | 6 ++++-- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/dygraph-range-selector.js b/dygraph-range-selector.js index 3b32d37..6007d5f 100644 --- a/dygraph-range-selector.js +++ b/dygraph-range-selector.js @@ -376,6 +376,7 @@ DygraphRangeSelector.prototype.drawStaticLayer_ = function() { try { this.drawMiniPlot_(); } catch(ex) { + Dygraph.warn(ex); } var margin = .5; @@ -544,7 +545,7 @@ DygraphRangeSelector.prototype.computeCombinedSeriesAndLimits_ = function() { } } else { var yExtra; - yRange = yMax - yMin; + var yRange = yMax - yMin; if (yRange <= Number.MIN_VALUE) { yExtra = yMax*extraPercent; } else { @@ -604,8 +605,8 @@ DygraphRangeSelector.prototype.drawInteractiveLayer_ = function() { this.iePanOverlay_.style.display = 'none'; } } else { - leftHandleCanvasPos = Math.max(margin, zoomHandleStatus.leftHandlePos - this.canvasRect_.x); - rightHandleCanvasPos = Math.min(width, zoomHandleStatus.rightHandlePos - this.canvasRect_.x); + var leftHandleCanvasPos = Math.max(margin, zoomHandleStatus.leftHandlePos - this.canvasRect_.x); + var rightHandleCanvasPos = Math.min(width, zoomHandleStatus.rightHandlePos - this.canvasRect_.x); ctx.fillStyle = 'rgba(240, 240, 240, 0.6)'; ctx.fillRect(0, 0, leftHandleCanvasPos, this.canvasRect_.h); diff --git a/dygraph-utils.js b/dygraph-utils.js index cebf950..a391190 100644 --- a/dygraph-utils.js +++ b/dygraph-utils.js @@ -725,7 +725,7 @@ Dygraph.isPixelChangingOptionList = function(labels, attrs) { } // Iterate through the list of updated options. - for (property in attrs) { + for (var property in attrs) { // Break early if we already know we need new points from a previous option. if (requiresNewPoints) { break; @@ -735,7 +735,7 @@ Dygraph.isPixelChangingOptionList = function(labels, attrs) { if (seriesNamesDictionary[property]) { // This property value is a list of options for this series. // If any of these sub properties are not pixel safe, set the flag. - for (subProperty in attrs[property]) { + for (var subProperty in attrs[property]) { // Break early if we already know we need new points from a previous option. if (requiresNewPoints) { break; diff --git a/dygraph.js b/dygraph.js index 49843a4..9283a18 100644 --- a/dygraph.js +++ b/dygraph.js @@ -1939,8 +1939,10 @@ Dygraph.prototype.gatherDatasets_ = function(rolledSeries, dateWindow) { if (bars) { for (var j=0; j