increase self connection width

This commit is contained in:
Alexander Wang 2022-12-04 22:34:38 -08:00
parent df81a5aeaa
commit dab9865ae3
No known key found for this signature in database
GPG key ID: D89FA31966BDBECE
6 changed files with 33 additions and 31 deletions

View file

@ -10,6 +10,8 @@ const MIN_ACTOR_DISTANCE = 70.
const MIN_ACTOR_WIDTH = 150. const MIN_ACTOR_WIDTH = 150.
const SELF_MESSAGE_HORIZONTAL_TRAVEL = 100.
// min vertical distance between messages // min vertical distance between messages
const MIN_MESSAGE_DISTANCE = 80. const MIN_MESSAGE_DISTANCE = 80.

View file

@ -427,7 +427,7 @@ func (sd *sequenceDiagram) routeMessages() error {
isSelfMessage := message.Src == message.Dst isSelfMessage := message.Src == message.Dst
if isSelfMessage || isToDescendant || isFromDescendant { if isSelfMessage || isToDescendant || isFromDescendant {
midX := startX + MIN_MESSAGE_DISTANCE midX := startX + SELF_MESSAGE_HORIZONTAL_TRAVEL
endY := startY + MIN_MESSAGE_DISTANCE endY := startY + MIN_MESSAGE_DISTANCE
message.Route = []*geo.Point{ message.Route = []*geo.Point{
geo.NewPoint(startX, startY), geo.NewPoint(startX, startY),

View file

@ -301,11 +301,11 @@
"y": 349 "y": 349
}, },
{ {
"x": 155, "x": 175,
"y": 349 "y": 349
}, },
{ {
"x": 155, "x": 175,
"y": 429 "y": 429
}, },
{ {
@ -387,11 +387,11 @@
"y": 609 "y": 609
}, },
{ {
"x": 375, "x": 395,
"y": 609 "y": 609
}, },
{ {
"x": 375, "x": 395,
"y": 689 "y": 689
}, },
{ {
@ -434,11 +434,11 @@
"y": 739 "y": 739
}, },
{ {
"x": 375, "x": 395,
"y": 739 "y": 739
}, },
{ {
"x": 375, "x": 395,
"y": 819 "y": 819
}, },
{ {
@ -481,11 +481,11 @@
"y": 869 "y": 869
}, },
{ {
"x": 375, "x": 395,
"y": 869 "y": 869
}, },
{ {
"x": 375, "x": 395,
"y": 949 "y": 949
}, },
{ {

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 472 KiB

After

Width:  |  Height:  |  Size: 472 KiB

View file

@ -301,11 +301,11 @@
"y": 349 "y": 349
}, },
{ {
"x": 155, "x": 175,
"y": 349 "y": 349
}, },
{ {
"x": 155, "x": 175,
"y": 429 "y": 429
}, },
{ {
@ -387,11 +387,11 @@
"y": 609 "y": 609
}, },
{ {
"x": 375, "x": 395,
"y": 609 "y": 609
}, },
{ {
"x": 375, "x": 395,
"y": 689 "y": 689
}, },
{ {
@ -434,11 +434,11 @@
"y": 739 "y": 739
}, },
{ {
"x": 375, "x": 395,
"y": 739 "y": 739
}, },
{ {
"x": 375, "x": 395,
"y": 819 "y": 819
}, },
{ {
@ -481,11 +481,11 @@
"y": 869 "y": 869
}, },
{ {
"x": 375, "x": 395,
"y": 869 "y": 869
}, },
{ {
"x": 375, "x": 395,
"y": 949 "y": 949
}, },
{ {

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 472 KiB

After

Width:  |  Height:  |  Size: 472 KiB