Canvases can now use css size attributes.

This commit is contained in:
Robert Kolner committed 2012-03-23 19:10:27 +01:00
1 parent 39d22dfc5e
commit 61baf5d4cd
1 file changed
+2
+2
View File
@@ -76,6 +76,8 @@ function TetrisCanvas(canvasId, width) {
this.sHeight = Math.floor(this.pxHeight / (this.pxRectSize + this.pxSeparatorSize));
// Adjust canvas attributes:
$("#"+canvasId).attr({ width: this.pxWidth, height: this.pxHeight });
this.context = canvas.getContext("2d");
}