Hello Stoyo,
When I perform a new layout operation, sometims occurs that some boxes go out of visible bounds.
I try to use the best fit to zoom, let's say... it works, but I do not want to zoom when there is enouth room to view all the nodes!
I thought: why I cannot move all node ( i.e. panning) so that the center of the diagram will result in the center of my visible area?
So that, I try to write my own bestFit procedure:
First I found a rectangle that can contain all nodes, by finding the min (top, left) and the max(bottom,right) of all nodes; then I calculate the offset (x and y) between the center of the visible area and the center of my min-max rectangle;
then.... I try to move oll the nodes by this offset.
This solution works

....but only if there are no group /subordinate nodes,

because in this case some node are moved twice or more, with the result that the layout is changed in shape....
I even thought to try to select all nodes.....then mode them together... as I could manually do... but I found no Selection.moveto method...

any suggestion?
best regards
Franco