clean up alignment
authorDan Vanderkam <dan@dygraphs.com>
Tue, 26 Jul 2011 03:44:54 +0000 (23:44 -0400)
committerDan Vanderkam <dan@dygraphs.com>
Tue, 26 Jul 2011 03:44:54 +0000 (23:44 -0400)
dygraph-canvas.js

index 6c3a411..4a5ca44 100644 (file)
@@ -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();
         }
       }
     }