diff --git a/static/app.js b/static/app.js index c0f27a3..bc1ee11 100644 --- a/static/app.js +++ b/static/app.js @@ -277,7 +277,14 @@ function render() { setHtml($("#side"), S.me ? sidebar() : `
Guildhall alpha
${S.dev ? devbar() : ""}`); setHtml($("#top"), topbar()); + // The fires keep burning through a re-render: put the old canvases back in place of the new ones. + const burning = [...document.querySelectorAll("canvas[data-flame]")]; setHtml($("#main"), S.me ? pageHtml() : register()); + for (const old of burning) { + const fresh = document.querySelector(`canvas[data-flame="${old.dataset.flame}"]`); + if (fresh && fresh !== old) fresh.replaceWith(old); + } + fireTextAt = 0; // and fill in their bars and times straight away for (const [key, value] of Object.entries(kept)) { const el = document.querySelector(`[data-keep="${key}"]`);