fix(minimap): filter hidden nodes from bounds (#1808)

* fix(minimap): filter hidden nodes from bounds

Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com>

* chore(changeset): add

Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com>

---------

Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
Braks
2025-03-26 09:44:32 +01:00
parent 967569aa6d
commit da6dc8bdf9
2 changed files with 6 additions and 1 deletions

View File

@@ -0,0 +1,5 @@
---
"@vue-flow/minimap": patch
---
Filter hidden nodes from minimap bounds

View File

@@ -61,7 +61,7 @@ const nodeClassNameFunc = computed<MiniMapNodeFunc>(() =>
typeof nodeClassName === 'string' ? () => nodeClassName : typeof nodeClassName === 'function' ? nodeClassName : () => '',
)
const bb = computed(() => getRectOfNodes(getNodesInitialized.value))
const bb = computed(() => getRectOfNodes(getNodesInitialized.value.filter((node) => !node.hidden)))
const viewBB = computed(() => ({
x: -viewport.value.x / viewport.value.zoom,