From 5f453f17a4e6cd8a588018ce54d9cbab45e0ffac Mon Sep 17 00:00:00 2001 From: Dan Vanderkam Date: Mon, 25 Jul 2011 23:44:54 -0400 Subject: [PATCH] clean up alignment --- dygraph-canvas.js | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/dygraph-canvas.js b/dygraph-canvas.js index 6c3a411..4a5ca44 100644 --- a/dygraph-canvas.js +++ b/dygraph-canvas.js @@ -786,7 +786,7 @@ DygraphCanvasRenderer.prototype._renderLineChart = function() { // and next points are null. var isIsolated = (!prevX && (j == points.length - 1 || isNullOrNaN(points[j+1].canvasy))); - if (prevX === null) { + if (prevX === null) { prevX = point.canvasx; prevY = point.canvasy; } else { @@ -807,12 +807,13 @@ DygraphCanvasRenderer.prototype._renderLineChart = function() { ctx.stroke(); } } - if (drawPoints || isIsolated) { - ctx.beginPath(); - ctx.fillStyle = color; - ctx.arc(point.canvasx, point.canvasy, pointSize, - 0, 2 * Math.PI, false); - ctx.fill(); + + if (drawPoints || isIsolated) { + ctx.beginPath(); + ctx.fillStyle = color; + ctx.arc(point.canvasx, point.canvasy, pointSize, + 0, 2 * Math.PI, false); + ctx.fill(); } } } -- 2.7.4