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:
5
.changeset/tough-taxis-tan.md
Normal file
5
.changeset/tough-taxis-tan.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@vue-flow/minimap": patch
|
||||
---
|
||||
|
||||
Bind attributes to minimap node elements.
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user