Fix svelte minimap if all nodes are hidden

This commit is contained in:
Alessandro
2025-10-14 10:22:30 +02:00
parent f55a9b2361
commit 4f77447ab5

View File

@@ -60,8 +60,11 @@
width: store.width / store.viewport.zoom,
height: store.height / store.viewport.zoom
});
const hasVisibleNodes = $derived(store.nodeLookup.size > 0 && store.nodes.some((n) => !n.hidden));
let boundingRect = $derived(
store.nodeLookup.size > 0
hasVisibleNodes
? getBoundsOfRects(
getInternalNodesBounds(store.nodeLookup, { filter: (n) => !n.hidden }),
viewBB