From 6e6b5dad8c2fa7f1e8e7ca31b961d8214a67a8eb Mon Sep 17 00:00:00 2001 From: paris Date: Thu, 10 Apr 2014 18:36:37 +0000 Subject: [PATCH] fit() uses offset height and width now --- bower.json | 2 +- src/xterm.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bower.json b/bower.json index c3215438..659f85ef 100644 --- a/bower.json +++ b/bower.json @@ -1,5 +1,5 @@ { "name": "xterm.js", - "version": "0.9", + "version": "0.9.1", "ignore": ["demo", "docs", "test", ".gitignore"] } diff --git a/src/xterm.js b/src/xterm.js index 2c9328b7..32f504a9 100644 --- a/src/xterm.js +++ b/src/xterm.js @@ -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); }