more playing with tty size

This commit is contained in:
Lisa Milne 2023-11-11 17:22:48 +10:00
parent ac2f7f813d
commit ac0662b21c
2 changed files with 2 additions and 2 deletions

View file

@ -6,7 +6,7 @@ header {padding:10px;}
header h1 {line-height:40px; font-size:30px;}
section {}
section.content {position:relative; overflow:hidden;}
section.content div#terminal {width:100%; min-width: 500px; max-width:1000px; margin:0 auto; overflow:hidden; overflow-y:auto; scrollbar-width:none;}
section.content div#terminal {width:100%; min-width: 500px; max-width:1000px; max-height:100%; margin:0 auto; overflow:hidden; overflow-y:auto; scrollbar-width:none;}
section.content div#tty {width:100%; min-width: 500px; max-width:1000px; margin:0 auto; overflow:hidden; overflow-y:auto; scrollbar-width:none; z-index:99; background:#000000;}
section.content article {unicode-bidi: embed; white-space: pre-wrap;}
section.content form {display:flex;}

View file

@ -914,7 +914,7 @@ clite.term = {
s.innerText = 'W';
tty.data.el.appendChild(s);
// TODO: shouldn't need the 0.9 thing, but urgh
tty.lines = parseInt((tty.data.el.offsetHeight/s.offsetHeight)*0.9);
tty.lines = parseInt((tty.data.el.offsetHeight/20)-1);
tty.chars = parseInt((tty.data.el.offsetWidth/s.offsetWidth)*0.8);
tty.data.el.removeChild(s);
clite.events.refocus();