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:25:44 +01:00
parent a277ca3c84
commit acdd1ad8b0
2 changed files with 12 additions and 1 deletions

View File

@@ -0,0 +1,5 @@
---
"@vue-flow/minimap": patch
---
Bind attributes to minimap node elements.

View File

@@ -39,16 +39,22 @@ function onMouseLeave(event: MouseEvent) {
export default {
name: 'MiniMapNode',
compatConfig: { MODE: 3 },
inheritAttrs: false,
}
</script>
<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, ...$attrs }"
/>
<rect
v-else
:id="id"
v-bind="$attrs"
class="vue-flow__minimap-node"
:class="{ selected, dragging }"
:x="position.x"