Skip to content

Commit aae9f9f

Browse files
committed
Fix canvas height and width bug
1 parent e806d42 commit aae9f9f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

js/libs/Board.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ var Board = (function() {
3636
var margin = 10;
3737

3838
var heightCss = window.innerHeight - margin;
39-
var heightCanvas = height * this.resolution;
39+
var heightCanvas = heightCss * this.resolution;
4040
var widthCss = window.innerWidth - margin;
41-
var widthCanvas = width * this.resolution;
41+
var widthCanvas = widthCss * this.resolution;
4242

4343
// If new size is larger than memory
4444
if (widthCanvas > this.domMem.width || heightCanvas > this.domMem.height) {

0 commit comments

Comments
 (0)