From 9f6db80e6619a74aad92c42073a3c49d3dd63cb6 Mon Sep 17 00:00:00 2001 From: Dan Vanderkam Date: Sat, 14 Jul 2012 20:57:39 -0500 Subject: [PATCH] misc cleanup --- dygraph-canvas.js | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/dygraph-canvas.js b/dygraph-canvas.js index be76320..6cbe102 100644 --- a/dygraph-canvas.js +++ b/dygraph-canvas.js @@ -232,12 +232,18 @@ DygraphCanvasRenderer.prototype._createIEClipArea = function() { * skip over points with missing yVals. */ DygraphCanvasRenderer._getIteratorPredicate = function(connectSeparatedPoints) { - return connectSeparatedPoints ? DygraphCanvasRenderer._predicateThatSkipsEmptyPoints : null; + return connectSeparatedPoints + ? DygraphCanvasRenderer._predicateThatSkipsEmptyPoints + : null; } DygraphCanvasRenderer._predicateThatSkipsEmptyPoints = function(array, idx) { return array[idx].yval !== null; } +/** + * + * @private + */ DygraphCanvasRenderer.prototype._drawStyledLine = function( ctx, i, setName, color, strokeWidth, strokePattern, drawPoints, drawPointCallback, pointSize) { @@ -254,7 +260,8 @@ DygraphCanvasRenderer.prototype._drawStyledLine = function( ctx.save(); var iter = Dygraph.createIterator(points, firstIndexInSet, setLength, - DygraphCanvasRenderer._getIteratorPredicate(this.attr_("connectSeparatedPoints"))); + DygraphCanvasRenderer._getIteratorPredicate( + this.attr_("connectSeparatedPoints"))); var pointsOnLine; var strategy; @@ -351,8 +358,8 @@ DygraphCanvasRenderer.prototype._drawSeries = function( prevCanvasX = prevCanvasY = null; } else { nextCanvasY = iter.hasNext ? iter.peek.canvasy : null; - // TODO: we calculate isNullOrNaN for this point, and the next, and then, when - // we iterate, test for isNullOrNaN again. Why bother? + // TODO: we calculate isNullOrNaN for this point, and the next, and then, + // when we iterate, test for isNullOrNaN again. Why bother? var isNextCanvasYNullOrNaN = nextCanvasY === null || nextCanvasY != nextCanvasY; isIsolated = (!prevCanvasX && isNextCanvasYNullOrNaN); if (drawGapPoints) { -- 2.7.4