Fix demo pty size

This commit is contained in:
Daniel Imms
2017-09-01 21:36:20 -07:00
parent b0653fec68
commit 5cd189e2e0
+3 -3
View File
@@ -97,10 +97,10 @@ function createTerminal() {
colsElement.value = term.cols; colsElement.value = term.cols;
rowsElement.value = term.rows; rowsElement.value = term.rows;
fetch('/terminals?cols=' + cols + '&rows=' + rows, {method: 'POST'}).then(function (res) { fetch('/terminals?cols=' + term.cols + '&rows=' + term.rows, {method: 'POST'}).then(function (res) {
charWidth = Math.ceil(term.element.offsetWidth / cols); charWidth = Math.ceil(term.element.offsetWidth / term.cols);
charHeight = Math.ceil(term.element.offsetHeight / rows); charHeight = Math.ceil(term.element.offsetHeight / term.rows);
res.text().then(function (pid) { res.text().then(function (pid) {
window.pid = pid; window.pid = pid;