From eef42af52b94acdfee4eeca06d0b56751f712f7a Mon Sep 17 00:00:00 2001 From: cpsdqs Date: Mon, 9 Oct 2017 20:27:38 +0200 Subject: [PATCH] Fix screen not resizing and debug causing redraw --- js/term/screen_layout.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/js/term/screen_layout.js b/js/term/screen_layout.js index e99188f..357f670 100644 --- a/js/term/screen_layout.js +++ b/js/term/screen_layout.js @@ -22,7 +22,8 @@ module.exports = class ScreenLayout extends EventEmitter { gridScaleY: 1.2, fitIntoWidth: 0, fitIntoHeight: 0, - graphics: 0 + graphics: 0, + debug: false } // scaling caused by fitIntoWidth/fitIntoHeight @@ -42,8 +43,7 @@ module.exports = class ScreenLayout extends EventEmitter { fontFamily: '', fontSize: 0, fitIntoWidth: 0, - fitIntoHeight: 0, - debug: false + fitIntoHeight: 0 } this.charSize = { width: 0, height: 0 } @@ -202,6 +202,8 @@ module.exports = class ScreenLayout extends EventEmitter { fitIntoHeight, padding } = this.window + + this.updateCharSize() const cellSize = this.getCellSize() // real height of the canvas element in pixels @@ -241,8 +243,6 @@ module.exports = class ScreenLayout extends EventEmitter { this.canvas.height = (height * cellSize.height + 2 * Math.round(this._padding)) * devicePixelRatio this.canvas.style.height = `${realHeight}px` - this.updateCharSize() - // the screen has been cleared (by changing canvas width) this.renderer.resetDrawn()