jerosoler / Drawflow

Simple flow library 🖥️🖱️
https://jerosoler.github.io/Drawflow/
MIT License
4.78k stars 743 forks source link

Create connection on drop over node #679

Closed vartakshreyas closed 1 year ago

vartakshreyas commented 1 year ago

Hi

I am using your package in angular and i must say that its a very good packge. Currentlly i got a requirement from client side and i am asking your help for same.

The requirement is: Can we create a connection between two node after drop anywhere on node destination node?

I go through github conversations on same but i didn't get any reference. Could you please give me any reference to achive that?

jerosoler commented 1 year ago

View this issues:

vartakshreyas commented 1 year ago

Thanks for the quick reply. But i am not looking for this kind of solution.

My scenario is: I have two nodes in editor and i am starting connection from output of first node. but instead of drop on input of second node, i am dropping it in middle of node area. In this case, is it possible to create connection between those nodes?

or can i get id of that node on which i have droped connection string?

here is the reference video for my query https://user-images.githubusercontent.com/42171629/231441849-69e2f1fd-fdaa-4f74-8449-761b072d7203.mp4

jerosoler commented 1 year ago

Just apply this option

Use:

editor.force_first_input = true;
vartakshreyas commented 1 year ago

Thats work like a magic...Thank you very much