structurizr-python
structurizr-python copied to clipboard
How to enable auto layout
Checklist
- [ ] I searched the documentation.
- [ ] I looked through similar issues on GitHub.
- [ ] I looked up "How to do ... in structurizr-python" on a search engine.
Question
Hi, is it currently already somehow possible to use the auto-layout functionality for the diagrams, and if yes, how can I do that?
Thanks, Falko
Hey @falko-burghausen,
My own workflow has typically been to create a workspace, upload it, and then use the workspace editor interface to layout diagrams with a mix of auto and manual layouts. Are you saying that you would like automatic layouts to be applied via the API? Is this possible?
Are you saying that you would like automatic layouts to be applied via the API? Is this possible?
There's an enableAutomaticLayout()
method on the Java version of the View
class that sets a property called automaticLayout
... it's just an object with a few properties. This is used by the web-based rendering engine, which subsequently uses this information to initiate the auto-layout algorithm, so the Python client library doesn't need to implement any auto-layout algorithms itself. Hope that helps!
See also #65.
Ah, thank you for the clarification Simon. That actually looks quite manageable in terms of implementation.