Closed ejudgie closed 5 years ago
Layout is based on the "spring layout" algorithm which uses random numbers in certain parts of the algorithm.
"Layout UML Optimally" runs multiple "normal" layouts and then chooses the one with the least line and shape overlaps (plus other criteria) before sending that best layout to the shape overlap removal stage.
See perhaps
It might be possible to get deterministic results by force seeding the random number generator before each layout. That approach would have to be weighed against the benefit of being able to run layout a few times (whether normal or optimal) to get possible improved layouts.
There is a menu command (and hot key) to save and restore the current layout, which is handy when running layouts, just in case the new layout is not as good as the one you already have.
Sent from my iPad
On 16 May 2019, at 5:43 am, Edward Judge notifications@github.com wrote:
How come selecting "Layout UML Optimally" alway generates a new layout. I was assuming it would alway reorganize the same way.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.
Thanks for the quick reply.
Are these the "Remember/Restore Layout" options?
Does the layout already get saved when you save to file or do you need to "Remember Layout" first?
Are these the "Remember/Restore Layout" options?
Yes. Does the layout already get saved when you save to file or do you need to "Remember Layout" first?
Your diagrams get saved as they appear when you select save. No need to select Remember layout.
Layouts also are preserved as much as possible when importing the same source code again. This is useful when updating UML classes with the latest changes in source code, which might add, rename or remove methods, attributes.
Thanks.
How come selecting "Layout UML Optimally" alway generates a new layout. I was assuming it would alway reorganize the same way.