Canvases can now use css size attributes.
This commit is contained in:
1 parent
39d22dfc5e
commit
61baf5d4cd
1 file changed
+2
@@ -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");
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user