Fixed arrows broken on resize or img load
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user