increase self connection width
This commit is contained in:
parent
df81a5aeaa
commit
dab9865ae3
6 changed files with 33 additions and 31 deletions
|
|
@ -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.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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),
|
||||||
|
|
|
||||||
16
e2etests/testdata/stable/sequence_diagram_self_edges/dagre/board.exp.json
generated
vendored
16
e2etests/testdata/stable/sequence_diagram_self_edges/dagre/board.exp.json
generated
vendored
|
|
@ -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 |
16
e2etests/testdata/stable/sequence_diagram_self_edges/elk/board.exp.json
generated
vendored
16
e2etests/testdata/stable/sequence_diagram_self_edges/elk/board.exp.json
generated
vendored
|
|
@ -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 |
Loading…
Reference in a new issue