Skip to content

Commit

Permalink
use XLabel for Ortho edges (#96) (#103)
Browse files Browse the repository at this point in the history
  • Loading branch information
kukimik authored Jan 18, 2024
1 parent 90ca649 commit d3c8406
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion app/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,12 @@ dotER conf er = graph' $ do
relToEdge n r = edge (entity1 r) (entity2 r) (label:eAttr n)
where
optss = roptions r
label = A.Label $ A.HtmlLabel $ H.Text $ withLabelFmt " %s " optss []
labelOrXLabel =
case fromConfigOrDefault edgeType of
A.Ortho -> A.XLabel -- Graphivz recommends xlabels for ortho edges
_ -> A.Label
label =
labelOrXLabel . A.HtmlLabel . H.Text $ withLabelFmt " %s " optss []
(c1,c2) = (card1 r, card2 r)
eAttr UML = [A.TailLabel $ card2label c1
,A.HeadLabel $ card2label c2
Expand Down

0 comments on commit d3c8406

Please sign in to comment.