egui_node_graph
egui_node_graph copied to clipboard
Reverse order of id's in `iter_connections`
iter_connections current returns an iterator of (InputId, OutputId). I believe it would be more consistent to return (OutputId, InputId), and it matches the direction of connections in the graph.
On the other hand it's a bit of an unnecessary breaking change, but it's caught by the type system, and I think this library is young enough that it's worth it.
This was inspired by @philpax 's comment here. I did this here 32aa8d3f00c309e50de407b8c726f8e13785a281, but it will conflict with #30, so waiting on that to make a PR.
Sorry about how inter-connected all my proposed changes are :laughing:
Indeed, my original idea was to always go Output -> Input, which is the natural order you'd fetch dependencies from, so iter_connections is kind of backwards.
Since InputId and OutputId are typed, this change is breaking but not silently, users will get a clear error and know what to do, so I don't see any issues with it. It's very early for this library so we can afford breaking some APIs for consistency :smile:
Feel free to include this as part of #30 if that helps avoid the conflicts