fix(minimap): pass missing minimap node props

This commit is contained in:
braks
2023-08-21 17:44:20 +02:00
committed by Braks
parent c9a1c5b2fb
commit 5f8336747a
3 changed files with 16 additions and 3 deletions
+2
View File
@@ -224,6 +224,8 @@ export default {
:key="node.id"
:position="node.computedPosition"
:dimensions="node.dimensions"
:selected="node.selected"
:dragging="node.dragging"
:style="node.style"
:class="nodeClassNameFunc(node)"
:color="nodeColorFunc(node)"
+14 -2
View File
@@ -6,7 +6,19 @@ import { MiniMapSlots } from './types'
export default defineComponent({
name: 'MiniMapNode',
compatConfig: { MODE: 3 },
props: ['id', 'position', 'dimensions', 'strokeWidth', 'strokeColor', 'borderRadius', 'color', 'shapeRendering', 'type'],
props: [
'id',
'type',
'selected',
'dragging',
'position',
'dimensions',
'borderRadius',
'color',
'shapeRendering',
'strokeColor',
'strokeWidth',
],
emits: ['click', 'dblclick', 'mouseenter', 'mousemove', 'mouseleave'],
setup(props: MiniMapNodeProps, { attrs, emit }) {
const miniMapSlots: Slots = inject(MiniMapSlots)!
@@ -21,7 +33,7 @@ export default defineComponent({
return h('rect', {
id: props.id,
class: ['vue-flow__minimap-node', attrs.class].join(' '),
class: ['vue-flow__minimap-node', attrs.class, { selected: props.selected, dragging: props.dragging }].join(' '),
style,
x: props.position.x,
y: props.position.y,
-1
View File
@@ -50,7 +50,6 @@ export interface MiniMapProps {
export interface MiniMapNodeProps {
id: string
type: string
parentNode?: string
selected?: boolean
dragging?: boolean
position: XYPosition