Reorder and align the elements and the diagram

Hi, I would like to ask if you know about some function that can be invoked and that re allign or reorder the entire diagram in bpmnjs.
I recursively add other element to the diagram and in the end the entire diagram is a mess.
So… exists some function that can help me?
Thank in advance for the answer.

Please share a running / prototypical example that clearly shows what you’re trying to achieve, what is working and what is not.

Use our existing starter projects to quickly hack it or share your existing, partial solution on GitHub or via a CodeSandbox. Provide the necessary pointers that allow us to quickly understand where you got stuck.

This way we may be able to help you in a constructive manner.

Thanks :heart: