Closed miroiu closed 5 months ago
This partly fixes the handling for steps, but not for backwards going connections (it still is doing the looping, while in such cases it best just switch the sides of the knot). I think in general the knot doesnt need to have a orientation but more should have like some logic to handle based on relative position to source/target connectors, where connector should ingest the connection without doing such unneeded steeps curves or or crossings.
Step connection knot handling however now at least working well (when not considering those backward facing connections):
And i just checked, the Orientation for knot nodes i take from the outgoing connector atm, that way i avoid having to have any orientation on nodes or knots.
Ok.. now I understand what you mean with the backward-going connections. It would be ideal to have something like this, but I believe it is hard to implement and probably needs a new parameter added to BaseConnection since we don't have node information inside connections:
Notice the wire flip at the end of the gif. I think it's based on node positions, rather than connectors, because it does not happen when I move the knot node unless it's considering only the start connector and end connectors, ignoring the knot connector.
For normal connection flows it's behaving the same (which would break if I changed direction based on connector position):
Screenshots are taken from Unreal Engine 5.3.2 Blueprints editor.
I wouldn't really want to try implementing this, at least for the moment, because I consider the current behavior to be sufficient for most use cases. And anyway, the library does not restrict connections to the ones provided. Creating custom connections is as simple as this:
<nodify:NodifyEditor.ConnectionTemplate>
<Line X1="{Binding Input.Anchor.X}"
Y1="{Binding Input.Anchor.Y}"
X2="{Binding Output.Anchor.X}"
Y2="{Binding Output.Anchor.Y}"
Stroke="DodgerBlue"
StrokeThickness="2" />
</nodify:NodifyEditor.ConnectionTemplate>
However, if you have time to invest in this, I'd be more than happy to review your PR.
Yeah definitly based on positions of source+target node/connector, not of orientations of either.
📝 Description of the Change
Closes #110
🐛 Possible Drawbacks
No.