mirror of
https://github.com/ArthurSonzogni/FTXUI.git
synced 2024-11-22 18:59:59 +08:00
Fix example demo. (#506)
This commit is contained in:
parent
dfdbe1eecf
commit
9babfea36b
@ -92,13 +92,16 @@
|
|||||||
}
|
}
|
||||||
term.onBinary(onBinary);
|
term.onBinary(onBinary);
|
||||||
term.onData(onBinary)
|
term.onData(onBinary)
|
||||||
|
term.resize(140,43);
|
||||||
window.Module = {
|
window.Module = {
|
||||||
preRun: () => {
|
preRun: () => {
|
||||||
FS.init(stdin, stdout, stderr);
|
FS.init(stdin, stdout, stderr);
|
||||||
},
|
},
|
||||||
postRun: [],
|
postRun: [],
|
||||||
onRuntimeInitialized: () => {
|
onRuntimeInitialized: () => {
|
||||||
// Handle screen resize:
|
if (window.Module._ftxui_on_resize == undefined)
|
||||||
|
return;
|
||||||
|
|
||||||
const fit_addon = new (FitAddon.FitAddon)();
|
const fit_addon = new (FitAddon.FitAddon)();
|
||||||
term.loadAddon(fit_addon);
|
term.loadAddon(fit_addon);
|
||||||
fit_addon.fit();
|
fit_addon.fit();
|
||||||
|
Loading…
Reference in New Issue
Block a user