Fixed arrows broken on resize or img load

This commit is contained in:
2026-04-06 14:17:10 +02:00
parent 3868d1e7cb
commit e2d4057f67

View File

@@ -112,5 +112,7 @@ document.querySelectorAll('.node').forEach(node => {
});
// ─── Initial draw ─────────────────────────────────────────────
// Wait two frames so the browser has laid out the divs
requestAnimationFrame(() => requestAnimationFrame(redraw));
window.addEventListener('load', redraw);
// also redraws if anything inside the scene changes size
new ResizeObserver(redraw).observe(scene);