diff --git a/capellambse_context_diagrams/context.py b/capellambse_context_diagrams/context.py index 940ad1dc..174c6d77 100644 --- a/capellambse_context_diagrams/context.py +++ b/capellambse_context_diagrams/context.py @@ -512,8 +512,8 @@ def _create_diagram(self, params: dict[str, t.Any]) -> cdiagram.Diagram: params.setdefault( "search_direction", params.get("search_direction", "ALL") ) - params.setdefault("show_owners", params.get("show_owners", True)) - params.setdefault("layer_sizing", params.get("layer_sizing", "WIDTH")) + params.setdefault("show_owners", True) + params.setdefault("layer_sizing", "WIDTH") data, edges = realization_view.collector(self, params) layout = try_to_layout(data) adjust_layer_sizing(data, layout, params["layer_sizing"]) diff --git a/docs/gen_images.py b/docs/gen_images.py index 4540540e..c09bfe8a 100644 --- a/docs/gen_images.py +++ b/docs/gen_images.py @@ -132,18 +132,16 @@ def generate_realization_view_images() -> None: diag = obj.realization_view for layer_sizing in ("UNION", "HEIGHT", "WIDTH", "INDIVIDUAL"): with mkdocs_gen_files.open( - f"{str(dest / diag.name)} {layer_sizing}.svg", "w" + str(dest / f"{diag.name} {layer_sizing}.svg"), "wb" ) as fd: - print( - diag.render( - "svg", - depth=3, - search_direction="ALL", - show_owners=True, - transparent_background=False, - layer_sizing=layer_sizing, - ), - file=fd, + diag.save( + fd, + "svg", + depth=3, + search_direction="ALL", + show_owners=True, + transparent_background=False, + layer_sizing=layer_sizing, )