@@ -37,8 +37,6 @@ const NodeWrapper = defineComponent({
37
37
compatConfig : { MODE : 3 } ,
38
38
props : [ 'id' , 'resizeObserver' ] ,
39
39
setup ( props : Props ) {
40
- provide ( NodeId , props . id )
41
-
42
40
const {
43
41
id : vueFlowId ,
44
42
noPanClassName,
@@ -64,16 +62,17 @@ const NodeWrapper = defineComponent({
64
62
nodesFocusable,
65
63
} = useVueFlow ( )
66
64
65
+ const nodeElement = ref < HTMLDivElement | null > ( null )
66
+ provide ( NodeRef , nodeElement )
67
+ provide ( NodeId , props . id )
68
+
67
69
const slots = inject ( Slots )
68
70
69
71
const instance = getCurrentInstance ( )
70
72
71
73
const updateNodePositions = useUpdateNodePositions ( )
72
74
73
- const { node, parentNode, connectedEdges } = useNode ( props . id )
74
-
75
- const nodeElement = ref < HTMLDivElement | null > ( null )
76
- provide ( NodeRef , nodeElement )
75
+ const { node, parentNode } = useNode ( props . id )
77
76
78
77
const isDraggable = toRef ( ( ) => ( typeof node . draggable === 'undefined' ? nodesDraggable . value : node . draggable ) )
79
78
@@ -333,28 +332,28 @@ const NodeWrapper = defineComponent({
333
332
334
333
function onMouseEnter ( event : MouseEvent ) {
335
334
if ( ! dragging ?. value ) {
336
- emit . mouseEnter ( { event, node, connectedEdges : connectedEdges . value } )
335
+ emit . mouseEnter ( { event, node } )
337
336
}
338
337
}
339
338
340
339
function onMouseMove ( event : MouseEvent ) {
341
340
if ( ! dragging ?. value ) {
342
- emit . mouseMove ( { event, node, connectedEdges : connectedEdges . value } )
341
+ emit . mouseMove ( { event, node } )
343
342
}
344
343
}
345
344
346
345
function onMouseLeave ( event : MouseEvent ) {
347
346
if ( ! dragging ?. value ) {
348
- emit . mouseLeave ( { event, node, connectedEdges : connectedEdges . value } )
347
+ emit . mouseLeave ( { event, node } )
349
348
}
350
349
}
351
350
352
351
function onContextMenu ( event : MouseEvent ) {
353
- return emit . contextMenu ( { event, node, connectedEdges : connectedEdges . value } )
352
+ return emit . contextMenu ( { event, node } )
354
353
}
355
354
356
355
function onDoubleClick ( event : MouseEvent ) {
357
- return emit . doubleClick ( { event, node, connectedEdges : connectedEdges . value } )
356
+ return emit . doubleClick ( { event, node } )
358
357
}
359
358
360
359
function onSelectNode ( event : MouseEvent ) {
@@ -370,7 +369,7 @@ const NodeWrapper = defineComponent({
370
369
)
371
370
}
372
371
373
- emit . click ( { event, node, connectedEdges : connectedEdges . value } )
372
+ emit . click ( { event, node } )
374
373
}
375
374
376
375
function onKeyDown ( event : KeyboardEvent ) {
0 commit comments