|
|
|
|
@ -62,7 +62,7 @@ export class FitAddon implements ITerminalAddon {
|
|
|
|
|
const parentElementHeight = parseInt(parentElementStyle.getPropertyValue('height'))
|
|
|
|
|
const parentElementWidth = Math.max(0, parseInt(parentElementStyle.getPropertyValue('width')))
|
|
|
|
|
|
|
|
|
|
console.log(parentElementWidth, parentElementHeight)
|
|
|
|
|
console.log(parentElementWidth, parentElementHeight, core._renderService)
|
|
|
|
|
|
|
|
|
|
const elementStyle = window.getComputedStyle(this._terminal.element)
|
|
|
|
|
const elementPadding = {
|
|
|
|
|
@ -76,8 +76,8 @@ export class FitAddon implements ITerminalAddon {
|
|
|
|
|
const availableHeight = parentElementHeight - elementPaddingVer
|
|
|
|
|
const availableWidth = parentElementWidth - elementPaddingHor
|
|
|
|
|
const geometry = {
|
|
|
|
|
cols: Math.floor(availableWidth / core._renderService.dimensions.device.cell.width),
|
|
|
|
|
rows: Math.floor(availableHeight / core._renderService.dimensions.device.cell.height),
|
|
|
|
|
cols: Math.floor(availableWidth / core._renderService.dimensions.css.cell.width),
|
|
|
|
|
rows: Math.floor(availableHeight / core._renderService.dimensions.css.cell.height),
|
|
|
|
|
}
|
|
|
|
|
return geometry
|
|
|
|
|
}
|
|
|
|
|
|