未验证 提交 504f0a51 编写于 作者: E Eugene 提交者: GitHub

Use stable xterm element API (#1579)

Use stable xterm element API
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册