Fix state diagrams export#227
Draft
ewuerger wants to merge 3 commits into
Draft
Conversation
685edd2 to
9000155
Compare
Comment on lines
+28
to
+35
| start_anchored = { | ||
| "LogicalComponent", | ||
| "LogicalActor", | ||
| "LogicalHumanActor", | ||
| "LogicalHumanComponent", | ||
| "ModeRegion", | ||
| } | ||
| left_aligned = {"ModeRegion"} |
Member
There was a problem hiding this comment.
Can we change the text alignment setting to be a property in capstyle.STYLES?
Collaborator
Author
There was a problem hiding this comment.
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 file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR solves #221 by aligning region text correctly and gathering the whole
StateTransitionlabel text from thenameattribute 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.