fix(minimap): pass missing minimap node props
This commit is contained in:
@@ -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)"
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -50,7 +50,6 @@ export interface MiniMapProps {
|
||||
export interface MiniMapNodeProps {
|
||||
id: string
|
||||
type: string
|
||||
parentNode?: string
|
||||
selected?: boolean
|
||||
dragging?: boolean
|
||||
position: XYPosition
|
||||
|
||||
Reference in New Issue
Block a user