From be21a957ff3f90c36d6888ef90faa664014b8c25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BAlio=20C=C3=A9sar=20Batista?= Date: Fri, 2 Dec 2022 10:27:32 -0800 Subject: [PATCH] Update message zindex --- d2layouts/d2sequence/sequence_diagram.go | 1 + .../dagre/board.exp.json | 18 ++--- .../dagre/sketch.exp.svg | 2 +- .../elk/board.exp.json | 18 ++--- .../elk/sketch.exp.svg | 2 +- .../dagre/board.exp.json | 20 +++--- .../dagre/sketch.exp.svg | 2 +- .../elk/board.exp.json | 20 +++--- .../elk/sketch.exp.svg | 2 +- .../dagre/board.exp.json | 26 +++---- .../dagre/sketch.exp.svg | 2 +- .../sequence_diagram_span/elk/board.exp.json | 26 +++---- .../sequence_diagram_span/elk/sketch.exp.svg | 2 +- .../sequence_diagrams/dagre/board.exp.json | 68 +++++++++---------- .../sequence_diagrams/dagre/sketch.exp.svg | 2 +- .../sequence_diagrams/elk/board.exp.json | 68 +++++++++---------- .../sequence_diagrams/elk/sketch.exp.svg | 2 +- 17 files changed, 141 insertions(+), 140 deletions(-) diff --git a/d2layouts/d2sequence/sequence_diagram.go b/d2layouts/d2sequence/sequence_diagram.go index f42c68eed..9d70eb837 100644 --- a/d2layouts/d2sequence/sequence_diagram.go +++ b/d2layouts/d2sequence/sequence_diagram.go @@ -224,6 +224,7 @@ func (sd *sequenceDiagram) placeSpans() { // routeMessages routes horizontal edges (messages) from Src to Dst func (sd *sequenceDiagram) routeMessages() { for rank, message := range sd.messages { + message.ZIndex = 2 isLeftToRight := message.Src.TopLeft.X < message.Dst.TopLeft.X // finds the proper anchor point based on the message direction diff --git a/e2etests/testdata/stable/sequence_diagram_nested_span/dagre/board.exp.json b/e2etests/testdata/stable/sequence_diagram_nested_span/dagre/board.exp.json index 61003c046..f91a979ec 100644 --- a/e2etests/testdata/stable/sequence_diagram_nested_span/dagre/board.exp.json +++ b/e2etests/testdata/stable/sequence_diagram_nested_span/dagre/board.exp.json @@ -920,7 +920,7 @@ "animated": false, "tooltip": "", "icon": null, - "zIndex": 0 + "zIndex": 2 }, { "id": "(itemResponse.a -> item.a.b)[0]", @@ -959,7 +959,7 @@ "animated": false, "tooltip": "", "icon": null, - "zIndex": 0 + "zIndex": 2 }, { "id": "(item.a.b -> essayRubric.a.b.c)[0]", @@ -998,7 +998,7 @@ "animated": false, "tooltip": "", "icon": null, - "zIndex": 0 + "zIndex": 2 }, { "id": "(essayRubric.a.b.c -> concept.a.b.c.d)[0]", @@ -1037,7 +1037,7 @@ "animated": false, "tooltip": "", "icon": null, - "zIndex": 0 + "zIndex": 2 }, { "id": "(item.a -> essayRubric.a.b)[0]", @@ -1076,7 +1076,7 @@ "animated": false, "tooltip": "", "icon": null, - "zIndex": 0 + "zIndex": 2 }, { "id": "(concept.a.b.c.d -> itemOutcome.a.b.c.d.e)[0]", @@ -1115,7 +1115,7 @@ "animated": false, "tooltip": "", "icon": null, - "zIndex": 0 + "zIndex": 2 }, { "id": "(scorer.abc -> item.a)[0]", @@ -1154,7 +1154,7 @@ "animated": false, "tooltip": "", "icon": null, - "zIndex": 0 + "zIndex": 2 }, { "id": "(itemOutcome.a.b.c.d.e -> scorer)[0]", @@ -1193,7 +1193,7 @@ "animated": false, "tooltip": "", "icon": null, - "zIndex": 0 + "zIndex": 2 }, { "id": "(scorer -> itemResponse.c)[0]", @@ -1232,7 +1232,7 @@ "animated": false, "tooltip": "", "icon": null, - "zIndex": 0 + "zIndex": 2 }, { "id": "(scorer -- )[0]", diff --git a/e2etests/testdata/stable/sequence_diagram_nested_span/dagre/sketch.exp.svg b/e2etests/testdata/stable/sequence_diagram_nested_span/dagre/sketch.exp.svg index 6c954c961..a4cc51663 100644 --- a/e2etests/testdata/stable/sequence_diagram_nested_span/dagre/sketch.exp.svg +++ b/e2etests/testdata/stable/sequence_diagram_nested_span/dagre/sketch.exp.svg @@ -14,7 +14,7 @@ width="2516" height="1841" viewBox="-100 -50 2516 1841">scoreritemResponseitemessayRubricconceptitemOutcome scoreritemResponseitemessayRubricconceptitemOutcome scoreritemResponseitemessayRubricconceptitemOutcome scoreritemResponseitemessayRubricconceptitemOutcome AlicelinebreakerBobdbqueueanoddservicewithanameinmultiple lines Authentication Requestmake request for something that is quite far away and requires a really long label to take all the space between the objectsvalidate credentialsAuthentication ResponseAnother authentication Requestdo it later storedAnother authentication ResponseAlicelinebreakerBobdbqueueanoddservicewithanameinmultiple lines Authentication Requestmake request for something that is quite far away and requires a really long label to take all the space between the objectsvalidate credentialsAuthentication ResponseAnother authentication Requestdo it later storedAnother authentication ResponseAlicelinebreakerBobdbqueueanoddservicewithanameinmultiple lines Authentication Requestmake request for something that is quite far away and requires a really long label to take all the space between the objectsvalidate credentialsAuthentication ResponseAnother authentication Requestdo it later storedAnother authentication ResponseAlicelinebreakerBobdbqueueanoddservicewithanameinmultiple lines Authentication Requestmake request for something that is quite far away and requires a really long label to take all the space between the objectsvalidate credentialsAuthentication ResponseAnother authentication Requestdo it later storedAnother authentication ResponsescoreritemResponseitemessayRubricconceptitemOutcome getItem() itemgetRubric()rubricapplyTo(essayResp)match(essayResponse)scorenewgetNormalMinimum()getNormalMaximum()setScore(score)setFeedback(missingConcepts)scoreritemResponseitemessayRubricconceptitemOutcome getItem() itemgetRubric()rubricapplyTo(essayResp)match(essayResponse)scorenewgetNormalMinimum()getNormalMaximum()setScore(score)setFeedback(missingConcepts)scoreritemResponseitemessayRubricconceptitemOutcome getItem() itemgetRubric()rubricapplyTo(essayResp)match(essayResponse)scorenewgetNormalMinimum()getNormalMaximum()setScore(score)setFeedback(missingConcepts)scoreritemResponseitemessayRubricconceptitemOutcome getItem() itemgetRubric()rubricapplyTo(essayResp)match(essayResponse)scorenewgetNormalMinimum()getNormalMaximum()setScore(score)setFeedback(missingConcepts)a_shapea_sequenceanotherfinallysequencesequencesequencescoreritemResponseitemessayRubricconceptitemOutcomescorerconceptessayRubricitemitemOutcomeitemResponsescoreritemResponseitemessayRubricconceptitemOutcome getItem() itemgetRubric()rubricapplyTo(essayResp)match(essayResponse)scorenewgetNormalMinimum()getNormalMaximum()setScore(score)setFeedback(missingConcepts)getItem()itemgetRubric()rubricapplyTo(essayResp)match(essayResponse)scorenewgetNormalMinimum()getNormalMaximum()setScore(score)setFeedback(missingConcepts)a_shapea_sequenceanotherfinallysequencesequencesequencescoreritemResponseitemessayRubricconceptitemOutcomescorerconceptessayRubricitemitemOutcomeitemResponsescoreritemResponseitemessayRubricconceptitemOutcome getItem()itemgetRubric()rubricapplyTo(essayResp)match(essayResponse)scorenewgetNormalMinimum()getNormalMaximum()setScore(score)setFeedback(missingConcepts)getItem()itemgetRubric()rubricapplyTo(essayResp)match(essayResponse)scorenewgetNormalMinimum()getNormalMaximum()setScore(score)setFeedback(missingConcepts)a_shapea_sequenceanotherfinallysequencesequencesequencescoreritemResponseitemessayRubricconceptitemOutcomescorerconceptessayRubricitemitemOutcomeitemResponsescoreritemResponseitemessayRubricconceptitemOutcome getItem() itemgetRubric()rubricapplyTo(essayResp)match(essayResponse)scorenewgetNormalMinimum()getNormalMaximum()setScore(score)setFeedback(missingConcepts)getItem()itemgetRubric()rubricapplyTo(essayResp)match(essayResponse)scorenewgetNormalMinimum()getNormalMaximum()setScore(score)setFeedback(missingConcepts)a_shapea_sequenceanotherfinallysequencesequencesequencescoreritemResponseitemessayRubricconceptitemOutcomescorerconceptessayRubricitemitemOutcomeitemResponsescoreritemResponseitemessayRubricconceptitemOutcome getItem()itemgetRubric()rubricapplyTo(essayResp)match(essayResponse)scorenewgetNormalMinimum()getNormalMaximum()setScore(score)setFeedback(missingConcepts)getItem()itemgetRubric()rubricapplyTo(essayResp)match(essayResponse)scorenewgetNormalMinimum()getNormalMaximum()setScore(score)setFeedback(missingConcepts)