@@ -3315,7 +3315,15 @@ export class LGraphCanvas
3315
3315
3316
3316
if ( slot && linkConnector . isInputValidDrop ( node , slot ) ) {
3317
3317
highlightInput = slot
3318
- highlightPos = node . getInputSlotPos ( slot )
3318
+ if ( LiteGraph . vueNodesMode ) {
3319
+ const idx = node . inputs . indexOf ( slot )
3320
+ highlightPos =
3321
+ idx !== - 1
3322
+ ? getSlotPosition ( node , idx , true )
3323
+ : node . getInputSlotPos ( slot )
3324
+ } else {
3325
+ highlightPos = node . getInputSlotPos ( slot )
3326
+ }
3319
3327
linkConnector . overWidget = overWidget
3320
3328
}
3321
3329
}
@@ -3327,7 +3335,9 @@ export class LGraphCanvas
3327
3335
const result = node . findInputByType ( firstLink . fromSlot . type )
3328
3336
if ( result ) {
3329
3337
highlightInput = result . slot
3330
- highlightPos = node . getInputSlotPos ( result . slot )
3338
+ highlightPos = LiteGraph . vueNodesMode
3339
+ ? getSlotPosition ( node , result . index , true )
3340
+ : node . getInputSlotPos ( result . slot )
3331
3341
}
3332
3342
} else if (
3333
3343
inputId != - 1 &&
@@ -3352,7 +3362,9 @@ export class LGraphCanvas
3352
3362
if ( inputId === - 1 && outputId === - 1 ) {
3353
3363
const result = node . findOutputByType ( firstLink . fromSlot . type )
3354
3364
if ( result ) {
3355
- highlightPos = node . getOutputPos ( result . index )
3365
+ highlightPos = LiteGraph . vueNodesMode
3366
+ ? getSlotPosition ( node , result . index , false )
3367
+ : node . getOutputPos ( result . index )
3356
3368
}
3357
3369
} else {
3358
3370
// check if I have a slot below de mouse
@@ -5617,7 +5629,9 @@ export class LGraphCanvas
5617
5629
const { link, inputNode, input } = resolved
5618
5630
if ( ! inputNode || ! input ) continue
5619
5631
5620
- const endPos = inputNode . getInputPos ( link . target_slot )
5632
+ const endPos : Point = LiteGraph . vueNodesMode
5633
+ ? getSlotPosition ( inputNode , link . target_slot , true )
5634
+ : inputNode . getInputPos ( link . target_slot )
5621
5635
5622
5636
this . #renderAllLinkSegments(
5623
5637
ctx ,
@@ -5642,7 +5656,9 @@ export class LGraphCanvas
5642
5656
const { link, outputNode, output } = resolved
5643
5657
if ( ! outputNode || ! output ) continue
5644
5658
5645
- const startPos = outputNode . getOutputPos ( link . origin_slot )
5659
+ const startPos : Point = LiteGraph . vueNodesMode
5660
+ ? getSlotPosition ( outputNode , link . origin_slot , false )
5661
+ : outputNode . getOutputPos ( link . origin_slot )
5646
5662
5647
5663
this . #renderAllLinkSegments(
5648
5664
ctx ,
@@ -5707,7 +5723,9 @@ export class LGraphCanvas
5707
5723
if ( ! node ) continue
5708
5724
5709
5725
const startPos = firstReroute . pos
5710
- const endPos = node . getInputPos ( link . target_slot )
5726
+ const endPos : Point = LiteGraph . vueNodesMode
5727
+ ? getSlotPosition ( node , link . target_slot , true )
5728
+ : node . getInputPos ( link . target_slot )
5711
5729
const endDirection = node . inputs [ link . target_slot ] ?. dir
5712
5730
5713
5731
firstReroute . _dragging = true
@@ -5726,7 +5744,9 @@ export class LGraphCanvas
5726
5744
const node = graph . getNodeById ( link . origin_id )
5727
5745
if ( ! node ) continue
5728
5746
5729
- const startPos = node . getOutputPos ( link . origin_slot )
5747
+ const startPos : Point = LiteGraph . vueNodesMode
5748
+ ? getSlotPosition ( node , link . origin_slot , false )
5749
+ : node . getOutputPos ( link . origin_slot )
5730
5750
const endPos = reroute . pos
5731
5751
const startDirection = node . outputs [ link . origin_slot ] ?. dir
5732
5752
0 commit comments