Tested checkerboard against weird canvas values. A check for negative values in the canvas dimentions should be added.

Signed-off-by: npalomba <nicola.palomba@studenti.galileilivorno.gov.it>
This commit is contained in:
npalomba 2019-03-31 13:31:17 +02:00
parent 15e6d7b08a
commit cf4f17d891

View File

@ -1,5 +1,9 @@
var currentColor = firstCheckerBoardColor;
/* TODO add check for canvas dimentions (right now negative values can be inserted and a canvas will be generated, it is just
necessary to add a conversion from negative to positive values.
*/
function fillCheckerboard() {
for (var i=0; i<canvasSize[0] / checkerBoardSquareSize; i++) {
for (var j=0; j<canvasSize[1] / checkerBoardSquareSize; j++) {