Skip to content

Commit acdd1ad

Browse files
committed
fix(minimap): bind attrs to minimap node (#1754)
* fix(minimap): bind attrs to minimap node Signed-off-by: braks <[email protected]> * chore(changeset): add Signed-off-by: braks <[email protected]> --------- Signed-off-by: braks <[email protected]>
1 parent a277ca3 commit acdd1ad

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

.changeset/tough-taxis-tan.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@vue-flow/minimap": patch
3+
---
4+
5+
Bind attributes to minimap node elements.

packages/minimap/src/MiniMapNode.vue

+7-1
Original file line numberDiff line numberDiff line change
@@ -39,16 +39,22 @@ function onMouseLeave(event: MouseEvent) {
3939
export default {
4040
name: 'MiniMapNode',
4141
compatConfig: { MODE: 3 },
42+
inheritAttrs: false,
4243
}
4344
</script>
4445

4546
<template>
4647
<template v-if="!hidden && dimensions.width !== 0 && dimensions.height !== 0">
47-
<component :is="miniMapSlots[`node-${props.type}`]" v-if="miniMapSlots[`node-${props.type}`]" v-bind="props" />
48+
<component
49+
:is="miniMapSlots[`node-${props.type}`]"
50+
v-if="miniMapSlots[`node-${props.type}`]"
51+
v-bind="{ ...props, ...$attrs }"
52+
/>
4853

4954
<rect
5055
v-else
5156
:id="id"
57+
v-bind="$attrs"
5258
class="vue-flow__minimap-node"
5359
:class="{ selected, dragging }"
5460
:x="position.x"

0 commit comments

Comments
 (0)