Partial auto-layout


#1

It is possible to make a partial auto-layout using GoLayoutLayeredDigraph?

Basicaly we want 2 things:

  1. when new node or nodes are added to the document (with some links to
    other existing nodes) the node should be automatically arranged. Is
    like keeping all the other nodes fixed and only applying the algorithm
    to the new node/nodes.

  2. apply the auto-layout algorithm to a selection of nodes. All we were
    able to do if we are making this is to auto-arrange the nodes somewhere
    on the top left position of the document (practicaly this is like
    ignoring the other nodes). What we realy want is to arrange the list of
    nodes considering the other nodes as well as the links between them.

Our document contains a directed graph.

Thank you for your time


#2

The force-directed autolayout supports this, but the layered-digraph autolayout algorithm does not.
The reason for the layered-digraph not supporting that is that all too often adding a node and link, for example as the child of an existing node, really needs to move the nearby nodes around in order to make room. In fact, adding a node or a link could very well cause the graph to look completely different.
You can do what you seem to have tried–namely to layout a subset of the nodes and links. It does automatically position them all at the top-left. But if you are adding “leaves” to a tree or tree-like directed graph, you might be able to reposition the subset so that the existing node is restored to its original position.


#3

Thanks for your quick answer. More I think at it more complicated the problem seems :)

This is exactly what we want to avoid. The desired behavior is to find
place for the new nodes whereever this might be (in most cases this is
right near the parent/parents)

[QUOTE=walter]existing node is restored to its original position.[/quote] Unfortunately there are more than one existing nodes that are linked to the new ones so repositioning them is a chance (pretty big because reordering could appear) that will overlap with other nodes in the just maked partial layout.

Any idea on this issue will be greatly appreciated.