I’m not sure how to approach this, so bear with me, please.
I’m trying to achieve a ‘dynamic’ tree layout that does not interfere with the user experience and lays out the nodes ‘locally’ without disrupting the entire tree. It’s still a tree layout, but with the ability to selectively layout individual nodes (and their children), pushing any nodes in the ‘neighborhood’ either down or to the right to make room for the new layout.
So, if the tree goes from left to right and there are existing nodes already in place, and the user repositions a node and its children into the middle of the tree, then invokes a context menu command to layout that node, the custom tree layout should push the surrounding nodes down just enough to make room for the newly laid out node and its children, leaving the other nodes where they are.
BEFORE: User is constructing the node by dragging and linking nodes to the ‘Files’ node…
AFTER: User drags the ‘Files’ node between the ‘Table’ and ‘Spreadsheet’ nodes and then invokes a custom ‘Layout’ command on the ‘Files’ node. The tree layout algorithm performs the localized tree layout (horizontal or vertical) and then pushes the ‘Spreadsheet’ node (and its children) down to make room.
Ideally, I’d like to have the sort of behavior that the Subgraph nodes provide when dragging nodes around inside them. The borders automatically adjust as the subnodes are being dragged.