Skip to content

Commit

Permalink
fix(diagrams): [sequenceDiagram] nested loop container bg rect drawin…
Browse files Browse the repository at this point in the history
…g order
  • Loading branch information
hikerpig committed Feb 28, 2024
1 parent 3984345 commit f1c4c96
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/modern-buckets-float.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@pintora/diagrams': patch
---

fix: [sequenceDiagram] nested loop container bg rect drawing order
3 changes: 2 additions & 1 deletion packages/pintora-diagrams/src/sequence/artist.ts
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,8 @@ const sequenceArtist: IDiagramArtist<SequenceDiagramIR, SequenceConf> = {
model.bumpVerticalPos(conf.participantBoxPadding)
}

rootMark.children = [...model.groupBgs, ...rootMark.children]
const reversedGroupBgs = model.groupBgs.slice().reverse()
rootMark.children = [...reversedGroupBgs, ...rootMark.children]

drawParticipantBoxes(context)

Expand Down

0 comments on commit f1c4c96

Please sign in to comment.