jerosoler / Drawflow

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

Get nodes id on createCurvature function #752

Open matheusfnl opened 10 months ago

matheusfnl commented 10 months ago

I would like to know if there is any way to access the nodes related to the connection on the createCurvature function. I need to check the distance between those nodes, i can't use the start and end position to check because it changes based on the distance between nodes.

wrong

Thanks for the lib.

jerosoler commented 10 months ago

Hi @matheusfnl

There is no way to access the nodes in the "createCurvature" function.

You could modify it to accept incoming and outgoing nodes. But you will also have to modify all calls to createCurvature.

Other option, with positions start and finish. Detect element with position with: document.elementsFromPoint example use function: