mirror of
https://github.com/wavetermdev/xterm.js.git
synced 2026-08-05 13:43:48 -07:00
fit() uses offset height and width now
This commit is contained in:
+1
-1
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "xterm.js",
|
||||
"version": "0.9",
|
||||
"version": "0.9.1",
|
||||
"ignore": ["demo", "docs", "test", ".gitignore"]
|
||||
}
|
||||
|
||||
+2
-2
@@ -2537,7 +2537,7 @@ Terminal.prototype.resize = function(x, y) {
|
||||
Terminal.prototype.fit = function () {
|
||||
var container = this.element.parentElement,
|
||||
subjectRow = this.rowContainer.firstElementChild,
|
||||
rows = parseInt(container.scrollHeight / subjectRow.offsetHeight),
|
||||
rows = parseInt(container.offsetHeight / subjectRow.offsetHeight),
|
||||
characterWidth,
|
||||
cols;
|
||||
|
||||
@@ -2545,7 +2545,7 @@ Terminal.prototype.fit = function () {
|
||||
characterWidth = parseInt(subjectRow.offsetWidth / this.cols);
|
||||
subjectRow.style.display = '';
|
||||
|
||||
cols = parseInt(container.scrollWidth / characterWidth);
|
||||
cols = parseInt(container.offsetWidth / characterWidth);
|
||||
|
||||
this.resize(cols, rows);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user