-1

Can anyone help me look at this, I'm trying to draw lines on a canvas and it works in Edge, but in Firefox and Chrome the canvas goes black with a little frowny face in the top left corner. Code:

var cellwitdh = StaticData.SelectedTileSheet.getCellWidth();
var col = Math.floor(_gridCVS.width / cellwitdh);
var ctx = this._gridCVS.getContext2d();
for (i in 0...col)
{
    ctx.beginPath();
    ctx.moveTo(i cellwitdh, 0);
    ctx.lineTo(i cellwitdh, this._gridCVS.width);
    ctx.stroke();
    ctx.closePath();
}

enter image description here I don't get any error messages, just this image

n0grip
  • 103
  • 2
  • 7

1 Answers1

2

The canvas was too big, I was trying to do a canvas size 24000x24000;

answer reference

n0grip
  • 103
  • 2
  • 7