From 9babfea36b1def5791b4c5446fc47dafa79a0289 Mon Sep 17 00:00:00 2001 From: "Arthur Sonzogni (slow/sick)" Date: Fri, 11 Nov 2022 14:07:27 +0100 Subject: [PATCH] Fix example demo. (#506) --- examples/index.html | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/examples/index.html b/examples/index.html index 9245dc8..a5e0a48 100644 --- a/examples/index.html +++ b/examples/index.html @@ -92,13 +92,16 @@ } term.onBinary(onBinary); term.onData(onBinary) + term.resize(140,43); window.Module = { preRun: () => { FS.init(stdin, stdout, stderr); }, postRun: [], onRuntimeInitialized: () => { - // Handle screen resize: + if (window.Module._ftxui_on_resize == undefined) + return; + const fit_addon = new (FitAddon.FitAddon)(); term.loadAddon(fit_addon); fit_addon.fit();