From 226b7070a8f2ff465d60d25bfa422e7cd3d3792f Mon Sep 17 00:00:00 2001 From: photonstorm Date: Mon, 24 Aug 2015 11:32:32 +0100 Subject: [PATCH] Fixed issue with an extra 4px being added to the canvas elements because the display type wasn't set. --- src/system/Canvas.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/system/Canvas.js b/src/system/Canvas.js index 673c90c14..8d3ba4541 100644 --- a/src/system/Canvas.js +++ b/src/system/Canvas.js @@ -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; },