Skip to content

Commit

Permalink
fix(minimap): bind attrs to minimap node (#1754)
Browse files Browse the repository at this point in the history
* 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]>
  • Loading branch information
bcakmakoglu committed Jan 17, 2025
1 parent a277ca3 commit acdd1ad
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/tough-taxis-tan.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@vue-flow/minimap": patch
---

Bind attributes to minimap node elements.
8 changes: 7 additions & 1 deletion packages/minimap/src/MiniMapNode.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit acdd1ad

Please sign in to comment.