From ec096149d724b5a1a1e4f2316864e8eb849ac048 Mon Sep 17 00:00:00 2001 From: huyenngn Date: Mon, 18 Nov 2024 19:06:04 +0100 Subject: [PATCH] fix: Straighten target edge --- capellambse_context_diagrams/collectors/custom.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/capellambse_context_diagrams/collectors/custom.py b/capellambse_context_diagrams/collectors/custom.py index 8b66be2..1c97519 100644 --- a/capellambse_context_diagrams/collectors/custom.py +++ b/capellambse_context_diagrams/collectors/custom.py @@ -5,6 +5,7 @@ from __future__ import annotations import collections.abc as cabc +import copy import typing as t import capellambse.model as m @@ -54,6 +55,10 @@ def __init__( def __call__(self) -> _elkjs.ELKInputData: self._make_target(self.target) + if target_edge := self.edges.get(self.target.uuid): + target_edge.layoutOptions = copy.deepcopy( + _elkjs.EDGE_STRAIGHTENING_LAYOUT_OPTIONS + ) if not self.instructions: return self._get_data() if self.diagram._unify_edge_direction == "UNIFORM":