ta
This commit is contained in:
parent
b27235a476
commit
9cff0eeaa6
3 changed files with 90 additions and 87 deletions
|
|
@ -191,12 +191,15 @@ func boundingBox(g *d2graph.Graph) (tl, br *geo.Point) {
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, edge := range g.Edges {
|
for _, edge := range g.Edges {
|
||||||
|
if edge.Src.OuterNearContainer() != nil || edge.Dst.OuterNearContainer() != nil {
|
||||||
|
continue
|
||||||
|
}
|
||||||
if edge.Route != nil {
|
if edge.Route != nil {
|
||||||
for _, point := range edge.Route {
|
for _, point := range edge.Route {
|
||||||
x1 = math.Min(x1, point.X-pad/2)
|
x1 = math.Min(x1, point.X)
|
||||||
y1 = math.Min(y1, point.Y-pad/2)
|
y1 = math.Min(y1, point.Y)
|
||||||
x2 = math.Max(x2, point.X+pad/2)
|
x2 = math.Max(x2, point.X)
|
||||||
y2 = math.Max(y2, point.Y+pad/2)
|
y2 = math.Max(y2, point.Y)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
4
e2etests/testdata/txtar/elk-title-near/elk/board.exp.json
generated
vendored
4
e2etests/testdata/txtar/elk-title-near/elk/board.exp.json
generated
vendored
|
|
@ -15,8 +15,8 @@
|
||||||
"id": "title",
|
"id": "title",
|
||||||
"type": "rectangle",
|
"type": "rectangle",
|
||||||
"pos": {
|
"pos": {
|
||||||
"x": -100,
|
"x": -95,
|
||||||
"y": -84
|
"y": -74
|
||||||
},
|
},
|
||||||
"width": 408,
|
"width": 408,
|
||||||
"height": 66,
|
"height": 66,
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |
Loading…
Reference in a new issue