From: David Eberlein Date: Mon, 15 Apr 2013 14:15:04 +0000 (+0200) Subject: TEST: testGridLinePattern: Fixed bug not correctly resetting the x-value X-Git-Tag: v1.0.0~29^2^2~4 X-Git-Url: https://adrianiainlam.tk/git/?a=commitdiff_plain;h=406b8518e7919686221e9471479afc94a3a9043c;p=dygraphs.git TEST: testGridLinePattern: Fixed bug not correctly resetting the x-value in each loop --- diff --git a/auto_tests/tests/grid_per_axis.js b/auto_tests/tests/grid_per_axis.js index 3dd2a89..8f3d1b3 100644 --- a/auto_tests/tests/grid_per_axis.js +++ b/auto_tests/tests/grid_per_axis.js @@ -290,12 +290,11 @@ GridPerAxisTestCase.prototype.testGridLinePattern = function() { return Math.round(y) - 1; } var x, y; - x = halfUp(g.plotter_.area.x); // Step through all gridlines of the axis for ( var i = 0; i < yGridlines.length; i++) { y = halfDown(g.toDomYCoord(yGridlines[i], 0)); // Step through the pixels of the line and test the pattern. - for (x; x < g.plotter_.area.w; x++) { + for (x = halfUp(g.plotter_.area.x); x < g.plotter_.area.w; x++) { // Ignore alpha var drawnPixel = Util.samplePixel(g.hidden_, x, y).slice(0,3); var pattern = (Math.floor((x) / 4)) % 2;