mirror of
https://github.com/wavetermdev/xterm.js.git
synced 2026-08-05 13:43:48 -07:00
Fix #3
This commit is contained in:
+3
-3
@@ -17,7 +17,6 @@ Terminal.prototype.fit = function () {
|
||||
rows,
|
||||
contentBuffer,
|
||||
characterWidth,
|
||||
characterHeight,
|
||||
cols;
|
||||
|
||||
subjectRow.style.display = 'inline';
|
||||
@@ -37,9 +36,10 @@ Terminal.prototype.fit = function () {
|
||||
parentElementHeight = parseInt(parentElementStyle.getPropertyValue('height')),
|
||||
elementStyle = window.getComputedStyle(this.element),
|
||||
elementPadding = parseInt(elementStyle.getPropertyValue('padding-top')) + parseInt(elementStyle.getPropertyValue('padding-bottom')),
|
||||
availableHeight = parentElementHeight - elementPadding;
|
||||
availableHeight = parentElementHeight - elementPadding,
|
||||
rowHeight = this.rowContainer.firstElementChild.offsetHeight;
|
||||
|
||||
rows = parseInt(availableHeight / characterHeight);
|
||||
rows = parseInt(availableHeight / rowHeight);
|
||||
|
||||
this.resize(cols, rows);
|
||||
};
|
||||
Reference in New Issue
Block a user