nodify icon indicating copy to clipboard operation
nodify copied to clipboard

[Question] Sorting the graph

Open CallumCarmicheal opened this issue 1 year ago • 1 comments

Hello I am using this project to generate a node graph of function calls in a C# project. Being that all the code is generated and not manually created by the user I was wondering if there is a simple way to sort / organise the nodes like in a Code Map where you can align everything from Left -> Right or Top -> Bottom etc.

Like this example from Visual Studio's Code Map. image

CallumCarmicheal avatar Sep 28 '23 20:09 CallumCarmicheal

Hi, it is possible to sort the graph, but it's not built in. You have access to the node's location, size and connections depending on the structure of your view-models.

However, if you'd like to do this in the view, you don't have access to the connections.

You can check the state machine example. It has an Alignment option for the current selection in the context menu. That's built in into Nodify as a command.

miroiu avatar Oct 04 '23 13:10 miroiu

Closing as not planned. Please feel free to reopen if you need more information.

miroiu avatar Apr 16 '24 12:04 miroiu

I am gonna add my 5 cents here in case anyone find this issue: for graph layouting Microsoft Automatic Graph Layout works very well (and I do agree there is no need to integrate it into Nodify, it is app specific what algorithm should be used.)

BAndysc avatar Apr 16 '24 14:04 BAndysc