Merge branch 'master' into fix-sequence_layout

This commit is contained in:
Alexander Wang 2022-12-05 13:58:20 -08:00
commit f179d8f3cd
No known key found for this signature in database
GPG key ID: D89FA31966BDBECE
5 changed files with 77 additions and 74 deletions

View file

@ -142,6 +142,9 @@ func newSequenceDiagram(objects []*d2graph.Object, messages []*d2graph.Edge) *se
nextActorHW := actors[rank+1].Width / 2. nextActorHW := actors[rank+1].Width / 2.
sd.actorXStep[rank] = math.Max(actorHW+nextActorHW+HORIZONTAL_PAD, MIN_ACTOR_DISTANCE) sd.actorXStep[rank] = math.Max(actorHW+nextActorHW+HORIZONTAL_PAD, MIN_ACTOR_DISTANCE)
sd.actorXStep[rank] = math.Max(maxNoteWidth/2.+HORIZONTAL_PAD, sd.actorXStep[rank]) sd.actorXStep[rank] = math.Max(maxNoteWidth/2.+HORIZONTAL_PAD, sd.actorXStep[rank])
if rank > 0 {
sd.actorXStep[rank-1] = math.Max(maxNoteWidth/2.+HORIZONTAL_PAD, sd.actorXStep[rank-1])
}
} }
} }

View file

@ -8,7 +8,7 @@
"x": -97, "x": -97,
"y": 290 "y": 290
}, },
"width": 592, "width": 655,
"height": 952, "height": 952,
"opacity": 1, "opacity": 1,
"strokeDash": 0, "strokeDash": 0,
@ -47,7 +47,7 @@
"x": -73, "x": -73,
"y": 420 "y": 420
}, },
"width": 544, "width": 607,
"height": 798, "height": 798,
"opacity": 1, "opacity": 1,
"strokeDash": 0, "strokeDash": 0,
@ -86,7 +86,7 @@
"x": -49, "x": -49,
"y": 550 "y": 550
}, },
"width": 496, "width": 559,
"height": 644, "height": 644,
"opacity": 1, "opacity": 1,
"strokeDash": 0, "strokeDash": 0,
@ -125,7 +125,7 @@
"x": -25, "x": -25,
"y": 680 "y": 680
}, },
"width": 448, "width": 511,
"height": 490, "height": 490,
"opacity": 1, "opacity": 1,
"strokeDash": 0, "strokeDash": 0,
@ -244,7 +244,7 @@
"x": 49, "x": 49,
"y": 1066 "y": 1066
}, },
"width": 350, "width": 413,
"height": 80, "height": 80,
"opacity": 1, "opacity": 1,
"strokeDash": 0, "strokeDash": 0,
@ -280,10 +280,10 @@
"id": "alt", "id": "alt",
"type": "", "type": "",
"pos": { "pos": {
"x": 275, "x": 338,
"y": 1172 "y": 1172
}, },
"width": 461, "width": 460,
"height": 518, "height": 518,
"opacity": 1, "opacity": 1,
"strokeDash": 0, "strokeDash": 0,
@ -319,10 +319,10 @@
"id": "alt.case 1", "id": "alt.case 1",
"type": "", "type": "",
"pos": { "pos": {
"x": 299, "x": 362,
"y": 1196 "y": 1196
}, },
"width": 413, "width": 412,
"height": 80, "height": 80,
"opacity": 1, "opacity": 1,
"strokeDash": 0, "strokeDash": 0,
@ -358,10 +358,10 @@
"id": "alt.case 2", "id": "alt.case 2",
"type": "", "type": "",
"pos": { "pos": {
"x": 299, "x": 362,
"y": 1326 "y": 1326
}, },
"width": 413, "width": 412,
"height": 80, "height": 80,
"opacity": 1, "opacity": 1,
"strokeDash": 0, "strokeDash": 0,
@ -397,10 +397,10 @@
"id": "alt.case 3", "id": "alt.case 3",
"type": "", "type": "",
"pos": { "pos": {
"x": 299, "x": 362,
"y": 1456 "y": 1456
}, },
"width": 413, "width": 412,
"height": 80, "height": 80,
"opacity": 1, "opacity": 1,
"strokeDash": 0, "strokeDash": 0,
@ -436,10 +436,10 @@
"id": "alt.case 4", "id": "alt.case 4",
"type": "", "type": "",
"pos": { "pos": {
"x": 299, "x": 362,
"y": 1586 "y": 1586
}, },
"width": 413, "width": 412,
"height": 80, "height": 80,
"opacity": 1, "opacity": 1,
"strokeDash": 0, "strokeDash": 0,
@ -475,7 +475,7 @@
"id": "b", "id": "b",
"type": "", "type": "",
"pos": { "pos": {
"x": 274, "x": 337,
"y": 74 "y": 74
}, },
"width": 150, "width": 150,
@ -515,7 +515,7 @@
"id": "b.note", "id": "b.note",
"type": "rectangle", "type": "rectangle",
"pos": { "pos": {
"x": 86, "x": 149,
"y": 2076 "y": 2076
}, },
"width": 525, "width": 525,
@ -595,7 +595,7 @@
"id": "c", "id": "c",
"type": "", "type": "",
"pos": { "pos": {
"x": 567, "x": 629,
"y": 74 "y": 74
}, },
"width": 190, "width": 190,
@ -663,7 +663,7 @@
"y": 330 "y": 330
}, },
{ {
"x": 349, "x": 412,
"y": 330 "y": 330
} }
], ],
@ -702,7 +702,7 @@
"y": 460 "y": 460
}, },
{ {
"x": 349, "x": 412,
"y": 460 "y": 460
} }
], ],
@ -741,7 +741,7 @@
"y": 590 "y": 590
}, },
{ {
"x": 349, "x": 412,
"y": 590 "y": 590
} }
], ],
@ -780,7 +780,7 @@
"y": 976 "y": 976
}, },
{ {
"x": 349, "x": 412,
"y": 976 "y": 976
} }
], ],
@ -819,7 +819,7 @@
"y": 1106 "y": 1106
}, },
{ {
"x": 349, "x": 412,
"y": 1106 "y": 1106
} }
], ],
@ -854,11 +854,11 @@
"labelPercentage": 0, "labelPercentage": 0,
"route": [ "route": [
{ {
"x": 349, "x": 412,
"y": 1236 "y": 1236
}, },
{ {
"x": 662, "x": 724,
"y": 1236 "y": 1236
} }
], ],
@ -893,11 +893,11 @@
"labelPercentage": 0, "labelPercentage": 0,
"route": [ "route": [
{ {
"x": 349, "x": 412,
"y": 1366 "y": 1366
}, },
{ {
"x": 662, "x": 724,
"y": 1366 "y": 1366
} }
], ],
@ -932,11 +932,11 @@
"labelPercentage": 0, "labelPercentage": 0,
"route": [ "route": [
{ {
"x": 349, "x": 412,
"y": 1496 "y": 1496
}, },
{ {
"x": 662, "x": 724,
"y": 1496 "y": 1496
} }
], ],
@ -971,11 +971,11 @@
"labelPercentage": 0, "labelPercentage": 0,
"route": [ "route": [
{ {
"x": 349, "x": 412,
"y": 1626 "y": 1626
}, },
{ {
"x": 662, "x": 724,
"y": 1626 "y": 1626
} }
], ],
@ -1049,11 +1049,11 @@
"labelPercentage": 0, "labelPercentage": 0,
"route": [ "route": [
{ {
"x": 349, "x": 412,
"y": 200 "y": 200
}, },
{ {
"x": 349, "x": 412,
"y": 2332 "y": 2332
} }
], ],
@ -1088,11 +1088,11 @@
"labelPercentage": 0, "labelPercentage": 0,
"route": [ "route": [
{ {
"x": 662, "x": 724,
"y": 200 "y": 200
}, },
{ {
"x": 662, "x": 724,
"y": 2332 "y": 2332
} }
], ],

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 332 KiB

After

Width:  |  Height:  |  Size: 332 KiB

View file

@ -8,7 +8,7 @@
"x": -97, "x": -97,
"y": 290 "y": 290
}, },
"width": 592, "width": 655,
"height": 952, "height": 952,
"opacity": 1, "opacity": 1,
"strokeDash": 0, "strokeDash": 0,
@ -47,7 +47,7 @@
"x": -73, "x": -73,
"y": 420 "y": 420
}, },
"width": 544, "width": 607,
"height": 798, "height": 798,
"opacity": 1, "opacity": 1,
"strokeDash": 0, "strokeDash": 0,
@ -86,7 +86,7 @@
"x": -49, "x": -49,
"y": 550 "y": 550
}, },
"width": 496, "width": 559,
"height": 644, "height": 644,
"opacity": 1, "opacity": 1,
"strokeDash": 0, "strokeDash": 0,
@ -125,7 +125,7 @@
"x": -25, "x": -25,
"y": 680 "y": 680
}, },
"width": 448, "width": 511,
"height": 490, "height": 490,
"opacity": 1, "opacity": 1,
"strokeDash": 0, "strokeDash": 0,
@ -244,7 +244,7 @@
"x": 49, "x": 49,
"y": 1066 "y": 1066
}, },
"width": 350, "width": 413,
"height": 80, "height": 80,
"opacity": 1, "opacity": 1,
"strokeDash": 0, "strokeDash": 0,
@ -280,10 +280,10 @@
"id": "alt", "id": "alt",
"type": "", "type": "",
"pos": { "pos": {
"x": 275, "x": 338,
"y": 1172 "y": 1172
}, },
"width": 461, "width": 460,
"height": 518, "height": 518,
"opacity": 1, "opacity": 1,
"strokeDash": 0, "strokeDash": 0,
@ -319,10 +319,10 @@
"id": "alt.case 1", "id": "alt.case 1",
"type": "", "type": "",
"pos": { "pos": {
"x": 299, "x": 362,
"y": 1196 "y": 1196
}, },
"width": 413, "width": 412,
"height": 80, "height": 80,
"opacity": 1, "opacity": 1,
"strokeDash": 0, "strokeDash": 0,
@ -358,10 +358,10 @@
"id": "alt.case 2", "id": "alt.case 2",
"type": "", "type": "",
"pos": { "pos": {
"x": 299, "x": 362,
"y": 1326 "y": 1326
}, },
"width": 413, "width": 412,
"height": 80, "height": 80,
"opacity": 1, "opacity": 1,
"strokeDash": 0, "strokeDash": 0,
@ -397,10 +397,10 @@
"id": "alt.case 3", "id": "alt.case 3",
"type": "", "type": "",
"pos": { "pos": {
"x": 299, "x": 362,
"y": 1456 "y": 1456
}, },
"width": 413, "width": 412,
"height": 80, "height": 80,
"opacity": 1, "opacity": 1,
"strokeDash": 0, "strokeDash": 0,
@ -436,10 +436,10 @@
"id": "alt.case 4", "id": "alt.case 4",
"type": "", "type": "",
"pos": { "pos": {
"x": 299, "x": 362,
"y": 1586 "y": 1586
}, },
"width": 413, "width": 412,
"height": 80, "height": 80,
"opacity": 1, "opacity": 1,
"strokeDash": 0, "strokeDash": 0,
@ -475,7 +475,7 @@
"id": "b", "id": "b",
"type": "", "type": "",
"pos": { "pos": {
"x": 274, "x": 337,
"y": 74 "y": 74
}, },
"width": 150, "width": 150,
@ -515,7 +515,7 @@
"id": "b.note", "id": "b.note",
"type": "rectangle", "type": "rectangle",
"pos": { "pos": {
"x": 86, "x": 149,
"y": 2076 "y": 2076
}, },
"width": 525, "width": 525,
@ -595,7 +595,7 @@
"id": "c", "id": "c",
"type": "", "type": "",
"pos": { "pos": {
"x": 567, "x": 629,
"y": 74 "y": 74
}, },
"width": 190, "width": 190,
@ -663,7 +663,7 @@
"y": 330 "y": 330
}, },
{ {
"x": 349, "x": 412,
"y": 330 "y": 330
} }
], ],
@ -702,7 +702,7 @@
"y": 460 "y": 460
}, },
{ {
"x": 349, "x": 412,
"y": 460 "y": 460
} }
], ],
@ -741,7 +741,7 @@
"y": 590 "y": 590
}, },
{ {
"x": 349, "x": 412,
"y": 590 "y": 590
} }
], ],
@ -780,7 +780,7 @@
"y": 976 "y": 976
}, },
{ {
"x": 349, "x": 412,
"y": 976 "y": 976
} }
], ],
@ -819,7 +819,7 @@
"y": 1106 "y": 1106
}, },
{ {
"x": 349, "x": 412,
"y": 1106 "y": 1106
} }
], ],
@ -854,11 +854,11 @@
"labelPercentage": 0, "labelPercentage": 0,
"route": [ "route": [
{ {
"x": 349, "x": 412,
"y": 1236 "y": 1236
}, },
{ {
"x": 662, "x": 724,
"y": 1236 "y": 1236
} }
], ],
@ -893,11 +893,11 @@
"labelPercentage": 0, "labelPercentage": 0,
"route": [ "route": [
{ {
"x": 349, "x": 412,
"y": 1366 "y": 1366
}, },
{ {
"x": 662, "x": 724,
"y": 1366 "y": 1366
} }
], ],
@ -932,11 +932,11 @@
"labelPercentage": 0, "labelPercentage": 0,
"route": [ "route": [
{ {
"x": 349, "x": 412,
"y": 1496 "y": 1496
}, },
{ {
"x": 662, "x": 724,
"y": 1496 "y": 1496
} }
], ],
@ -971,11 +971,11 @@
"labelPercentage": 0, "labelPercentage": 0,
"route": [ "route": [
{ {
"x": 349, "x": 412,
"y": 1626 "y": 1626
}, },
{ {
"x": 662, "x": 724,
"y": 1626 "y": 1626
} }
], ],
@ -1049,11 +1049,11 @@
"labelPercentage": 0, "labelPercentage": 0,
"route": [ "route": [
{ {
"x": 349, "x": 412,
"y": 200 "y": 200
}, },
{ {
"x": 349, "x": 412,
"y": 2332 "y": 2332
} }
], ],
@ -1088,11 +1088,11 @@
"labelPercentage": 0, "labelPercentage": 0,
"route": [ "route": [
{ {
"x": 662, "x": 724,
"y": 200 "y": 200
}, },
{ {
"x": 662, "x": 724,
"y": 2332 "y": 2332
} }
], ],

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 332 KiB

After

Width:  |  Height:  |  Size: 332 KiB