From 85d17635337f4b9cd06b7939cedc2222f22ea3ac Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Thu, 3 Oct 2019 11:15:48 -0700 Subject: [PATCH] Use stable xterm element API --- terminus-terminal/src/frontends/xtermFrontend.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/terminus-terminal/src/frontends/xtermFrontend.ts b/terminus-terminal/src/frontends/xtermFrontend.ts index 29cc5cca..36a7cdb4 100644 --- a/terminus-terminal/src/frontends/xtermFrontend.ts +++ b/terminus-terminal/src/frontends/xtermFrontend.ts @@ -86,11 +86,11 @@ export class XTermFrontend extends Frontend { this.resizeHandler = () => { try { - if (this.xtermCore.element && getComputedStyle(this.xtermCore.element).getPropertyValue('height') !== 'auto') { - let t = window.getComputedStyle(this.xtermCore.element.parentElement) + if (this.xterm.element && getComputedStyle(this.xterm.element).getPropertyValue('height') !== 'auto') { + let t = window.getComputedStyle(this.xterm.element.parentElement!) let r = parseInt(t.getPropertyValue('height')) let n = Math.max(0, parseInt(t.getPropertyValue('width'))) - let o = window.getComputedStyle(this.xtermCore.element) + let o = window.getComputedStyle(this.xterm.element) let i = r - (parseInt(o.getPropertyValue('padding-top')) + parseInt(o.getPropertyValue('padding-bottom'))) let l = n - (parseInt(o.getPropertyValue('padding-right')) + parseInt(o.getPropertyValue('padding-left'))) - this.xtermCore.viewport.scrollBarWidth let actualCellWidth = this.xtermCore._renderService.dimensions.actualCellWidth || 9