Skip to content

Commit 226b707

Browse files
committed
Fixed issue with an extra 4px being added to the canvas elements because the display type wasn't set.
1 parent a5a503b commit 226b707

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/system/Canvas.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,15 @@ Phaser.Canvas = {
3838
var canvas = document.createElement('canvas');
3939
}
4040

41-
canvas.width = width;
42-
canvas.height = height;
43-
4441
if (typeof id === 'string' && id !== '')
4542
{
4643
canvas.id = id;
47-
canvas.style.display = 'block';
4844
}
4945

46+
canvas.width = width;
47+
canvas.height = height;
48+
canvas.style.display = 'block';
49+
5050
return canvas;
5151

5252
},

0 commit comments

Comments
 (0)