diff --git a/ui/frontend/src/lib/active-view/map.svelte b/ui/frontend/src/lib/active-view/map.svelte index e0de5b2..316864f 100644 --- a/ui/frontend/src/lib/active-view/map.svelte +++ b/ui/frontend/src/lib/active-view/map.svelte @@ -227,9 +227,18 @@ preference the store already manages. const sameSnapshot = mountedTurn === report.turn && mountedGameId === gameId && - handle !== null && - handle.getMode() === mode; + handle !== null; if (sameSnapshot) { + // Apply wrap-mode flips in-place via the renderer's own + // `setMode` — a full re-mount is unnecessary (the world, + // primitives, and camera are unchanged) and Pixi 8 does + // not reliably re-init on the same canvas (the symptom is + // a crashed tab when the wrap-mode radio fires). + if (handle !== null && handle.getMode() !== mode) { + untrack(() => { + handle?.setMode(mode); + }); + } // Always re-apply hide set + fog on a same-snapshot pass: // toggle flips bypass the extras fingerprint when they // only change which baked-world primitives are hidden,