Fix svelte minimap if all nodes are hidden
This commit is contained in:
@@ -60,8 +60,11 @@
|
|||||||
width: store.width / store.viewport.zoom,
|
width: store.width / store.viewport.zoom,
|
||||||
height: store.height / 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(
|
let boundingRect = $derived(
|
||||||
store.nodeLookup.size > 0
|
hasVisibleNodes
|
||||||
? getBoundsOfRects(
|
? getBoundsOfRects(
|
||||||
getInternalNodesBounds(store.nodeLookup, { filter: (n) => !n.hidden }),
|
getInternalNodesBounds(store.nodeLookup, { filter: (n) => !n.hidden }),
|
||||||
viewBB
|
viewBB
|
||||||
|
|||||||
Reference in New Issue
Block a user