Skip to content

Commit f45ca37

Browse files
authored
fix(minimap): filter hidden nodes from bounds (#1808)
* fix(minimap): filter hidden nodes from bounds Signed-off-by: braks <[email protected]> * chore(changeset): add Signed-off-by: braks <[email protected]> --------- Signed-off-by: braks <[email protected]>
1 parent f49e509 commit f45ca37

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.changeset/thick-owls-double.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@vue-flow/minimap": patch
3+
---
4+
5+
Filter hidden nodes from minimap bounds

packages/minimap/src/MiniMap.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ const nodeClassNameFunc = computed<MiniMapNodeFunc>(() =>
6161
typeof nodeClassName === 'string' ? () => nodeClassName : typeof nodeClassName === 'function' ? nodeClassName : () => '',
6262
)
6363
64-
const bb = computed(() => getRectOfNodes(getNodesInitialized.value))
64+
const bb = computed(() => getRectOfNodes(getNodesInitialized.value.filter((node) => !node.hidden)))
6565
6666
const viewBB = computed(() => ({
6767
x: -viewport.value.x / viewport.value.zoom,

0 commit comments

Comments
 (0)