Skip to content

Commit

Permalink
merge: Merge pull request #57 from DSD-DBS/fix-junction-styling
Browse files Browse the repository at this point in the history
docs(styling): Fix red junction bug
  • Loading branch information
ewuerger authored Nov 3, 2023
2 parents 8e3ce6d + c17e856 commit cb625eb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion capellambse_context_diagrams/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ class ContextDiagram(diagram.AbstractDiagram):
The diagram class (for e.g. [LAB]).
render_styles
Dictionary with the `ElkChildType` in str format as keys and
`styling.Styler` functions as values. An exanple is given by:
`styling.Styler` functions as values. An example is given by:
[`styling.BLUE_ACTOR_FNCS`][capellambse_context_diagrams.styling.BLUE_ACTOR_FNCS]
display_symbols_as_boxes
Display objects that are normally displayed as symbol as a
Expand Down
4 changes: 2 additions & 2 deletions docs/extras/styling.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,10 @@ Style your diagram elements ([ElkChildType][capellambse_context_diagrams.seriali
from capellambse import aird
from capellambse_context_diagrams import styling

diag = model.by_uuid("957c5799-1d4a-4ac0-b5de-33a65bf1519c").context_diagram
diag = model.by_uuid("a5642060-c9cc-4d49-af09-defaa3024bae").context_diagram
diag.render_styles = dict(
styling.BLUE_ACTOR_FNCS,
junction=lambda obj, serializer: {"fill": aird.RGB(220, 20, 60)},
junction=lambda obj, serializer: {"stroke": aird.RGB(220, 20, 60)},
)
diag.render("svgdiagram").save_drawing(pretty=True)
```
Expand Down

0 comments on commit cb625eb

Please sign in to comment.