fix(minimap): bind attrs to minimap node (#1754)

* fix(minimap): bind attrs to minimap node

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-17 16:35:07 +01:00
parent a277ca3c84
commit acdd1ad8b0
2 changed files with 12 additions and 1 deletions
+5
View File
@@ -0,0 +1,5 @@
---
"@vue-flow/minimap": patch
---
Bind attributes to minimap node elements.
+7 -1
View File
@@ -39,16 +39,22 @@ function onMouseLeave(event: MouseEvent) {
export default { export default {
name: 'MiniMapNode', name: 'MiniMapNode',
compatConfig: { MODE: 3 }, compatConfig: { MODE: 3 },
inheritAttrs: false,
} }
</script> </script>
<template> <template>
<template v-if="!hidden && dimensions.width !== 0 && dimensions.height !== 0"> <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, ...$attrs }"
/>
<rect <rect
v-else v-else
:id="id" :id="id"
v-bind="$attrs"
class="vue-flow__minimap-node" class="vue-flow__minimap-node"
:class="{ selected, dragging }" :class="{ selected, dragging }"
:x="position.x" :x="position.x"