Use boundingClientRect instead of style to get actual height

PR #598
This commit is contained in:
Michael Irwin
2017-03-15 09:06:56 -04:00
parent 3c3a646d42
commit 0cb8ecc6f7
+1 -1
View File
@@ -56,7 +56,7 @@
subjectRow.innerHTML = 'W'; // Common character for measuring width, although on monospace
characterWidth = subjectRow.getBoundingClientRect().width;
subjectRow.style.display = ''; // Revert style before calculating height, since they differ.
characterHeight = parseFloat(term.rowContainer.style.lineHeight);
characterHeight = subjectRow.getBoundingClientRect().height;
subjectRow.innerHTML = contentBuffer;
rows = parseInt(availableHeight / characterHeight);