How to arrange the elements in a certain order

How to automatically arrange the positions of the elements in the flowchart in a certain order after adding or modifying the nodes.
For example, users can use a button or other methods to make these elements automatically arranged in order, and do not let them

Layouting is a non trivial topic that we do not have a built-in solution for.

We do offer moving elements programmatically and any solution should be built upon these APIs.

If you came up with something usable and robust, please share it. We are open to contributions.