miroiu / nodify

Highly performant and modular controls for node-based editors designed for data-binding and MVVM.
https://miroiu.github.io/nodify
MIT License
1.27k stars 205 forks source link

Added support for vertical connectors (mixed connections) #99

Closed miroiu closed 4 months ago

miroiu commented 4 months ago

📝 Description of the Change

Added support for vertical connections to address #98

image

🐛 Possible Drawbacks

Increased connection drawing complexity.

hendrikp commented 4 months ago

Yes, thats pretty much how i did it, i just split it to TargetVertical, SourceVertical e.g. if done through your enum maybe TargetOrientation and SourceOrientation. Then i differentiated between source/target point for the calculation and used them where appropriate (thus allowing flow from one orientation to another). If you want i can submit an extension to this PR. in that regard.

miroiu commented 4 months ago

That would be awesome! I'm curious if you implemented this for all the existing connections or only for the default one, and if they still work like before for horizontal SourceOrientation and TargetOrientation.

hendrikp commented 4 months ago

hm yeah ill make sure they work the same - the default one definitely did, i tested on the bezier one, the line one should be easy, ill have to see about circuit.

hendrikp commented 4 months ago

See #100 had to create a stacked PR due to rights.