Skip to content

Commit 5f83367

Browse files
committed
fix(minimap): pass missing minimap node props
1 parent c9a1c5b commit 5f83367

File tree

3 files changed

+16
-3
lines changed

3 files changed

+16
-3
lines changed

packages/minimap/src/MiniMap.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,8 @@ export default {
224224
:key="node.id"
225225
:position="node.computedPosition"
226226
:dimensions="node.dimensions"
227+
:selected="node.selected"
228+
:dragging="node.dragging"
227229
:style="node.style"
228230
:class="nodeClassNameFunc(node)"
229231
:color="nodeColorFunc(node)"

packages/minimap/src/MiniMapNode.ts

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,19 @@ import { MiniMapSlots } from './types'
66
export default defineComponent({
77
name: 'MiniMapNode',
88
compatConfig: { MODE: 3 },
9-
props: ['id', 'position', 'dimensions', 'strokeWidth', 'strokeColor', 'borderRadius', 'color', 'shapeRendering', 'type'],
9+
props: [
10+
'id',
11+
'type',
12+
'selected',
13+
'dragging',
14+
'position',
15+
'dimensions',
16+
'borderRadius',
17+
'color',
18+
'shapeRendering',
19+
'strokeColor',
20+
'strokeWidth',
21+
],
1022
emits: ['click', 'dblclick', 'mouseenter', 'mousemove', 'mouseleave'],
1123
setup(props: MiniMapNodeProps, { attrs, emit }) {
1224
const miniMapSlots: Slots = inject(MiniMapSlots)!
@@ -21,7 +33,7 @@ export default defineComponent({
2133

2234
return h('rect', {
2335
id: props.id,
24-
class: ['vue-flow__minimap-node', attrs.class].join(' '),
36+
class: ['vue-flow__minimap-node', attrs.class, { selected: props.selected, dragging: props.dragging }].join(' '),
2537
style,
2638
x: props.position.x,
2739
y: props.position.y,

packages/minimap/src/types.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ export interface MiniMapProps {
5050
export interface MiniMapNodeProps {
5151
id: string
5252
type: string
53-
parentNode?: string
5453
selected?: boolean
5554
dragging?: boolean
5655
position: XYPosition

0 commit comments

Comments
 (0)