minor hidpi fix
This commit is contained in:
+1
-1
@@ -23,7 +23,7 @@ async function storeContainers() {
|
||||
|
||||
async function cleanContainers() {
|
||||
if (!(await stat('containers-db.local.json'))) {
|
||||
storeContainers()
|
||||
await storeContainers()
|
||||
}
|
||||
|
||||
const raw = JSON.parse(await fs.readFile('containers-db.local.json', 'utf8'))
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user