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:
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"@vue-flow/minimap": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Filter hidden nodes from minimap bounds
|
||||||
@@ -61,7 +61,7 @@ const nodeClassNameFunc = computed<MiniMapNodeFunc>(() =>
|
|||||||
typeof nodeClassName === 'string' ? () => nodeClassName : typeof nodeClassName === 'function' ? nodeClassName : () => '',
|
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(() => ({
|
const viewBB = computed(() => ({
|
||||||
x: -viewport.value.x / viewport.value.zoom,
|
x: -viewport.value.x / viewport.value.zoom,
|
||||||
|
|||||||
Reference in New Issue
Block a user