Fix demo pty size
This commit is contained in:
+3
-3
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user