From: Dan Vanderkam Date: Tue, 26 Jul 2011 03:44:54 +0000 (-0400) Subject: clean up alignment X-Git-Tag: v1.0.0~442 X-Git-Url: https://adrianiainlam.tk/git/?a=commitdiff_plain;h=5f453f17a4e6cd8a588018ce54d9cbab45e0ffac;p=dygraphs.git clean up alignment --- 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(); } } }