diff --git a/include/display.js b/include/display.js index 9a8e4559..8994856b 100644 --- a/include/display.js +++ b/include/display.js @@ -229,13 +229,14 @@ var Display; saveImg = this._drawCtx.getImageData(0, 0, img_width, img_height); } - if (canvas.width !== width) { canvas.width = width; } - if (canvas.height !== height) { canvas.height = height; } - - if (this._viewport) { - canvas.style.height = height + 'px'; + if (canvas.width !== width) { + canvas.width = width; canvas.style.width = width + 'px'; } + if (canvas.height !== height) { + canvas.height = height; + canvas.style.height = height + 'px'; + } if (saveImg) { this._drawCtx.putImageData(saveImg, 0, 0);