Skip to content

Commit

Permalink
Render lines without curves correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
ivogabe committed Jun 7, 2016
1 parent fed3d46 commit 06909bf
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/UHC/Util/CHR/Solve/TreeTrie/Visualizer.hs
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ showEdge pos (from, to, (kind, isEnd)) =
)
(text " ")
else
tag "div"
(if x1 == x2 then Emp else tag "div"
(
text "class=\"edge-ver "
>|< text className
Expand All @@ -344,10 +344,11 @@ showEdge pos (from, to, (kind, isEnd)) =
>|< "px;\""
)
(text " ")
)
>|< tag "div"
(
text "class=\"edge-hor edge-hor-"
>|< text (if x2 > x1 then "left " else "right ")
text "class=\"edge-hor"
>|< text (if x2 > x1 then " edge-hor-left " else if x2 < x1 then " edge-hor-right " else " edge-hor-no-curve ")
>|< text className
>|< text "\" style=\"top: "
>|< pp (y2 - 19)
Expand Down Expand Up @@ -461,6 +462,9 @@ styles =
\ border-bottom-right-radius: 100% 22px;\n\
\ border-right: 6px solid #578999;\n\
\}\n\
\.edge-hor-no-curve {\n\
\ border-right: 6px solid #578999;\n\
\}\n\
\.edge-end {\n\
\ position: absolute;\n\
\ height: 16px;\n\
Expand Down

0 comments on commit 06909bf

Please sign in to comment.