-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix state diagrams export #227
base: master
Are you sure you want to change the base?
Conversation
685edd2
to
9000155
Compare
capellambse/svg/decorations.py
Outdated
start_anchored = { | ||
"LogicalComponent", | ||
"LogicalActor", | ||
"LogicalHumanActor", | ||
"LogicalHumanComponent", | ||
"ModeRegion", | ||
} | ||
left_aligned = {"ModeRegion"} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we change the text alignment setting to be a property in capstyle.STYLES
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We moved all text based decoration rules into diagram.capstyle.STYLES
. Please have a look again. And tell me if you like this or not.
9fd4266
to
08856d8
Compare
Before text placement was always centric. Now based on a new `text_style` keyed `text_align` in `diagram.capstyle.STYLES` it is decided when text is placed with a default margin (5) or bigger for centric position. - Additionally all text stylings were moved from `decorations` into `diagram.capstyle.STYLES`. - Additionally `helpers.check_for_horizontal_overflow` was changed to do only what its name suggests. Margin calculation were moved outside into `render_hbounded_lines`.
…iagrams - Changed TestModel 5.0 and 5.2
08856d8
to
25b9cd0
Compare
This PR solves #221 by aligning region text correctly and gathering the whole
StateTransition
label text from thename
attribute on the diagram element in the factory in theaird.parser module
. The changes to the svg submodule allow for adding class names when we encounter any other elements that need left-alignment of text instead of the default centric placement.