none
Graph is relayouted in a strange way, how to prevent this? RRS feed

  • Question

  • Hey everybody,

    I use MSAGL to dynamically build Graphs where electrical components on a pcb are connected to a net, then to another component, then again into the next net and so on.

    My Graph Settings are:
    - LayerDirection.LR
    - SugiyamaLayoutSettings


    I can create the graph as I want until a certain degree, but then, if I add a Edge back to a former node, the graph is totally rearranged and the original "order" is lost. So it is very hard to "understand" the graph if it looks always different when adding new nodes.

    Until here, everything is OK, the red Edge should be added next:

    When the red Edge is added, the graph Looks like this:

    Animated GIF:

    Has anybody an idea of how I can prevent that the Level (from left to right) of older nodes is changed when a new node/edge is added?

    (Each time when a new node is added to the graph, I call "viewer.Graph = graph;" to update/invalidate the Viewer).

    Thanks and best regards,
    Jürgen

    Friday, October 26, 2018 7:09 AM