fix(minimap): pass missing minimap node props
This commit is contained in:
@@ -224,6 +224,8 @@ export default {
|
|||||||
:key="node.id"
|
:key="node.id"
|
||||||
:position="node.computedPosition"
|
:position="node.computedPosition"
|
||||||
:dimensions="node.dimensions"
|
:dimensions="node.dimensions"
|
||||||
|
:selected="node.selected"
|
||||||
|
:dragging="node.dragging"
|
||||||
:style="node.style"
|
:style="node.style"
|
||||||
:class="nodeClassNameFunc(node)"
|
:class="nodeClassNameFunc(node)"
|
||||||
:color="nodeColorFunc(node)"
|
:color="nodeColorFunc(node)"
|
||||||
|
|||||||
@@ -6,7 +6,19 @@ import { MiniMapSlots } from './types'
|
|||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: 'MiniMapNode',
|
name: 'MiniMapNode',
|
||||||
compatConfig: { MODE: 3 },
|
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'],
|
emits: ['click', 'dblclick', 'mouseenter', 'mousemove', 'mouseleave'],
|
||||||
setup(props: MiniMapNodeProps, { attrs, emit }) {
|
setup(props: MiniMapNodeProps, { attrs, emit }) {
|
||||||
const miniMapSlots: Slots = inject(MiniMapSlots)!
|
const miniMapSlots: Slots = inject(MiniMapSlots)!
|
||||||
@@ -21,7 +33,7 @@ export default defineComponent({
|
|||||||
|
|
||||||
return h('rect', {
|
return h('rect', {
|
||||||
id: props.id,
|
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,
|
style,
|
||||||
x: props.position.x,
|
x: props.position.x,
|
||||||
y: props.position.y,
|
y: props.position.y,
|
||||||
|
|||||||
@@ -50,7 +50,6 @@ export interface MiniMapProps {
|
|||||||
export interface MiniMapNodeProps {
|
export interface MiniMapNodeProps {
|
||||||
id: string
|
id: string
|
||||||
type: string
|
type: string
|
||||||
parentNode?: string
|
|
||||||
selected?: boolean
|
selected?: boolean
|
||||||
dragging?: boolean
|
dragging?: boolean
|
||||||
position: XYPosition
|
position: XYPosition
|
||||||
|
|||||||
Reference in New Issue
Block a user