From 5cd189e2e072ea45f41058dfc8e7235d45645d93 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Fri, 1 Sep 2017 21:36:20 -0700 Subject: [PATCH] Fix demo pty size --- demo/main.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/demo/main.js b/demo/main.js index 28840709..f05a8cef 100644 --- a/demo/main.js +++ b/demo/main.js @@ -97,10 +97,10 @@ function createTerminal() { colsElement.value = term.cols; 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); - charHeight = Math.ceil(term.element.offsetHeight / rows); + charWidth = Math.ceil(term.element.offsetWidth / term.cols); + charHeight = Math.ceil(term.element.offsetHeight / term.rows); res.text().then(function (pid) { window.pid = pid;