Closed DannyV14 closed 8 months ago
Review this PR:
Looks like that should work! I’ll give it a try. As always thank you so much for the quick response!
The changes in this PR, can I override the drawflow default functions with these changes in my implementation?
My recommendation is that you directly copy the file https://github.com/jerosoler/Drawflow/blob/master/src/drawflow.js
And add changes manualy.
You can add it to your project like this: https://github.com/jerosoler/Drawflow/issues/526#issuecomment-1250828930
I have read through this issue multiple times: https://github.com/jerosoler/Drawflow/issues/20 I have implemented a switch case very similar to code found in that issue.
I have three different options of curvature.
The problem I am facing is that the optimal route of the curve depends heavily on the input/output port being used. As I have four ports that are input/output ambiguous (stacked on top of each with x-index changing). Sometimes the horizontal port connecting to a top port should have no curve as the best line. Or a port across from another would be best with a center_x approach.
I have attached a very poorly drawn guide trying to demonstrate the issue. Where the curve line runs along the side of the node.
All of this to say, what do you think the best approach is here? I have looked into connection start/connection end/node moved events to try to determine the ports in use. But the createCurvature function only uses (start_x, start_y, end_x, end_y) so there are null reference possibilities by using variables existing outside of the curve function.
It is possible this is an unsolvable request. But just wanted to reach out for any potential advice!
Thanks!