Fixed issue with an extra 4px being added to the canvas elements because the display type wasn't set.

This commit is contained in:
photonstorm 2015-08-24 11:32:32 +01:00
parent a5a503b02c
commit 226b7070a8

View file

@ -38,15 +38,15 @@ Phaser.Canvas = {
var canvas = document.createElement('canvas');
}
canvas.width = width;
canvas.height = height;
if (typeof id === 'string' && id !== '')
{
canvas.id = id;
canvas.style.display = 'block';
}
canvas.width = width;
canvas.height = height;
canvas.style.display = 'block';
return canvas;
},