* of columns)
*/
Terminal.prototype.fit = function () {
- var container = this.element.parentElement,
+ var container = this.rowContainer,
subjectRow = this.rowContainer.firstElementChild,
rows = parseInt(container.offsetHeight / subjectRow.offsetHeight),
characterWidth,
characterWidth = parseInt(subjectRow.offsetWidth / this.cols);
subjectRow.style.display = '';
- cols = parseInt(container.offsetWidth / characterWidth);
+ cols = container.offsetWidth / characterWidth;
+ cols = parseInt(cols);
this.resize(cols, rows);
-}
\ No newline at end of file
+};
\ No newline at end of file