mirror of
https://github.com/wavetermdev/xterm.js.git
synced 2026-08-05 13:43:48 -07:00
Merge pull request #4078 from Tyriar/fix_demo_resize
Fix resize on demo
This commit is contained in:
+5
-1
@@ -406,7 +406,11 @@ function initOptions(term: TerminalType): void {
|
||||
const input = <HTMLInputElement>document.getElementById(`opt-${o}`);
|
||||
addDomListener(input, 'change', () => {
|
||||
console.log('change', o, input.value);
|
||||
if (o === 'lineHeight') {
|
||||
if (o === 'rows') {
|
||||
term.resize(term.cols, parseInt(input.value));
|
||||
} else if (o === 'cols') {
|
||||
term.resize(parseInt(input.value), term.rows);
|
||||
} else if (o === 'lineHeight') {
|
||||
term.options.lineHeight = parseFloat(input.value);
|
||||
} else if (o === 'scrollSensitivity') {
|
||||
term.options.scrollSensitivity = parseFloat(input.value);
|
||||
|
||||
Reference in New Issue
Block a user