jerosoler / Drawflow

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

Prevent double click event of connection #166

Closed ishpreetkaurwebner closed 3 years ago

ishpreetkaurwebner commented 3 years ago

Double click of connection is creating a problem.

Original flow is:

image

On double click the connection between Existing Deal and Send Email node, connection becomes as shown in following screenshot:

image

Whether any event exists for such change in this library? How to stop such weird change on double click of connection?

Thanks a lot for quick reply until now.

jerosoler commented 3 years ago

Hello @ishpreetkaurwebner

In the demo do you have the same problem? https://jerosoler.github.io/Drawflow/

Do you use?

editor.reroute = true;
editor.reroute_fix_curvature = true;

I guess it could be prevented with the "click" event. Or add eventlistener to drawflow parent.

ishpreetkaurwebner commented 3 years ago

Hello @ishpreetkaurwebner

In the demo do you have the same problem? https://jerosoler.github.io/Drawflow/

Do you use?

editor.reroute = true;
editor.reroute_fix_curvature = true;

I guess it could be prevented with the "click" event. Or add eventlistener to drawflow parent.

Yes, I have used these lines and my issue is not same as demo you are showing. Demo is working fine. My problem is: On double click, connection becomes two separate lines, one line is attached to output bubble of first node, and second line is attached to input bubble of second node.

ishpreetkaurwebner commented 3 years ago

@jerosoler - It will be better if on double click, nothing will change, the change happens in demo, that is also not our requirement. Can you give idea on which drawflow event, I can prevent any change?

ishpreetkaurwebner commented 3 years ago

@jerosoler Thanks a lot for your quick reply. With your hint: editor.reroute = false;, my problem is solved.