fix(minimap): hide minimap node if graph node is hidden (#1739)

* fix(minimap): hide minimap node if graph node is hidden

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-01-12 10:05:01 +01:00
parent 6f3ed67463
commit 0a0d8af16c
4 changed files with 31 additions and 22 deletions
+5
View File
@@ -0,0 +1,5 @@
---
"@vue-flow/minimap": patch
---
Hide minimap node when graph node is hidden.
+1
View File
@@ -244,6 +244,7 @@ export default {
:stroke-width="nodeStrokeWidth" :stroke-width="nodeStrokeWidth"
:shape-rendering="shapeRendering" :shape-rendering="shapeRendering"
:type="node.type" :type="node.type"
:hidden="node.hidden"
@click="onNodeClick($event, node)" @click="onNodeClick($event, node)"
@dblclick="onNodeDblClick($event, node)" @dblclick="onNodeDblClick($event, node)"
@mouseenter="onNodeMouseEnter($event, node)" @mouseenter="onNodeMouseEnter($event, node)"
+2
View File
@@ -43,6 +43,7 @@ export default {
</script> </script>
<template> <template>
<template v-if="!hidden && dimensions.width !== 0 && dimensions.height !== 0">
<component :is="miniMapSlots[`node-${props.type}`]" v-if="miniMapSlots[`node-${props.type}`]" v-bind="props" /> <component :is="miniMapSlots[`node-${props.type}`]" v-if="miniMapSlots[`node-${props.type}`]" v-bind="props" />
<rect <rect
@@ -67,3 +68,4 @@ export default {
@mouseleave="onMouseLeave" @mouseleave="onMouseLeave"
/> />
</template> </template>
</template>
+1
View File
@@ -58,6 +58,7 @@ export interface MiniMapNodeProps {
shapeRendering?: ShapeRendering shapeRendering?: ShapeRendering
strokeColor?: string strokeColor?: string
strokeWidth?: number strokeWidth?: number
hidden?: boolean
} }
export interface MiniMapEmits { export interface MiniMapEmits {