mirror of
https://github.com/wavetermdev/xterm.js.git
synced 2026-08-05 13:43:48 -07:00
Further fixing of xterm.fit
This commit is contained in:
+7
-1
@@ -15,11 +15,17 @@ Terminal.prototype.fit = function () {
|
||||
var container = this.rowContainer,
|
||||
subjectRow = this.rowContainer.firstElementChild,
|
||||
rows = parseInt(container.offsetHeight / subjectRow.offsetHeight),
|
||||
contentBuffer,
|
||||
characterWidth,
|
||||
cols;
|
||||
|
||||
subjectRow.style.display = 'inline';
|
||||
characterWidth = parseInt(subjectRow.offsetWidth / this.cols);
|
||||
|
||||
contentBuffer = subjectRow.textContent;
|
||||
|
||||
subjectRow.textContent = ' ';
|
||||
characterWidth = parseInt(subjectRow.offsetWidth);
|
||||
|
||||
subjectRow.style.display = '';
|
||||
|
||||
cols = container.offsetWidth / characterWidth;
|
||||
|
||||
Reference in New Issue
Block a user