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