try
This commit is contained in:
parent
39d2022956
commit
3c1be1ee2a
5 changed files with 440 additions and 301 deletions
|
|
@ -1,195 +1,238 @@
|
||||||
package d2cycle
|
package d2cycle
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"math"
|
"math"
|
||||||
|
|
||||||
"oss.terrastruct.com/d2/d2graph"
|
"oss.terrastruct.com/d2/d2graph"
|
||||||
"oss.terrastruct.com/d2/lib/geo"
|
"oss.terrastruct.com/d2/lib/geo"
|
||||||
"oss.terrastruct.com/d2/lib/label"
|
"oss.terrastruct.com/d2/lib/label"
|
||||||
"oss.terrastruct.com/util-go/go2"
|
"oss.terrastruct.com/util-go/go2"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
MIN_RADIUS = 200
|
MIN_RADIUS = 200
|
||||||
PADDING = 20
|
PADDING = 20
|
||||||
MIN_SEGMENT_LEN = 10
|
MIN_SEGMENT_LEN = 10
|
||||||
ARC_STEPS = 30
|
ARC_STEPS = 30
|
||||||
|
EPSILON = 1e-10 // Small value for floating point comparisons
|
||||||
)
|
)
|
||||||
|
|
||||||
func Layout(ctx context.Context, g *d2graph.Graph, layout d2graph.LayoutGraph) error {
|
func Layout(ctx context.Context, g *d2graph.Graph, layout d2graph.LayoutGraph) error {
|
||||||
objects := g.Root.ChildrenArray
|
objects := g.Root.ChildrenArray
|
||||||
if len(objects) == 0 {
|
if len(objects) == 0 {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, obj := range g.Objects {
|
for _, obj := range g.Objects {
|
||||||
positionLabelsIcons(obj)
|
positionLabelsIcons(obj)
|
||||||
}
|
}
|
||||||
|
|
||||||
radius := calculateRadius(objects)
|
radius := calculateRadius(objects)
|
||||||
positionObjects(objects, radius)
|
positionObjects(objects, radius)
|
||||||
|
|
||||||
for _, edge := range g.Edges {
|
for _, edge := range g.Edges {
|
||||||
createCircularArc(edge)
|
createPreciseCircularArc(edge)
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func calculateRadius(objects []*d2graph.Object) float64 {
|
func calculateRadius(objects []*d2graph.Object) float64 {
|
||||||
numObjects := float64(len(objects))
|
numObjects := float64(len(objects))
|
||||||
maxSize := 0.0
|
maxSize := 0.0
|
||||||
for _, obj := range objects {
|
for _, obj := range objects {
|
||||||
size := math.Max(obj.Box.Width, obj.Box.Height)
|
size := math.Max(obj.Box.Width, obj.Box.Height)
|
||||||
maxSize = math.Max(maxSize, size)
|
maxSize = math.Max(maxSize, size)
|
||||||
}
|
}
|
||||||
minRadius := (maxSize/2.0 + PADDING) / math.Sin(math.Pi/numObjects)
|
minRadius := (maxSize/2.0 + PADDING) / math.Sin(math.Pi/numObjects)
|
||||||
return math.Max(minRadius, MIN_RADIUS)
|
return math.Max(minRadius, MIN_RADIUS)
|
||||||
}
|
}
|
||||||
|
|
||||||
func positionObjects(objects []*d2graph.Object, radius float64) {
|
func positionObjects(objects []*d2graph.Object, radius float64) {
|
||||||
numObjects := float64(len(objects))
|
numObjects := float64(len(objects))
|
||||||
angleOffset := -math.Pi / 2
|
angleOffset := -math.Pi / 2
|
||||||
|
|
||||||
for i, obj := range objects {
|
for i, obj := range objects {
|
||||||
angle := angleOffset + (2*math.Pi*float64(i)/numObjects)
|
angle := angleOffset + (2*math.Pi*float64(i)/numObjects)
|
||||||
x := radius * math.Cos(angle)
|
x := radius * math.Cos(angle)
|
||||||
y := radius * math.Sin(angle)
|
y := radius * math.Sin(angle)
|
||||||
|
|
||||||
obj.TopLeft = geo.NewPoint(
|
obj.TopLeft = geo.NewPoint(
|
||||||
x-obj.Box.Width/2,
|
x-obj.Box.Width/2,
|
||||||
y-obj.Box.Height/2,
|
y-obj.Box.Height/2,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func createCircularArc(edge *d2graph.Edge) {
|
func createPreciseCircularArc(edge *d2graph.Edge) {
|
||||||
if edge.Src == nil || edge.Dst == nil {
|
if edge.Src == nil || edge.Dst == nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
srcCenter := edge.Src.Center()
|
srcCenter := edge.Src.Center()
|
||||||
dstCenter := edge.Dst.Center()
|
dstCenter := edge.Dst.Center()
|
||||||
|
|
||||||
srcAngle := math.Atan2(srcCenter.Y, srcCenter.X)
|
// Calculate angles in the circular layout
|
||||||
dstAngle := math.Atan2(dstCenter.Y, dstCenter.X)
|
srcAngle := math.Atan2(srcCenter.Y, srcCenter.X)
|
||||||
if dstAngle < srcAngle {
|
dstAngle := math.Atan2(dstCenter.Y, dstCenter.X)
|
||||||
dstAngle += 2 * math.Pi
|
if dstAngle < srcAngle {
|
||||||
}
|
dstAngle += 2 * math.Pi
|
||||||
|
}
|
||||||
|
|
||||||
arcRadius := math.Hypot(srcCenter.X, srcCenter.Y)
|
arcRadius := math.Hypot(srcCenter.X, srcCenter.Y)
|
||||||
|
|
||||||
path := make([]*geo.Point, 0, ARC_STEPS+1)
|
// Generate initial path points
|
||||||
for i := 0; i <= ARC_STEPS; i++ {
|
path := make([]*geo.Point, 0, ARC_STEPS+1)
|
||||||
t := float64(i) / float64(ARC_STEPS)
|
for i := 0; i <= ARC_STEPS; i++ {
|
||||||
angle := srcAngle + t*(dstAngle-srcAngle)
|
t := float64(i) / float64(ARC_STEPS)
|
||||||
x := arcRadius * math.Cos(angle)
|
angle := srcAngle + t*(dstAngle-srcAngle)
|
||||||
y := arcRadius * math.Sin(angle)
|
x := arcRadius * math.Cos(angle)
|
||||||
path = append(path, geo.NewPoint(x, y))
|
y := arcRadius * math.Sin(angle)
|
||||||
}
|
path = append(path, geo.NewPoint(x, y))
|
||||||
path[0] = srcCenter
|
}
|
||||||
path[len(path)-1] = dstCenter
|
|
||||||
|
|
||||||
startIndex, newSrc := clampPointOutsideBox(edge.Src.Box, path, 0)
|
// Find precise intersection points
|
||||||
endIndex, newDst := clampPointOutsideBoxReverse(edge.Dst.Box, path, len(path)-1)
|
srcIntersection := findPreciseBoxIntersection(edge.Src.Box, path[0], path[1])
|
||||||
|
dstIntersection := findPreciseBoxIntersection(edge.Dst.Box, path[len(path)-1], path[len(path)-2])
|
||||||
|
|
||||||
path[0] = newSrc
|
// Update path endpoints with precise intersections
|
||||||
path[len(path)-1] = newDst
|
path[0] = srcIntersection
|
||||||
|
path[len(path)-1] = dstIntersection
|
||||||
|
|
||||||
edge.Route = path[startIndex : endIndex+1]
|
// Remove any points that might be inside the boxes
|
||||||
edge.IsCurve = true
|
startIdx := 0
|
||||||
|
endIdx := len(path) - 1
|
||||||
|
|
||||||
|
for i := 1; i < len(path)-1; i++ {
|
||||||
|
if boxContains(edge.Src.Box, path[i]) {
|
||||||
|
startIdx = i
|
||||||
|
}
|
||||||
|
if boxContains(edge.Dst.Box, path[i]) {
|
||||||
|
endIdx = i
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
edge.Route = path[startIdx:endIdx+1]
|
||||||
|
edge.IsCurve = true
|
||||||
}
|
}
|
||||||
|
|
||||||
func clampPointOutsideBox(box *geo.Box, path []*geo.Point, startIdx int) (int, *geo.Point) {
|
func findPreciseBoxIntersection(box *geo.Box, p1, p2 *geo.Point) *geo.Point {
|
||||||
if startIdx >= len(path)-1 {
|
// Define box edges as line segments
|
||||||
return startIdx, path[startIdx]
|
edges := []geo.Segment{
|
||||||
}
|
// Top edge
|
||||||
if !boxContains(box, path[startIdx]) {
|
*geo.NewSegment(
|
||||||
return startIdx, path[startIdx]
|
geo.NewPoint(box.TopLeft.X, box.TopLeft.Y),
|
||||||
}
|
geo.NewPoint(box.TopLeft.X+box.Width, box.TopLeft.Y),
|
||||||
|
),
|
||||||
|
// Right edge
|
||||||
|
*geo.NewSegment(
|
||||||
|
geo.NewPoint(box.TopLeft.X+box.Width, box.TopLeft.Y),
|
||||||
|
geo.NewPoint(box.TopLeft.X+box.Width, box.TopLeft.Y+box.Height),
|
||||||
|
),
|
||||||
|
// Bottom edge
|
||||||
|
*geo.NewSegment(
|
||||||
|
geo.NewPoint(box.TopLeft.X, box.TopLeft.Y+box.Height),
|
||||||
|
geo.NewPoint(box.TopLeft.X+box.Width, box.TopLeft.Y+box.Height),
|
||||||
|
),
|
||||||
|
// Left edge
|
||||||
|
*geo.NewSegment(
|
||||||
|
geo.NewPoint(box.TopLeft.X, box.TopLeft.Y),
|
||||||
|
geo.NewPoint(box.TopLeft.X, box.TopLeft.Y+box.Height),
|
||||||
|
),
|
||||||
|
}
|
||||||
|
|
||||||
for i := startIdx + 1; i < len(path); i++ {
|
// Line segment from p1 to p2
|
||||||
if boxContains(box, path[i]) {
|
line := *geo.NewSegment(p1, p2)
|
||||||
continue
|
|
||||||
}
|
// Find the intersection point closest to p1
|
||||||
seg := geo.NewSegment(path[i-1], path[i])
|
var closestIntersection *geo.Point
|
||||||
inters := boxIntersections(box, *seg)
|
minDist := math.MaxFloat64
|
||||||
if len(inters) > 0 {
|
|
||||||
return i, inters[0]
|
for _, edge := range edges {
|
||||||
}
|
if intersection := findSegmentIntersection(line, edge); intersection != nil {
|
||||||
return i, path[i]
|
dist := math.Hypot(
|
||||||
}
|
intersection.X-p1.X,
|
||||||
last := len(path) - 1
|
intersection.Y-p1.Y,
|
||||||
return last, path[last]
|
)
|
||||||
|
if dist < minDist {
|
||||||
|
minDist = dist
|
||||||
|
closestIntersection = intersection
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if closestIntersection != nil {
|
||||||
|
return closestIntersection
|
||||||
|
}
|
||||||
|
return p1
|
||||||
}
|
}
|
||||||
|
|
||||||
func clampPointOutsideBoxReverse(box *geo.Box, path []*geo.Point, endIdx int) (int, *geo.Point) {
|
func findSegmentIntersection(s1, s2 geo.Segment) *geo.Point {
|
||||||
if endIdx <= 0 {
|
// Calculate the intersection of two line segments using parametric equations
|
||||||
return endIdx, path[endIdx]
|
x1, y1 := s1.Start.X, s1.Start.Y
|
||||||
}
|
x2, y2 := s1.End.X, s1.End.Y
|
||||||
if !boxContains(box, path[endIdx]) {
|
x3, y3 := s2.Start.X, s2.Start.Y
|
||||||
return endIdx, path[endIdx]
|
x4, y4 := s2.End.X, s2.End.Y
|
||||||
}
|
|
||||||
|
|
||||||
for j := endIdx - 1; j >= 0; j-- {
|
denominator := (x1-x2)*(y3-y4) - (y1-y2)*(x3-x4)
|
||||||
if boxContains(box, path[j]) {
|
if math.Abs(denominator) < EPSILON {
|
||||||
continue
|
return nil
|
||||||
}
|
}
|
||||||
seg := geo.NewSegment(path[j], path[j+1])
|
|
||||||
inters := boxIntersections(box, *seg)
|
t := ((x1-x3)*(y3-y4) - (y1-y3)*(x3-x4)) / denominator
|
||||||
if len(inters) > 0 {
|
u := -((x1-x2)*(y1-y3) - (y1-y2)*(x1-x3)) / denominator
|
||||||
return j, inters[0]
|
|
||||||
}
|
if t >= 0 && t <= 1 && u >= 0 && u <= 1 {
|
||||||
return j, path[j]
|
x := x1 + t*(x2-x1)
|
||||||
}
|
y := y1 + t*(y2-y1)
|
||||||
return 0, path[0]
|
return geo.NewPoint(x, y)
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func boxContains(b *geo.Box, p *geo.Point) bool {
|
func boxContains(b *geo.Box, p *geo.Point) bool {
|
||||||
return p.X >= b.TopLeft.X &&
|
return p.X >= b.TopLeft.X-EPSILON &&
|
||||||
p.X <= b.TopLeft.X+b.Width &&
|
p.X <= b.TopLeft.X+b.Width+EPSILON &&
|
||||||
p.Y >= b.TopLeft.Y &&
|
p.Y >= b.TopLeft.Y-EPSILON &&
|
||||||
p.Y <= b.TopLeft.Y+b.Height
|
p.Y <= b.TopLeft.Y+b.Height+EPSILON
|
||||||
}
|
|
||||||
|
|
||||||
func boxIntersections(b *geo.Box, seg geo.Segment) []*geo.Point {
|
|
||||||
return b.Intersections(seg)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func positionLabelsIcons(obj *d2graph.Object) {
|
func positionLabelsIcons(obj *d2graph.Object) {
|
||||||
if obj.Icon != nil && obj.IconPosition == nil {
|
if obj.Icon != nil && obj.IconPosition == nil {
|
||||||
if len(obj.ChildrenArray) > 0 {
|
if len(obj.ChildrenArray) > 0 {
|
||||||
obj.IconPosition = go2.Pointer(label.OutsideTopLeft.String())
|
obj.IconPosition = go2.Pointer(label.OutsideTopLeft.String())
|
||||||
if obj.LabelPosition == nil {
|
if obj.LabelPosition == nil {
|
||||||
obj.LabelPosition = go2.Pointer(label.OutsideTopRight.String())
|
obj.LabelPosition = go2.Pointer(label.OutsideTopRight.String())
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
} else if obj.SQLTable != nil || obj.Class != nil || obj.Language != "" {
|
} else if obj.SQLTable != nil || obj.Class != nil || obj.Language != "" {
|
||||||
obj.IconPosition = go2.Pointer(label.OutsideTopLeft.String())
|
obj.IconPosition = go2.Pointer(label.OutsideTopLeft.String())
|
||||||
} else {
|
} else {
|
||||||
obj.IconPosition = go2.Pointer(label.InsideMiddleCenter.String())
|
obj.IconPosition = go2.Pointer(label.InsideMiddleCenter.String())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if obj.HasLabel() && obj.LabelPosition == nil {
|
if obj.HasLabel() && obj.LabelPosition == nil {
|
||||||
if len(obj.ChildrenArray) > 0 {
|
if len(obj.ChildrenArray) > 0 {
|
||||||
obj.LabelPosition = go2.Pointer(label.OutsideTopCenter.String())
|
obj.LabelPosition = go2.Pointer(label.OutsideTopCenter.String())
|
||||||
} else if obj.HasOutsideBottomLabel() {
|
} else if obj.HasOutsideBottomLabel() {
|
||||||
obj.LabelPosition = go2.Pointer(label.OutsideBottomCenter.String())
|
obj.LabelPosition = go2.Pointer(label.OutsideBottomCenter.String())
|
||||||
} else if obj.Icon != nil {
|
} else if obj.Icon != nil {
|
||||||
obj.LabelPosition = go2.Pointer(label.InsideTopCenter.String())
|
obj.LabelPosition = go2.Pointer(label.InsideTopCenter.String())
|
||||||
} else {
|
} else {
|
||||||
obj.LabelPosition = go2.Pointer(label.InsideMiddleCenter.String())
|
obj.LabelPosition = go2.Pointer(label.InsideMiddleCenter.String())
|
||||||
}
|
}
|
||||||
|
|
||||||
if float64(obj.LabelDimensions.Width) > obj.Width ||
|
if float64(obj.LabelDimensions.Width) > obj.Width ||
|
||||||
float64(obj.LabelDimensions.Height) > obj.Height {
|
float64(obj.LabelDimensions.Height) > obj.Height {
|
||||||
if len(obj.ChildrenArray) > 0 {
|
if len(obj.ChildrenArray) > 0 {
|
||||||
obj.LabelPosition = go2.Pointer(label.OutsideTopCenter.String())
|
obj.LabelPosition = go2.Pointer(label.OutsideTopCenter.String())
|
||||||
} else {
|
} else {
|
||||||
obj.LabelPosition = go2.Pointer(label.OutsideBottomCenter.String())
|
obj.LabelPosition = go2.Pointer(label.OutsideBottomCenter.String())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
48
e2etests/testdata/txtar/cycle-diagram/dagre/board.exp.json
generated
vendored
48
e2etests/testdata/txtar/cycle-diagram/dagre/board.exp.json
generated
vendored
|
|
@ -539,6 +539,10 @@
|
||||||
"labelPercentage": 0,
|
"labelPercentage": 0,
|
||||||
"link": "",
|
"link": "",
|
||||||
"route": [
|
"route": [
|
||||||
|
{
|
||||||
|
"x": 20.905000686645508,
|
||||||
|
"y": -198.9040069580078
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"x": 31.285999298095703,
|
"x": 31.285999298095703,
|
||||||
"y": -197.53700256347656
|
"y": -197.53700256347656
|
||||||
|
|
@ -634,6 +638,10 @@
|
||||||
{
|
{
|
||||||
"x": 195.62899780273438,
|
"x": 195.62899780273438,
|
||||||
"y": -41.582000732421875
|
"y": -41.582000732421875
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"x": 197.53700256347656,
|
||||||
|
"y": -31.285999298095703
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"isCurve": true,
|
"isCurve": true,
|
||||||
|
|
@ -667,6 +675,10 @@
|
||||||
"labelPercentage": 0,
|
"labelPercentage": 0,
|
||||||
"link": "",
|
"link": "",
|
||||||
"route": [
|
"route": [
|
||||||
|
{
|
||||||
|
"x": 197.53700256347656,
|
||||||
|
"y": 31.285999298095703
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"x": 195.62899780273438,
|
"x": 195.62899780273438,
|
||||||
"y": 41.582000732421875
|
"y": 41.582000732421875
|
||||||
|
|
@ -762,6 +774,10 @@
|
||||||
{
|
{
|
||||||
"x": 31.285999298095703,
|
"x": 31.285999298095703,
|
||||||
"y": 197.53700256347656
|
"y": 197.53700256347656
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"x": 20.905000686645508,
|
||||||
|
"y": 198.9040069580078
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"isCurve": true,
|
"isCurve": true,
|
||||||
|
|
@ -795,6 +811,10 @@
|
||||||
"labelPercentage": 0,
|
"labelPercentage": 0,
|
||||||
"link": "",
|
"link": "",
|
||||||
"route": [
|
"route": [
|
||||||
|
{
|
||||||
|
"x": -20.905000686645508,
|
||||||
|
"y": 198.9040069580078
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"x": -31.285999298095703,
|
"x": -31.285999298095703,
|
||||||
"y": 197.53700256347656
|
"y": 197.53700256347656
|
||||||
|
|
@ -890,6 +910,10 @@
|
||||||
{
|
{
|
||||||
"x": -195.62899780273438,
|
"x": -195.62899780273438,
|
||||||
"y": 41.582000732421875
|
"y": 41.582000732421875
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"x": -197.53700256347656,
|
||||||
|
"y": 31.285999298095703
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"isCurve": true,
|
"isCurve": true,
|
||||||
|
|
@ -923,6 +947,10 @@
|
||||||
"labelPercentage": 0,
|
"labelPercentage": 0,
|
||||||
"link": "",
|
"link": "",
|
||||||
"route": [
|
"route": [
|
||||||
|
{
|
||||||
|
"x": 526.9509887695312,
|
||||||
|
"y": -149.51199340820312
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"x": 540.833984375,
|
"x": 540.833984375,
|
||||||
"y": -148.05299377441406
|
"y": -148.05299377441406
|
||||||
|
|
@ -1026,6 +1054,10 @@
|
||||||
{
|
{
|
||||||
"x": 703.2109985351562,
|
"x": 703.2109985351562,
|
||||||
"y": 111.8030014038086
|
"y": 111.8030014038086
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"x": 698.4359741210938,
|
||||||
|
"y": 124.9209976196289
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"isCurve": true,
|
"isCurve": true,
|
||||||
|
|
@ -1059,6 +1091,10 @@
|
||||||
"labelPercentage": 0,
|
"labelPercentage": 0,
|
||||||
"link": "",
|
"link": "",
|
||||||
"route": [
|
"route": [
|
||||||
|
{
|
||||||
|
"x": 670.6019897460938,
|
||||||
|
"y": 173.1320037841797
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"x": 661.6279907226562,
|
"x": 661.6279907226562,
|
||||||
"y": 183.8260040283203
|
"y": 183.8260040283203
|
||||||
|
|
@ -1158,6 +1194,10 @@
|
||||||
{
|
{
|
||||||
"x": 364.3710021972656,
|
"x": 364.3710021972656,
|
||||||
"y": 183.8260040283203
|
"y": 183.8260040283203
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"x": 355.3970031738281,
|
||||||
|
"y": 173.1320037841797
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"isCurve": true,
|
"isCurve": true,
|
||||||
|
|
@ -1191,6 +1231,10 @@
|
||||||
"labelPercentage": 0,
|
"labelPercentage": 0,
|
||||||
"link": "",
|
"link": "",
|
||||||
"route": [
|
"route": [
|
||||||
|
{
|
||||||
|
"x": 992.905029296875,
|
||||||
|
"y": -198.9040069580078
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"x": 1013.5819702148438,
|
"x": 1013.5819702148438,
|
||||||
"y": -195.62899780273438
|
"y": -195.62899780273438
|
||||||
|
|
@ -1298,6 +1342,10 @@
|
||||||
{
|
{
|
||||||
"x": 1013.5819702148438,
|
"x": 1013.5819702148438,
|
||||||
"y": 195.62899780273438
|
"y": 195.62899780273438
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"x": 992.905029296875,
|
||||||
|
"y": 198.9040069580078
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"isCurve": true,
|
"isCurve": true,
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
48
e2etests/testdata/txtar/cycle-diagram/elk/board.exp.json
generated
vendored
48
e2etests/testdata/txtar/cycle-diagram/elk/board.exp.json
generated
vendored
|
|
@ -539,6 +539,10 @@
|
||||||
"labelPercentage": 0,
|
"labelPercentage": 0,
|
||||||
"link": "",
|
"link": "",
|
||||||
"route": [
|
"route": [
|
||||||
|
{
|
||||||
|
"x": 32.904998779296875,
|
||||||
|
"y": -186.9040069580078
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"x": 43.2859992980957,
|
"x": 43.2859992980957,
|
||||||
"y": -185.53700256347656
|
"y": -185.53700256347656
|
||||||
|
|
@ -634,6 +638,10 @@
|
||||||
{
|
{
|
||||||
"x": 207.62899780273438,
|
"x": 207.62899780273438,
|
||||||
"y": -29.582000732421875
|
"y": -29.582000732421875
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"x": 209.53700256347656,
|
||||||
|
"y": -19.285999298095703
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"isCurve": true,
|
"isCurve": true,
|
||||||
|
|
@ -667,6 +675,10 @@
|
||||||
"labelPercentage": 0,
|
"labelPercentage": 0,
|
||||||
"link": "",
|
"link": "",
|
||||||
"route": [
|
"route": [
|
||||||
|
{
|
||||||
|
"x": 209.53700256347656,
|
||||||
|
"y": 43.2859992980957
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"x": 207.62899780273438,
|
"x": 207.62899780273438,
|
||||||
"y": 53.582000732421875
|
"y": 53.582000732421875
|
||||||
|
|
@ -762,6 +774,10 @@
|
||||||
{
|
{
|
||||||
"x": 43.2859992980957,
|
"x": 43.2859992980957,
|
||||||
"y": 209.53700256347656
|
"y": 209.53700256347656
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"x": 32.904998779296875,
|
||||||
|
"y": 210.9040069580078
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"isCurve": true,
|
"isCurve": true,
|
||||||
|
|
@ -795,6 +811,10 @@
|
||||||
"labelPercentage": 0,
|
"labelPercentage": 0,
|
||||||
"link": "",
|
"link": "",
|
||||||
"route": [
|
"route": [
|
||||||
|
{
|
||||||
|
"x": -8.904999732971191,
|
||||||
|
"y": 210.9040069580078
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"x": -19.285999298095703,
|
"x": -19.285999298095703,
|
||||||
"y": 209.53700256347656
|
"y": 209.53700256347656
|
||||||
|
|
@ -890,6 +910,10 @@
|
||||||
{
|
{
|
||||||
"x": -183.62899780273438,
|
"x": -183.62899780273438,
|
||||||
"y": 53.582000732421875
|
"y": 53.582000732421875
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"x": -185.53700256347656,
|
||||||
|
"y": 43.2859992980957
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"isCurve": true,
|
"isCurve": true,
|
||||||
|
|
@ -923,6 +947,10 @@
|
||||||
"labelPercentage": 0,
|
"labelPercentage": 0,
|
||||||
"link": "",
|
"link": "",
|
||||||
"route": [
|
"route": [
|
||||||
|
{
|
||||||
|
"x": 499.45098876953125,
|
||||||
|
"y": -137.51199340820312
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"x": 513.333984375,
|
"x": 513.333984375,
|
||||||
"y": -136.05299377441406
|
"y": -136.05299377441406
|
||||||
|
|
@ -1026,6 +1054,10 @@
|
||||||
{
|
{
|
||||||
"x": 675.7109985351562,
|
"x": 675.7109985351562,
|
||||||
"y": 123.8030014038086
|
"y": 123.8030014038086
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"x": 670.9359741210938,
|
||||||
|
"y": 136.92100524902344
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"isCurve": true,
|
"isCurve": true,
|
||||||
|
|
@ -1059,6 +1091,10 @@
|
||||||
"labelPercentage": 0,
|
"labelPercentage": 0,
|
||||||
"link": "",
|
"link": "",
|
||||||
"route": [
|
"route": [
|
||||||
|
{
|
||||||
|
"x": 643.1019897460938,
|
||||||
|
"y": 185.1320037841797
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"x": 634.1279907226562,
|
"x": 634.1279907226562,
|
||||||
"y": 195.8260040283203
|
"y": 195.8260040283203
|
||||||
|
|
@ -1158,6 +1194,10 @@
|
||||||
{
|
{
|
||||||
"x": 336.8710021972656,
|
"x": 336.8710021972656,
|
||||||
"y": 195.8260040283203
|
"y": 195.8260040283203
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"x": 327.8970031738281,
|
||||||
|
"y": 185.1320037841797
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"isCurve": true,
|
"isCurve": true,
|
||||||
|
|
@ -1191,6 +1231,10 @@
|
||||||
"labelPercentage": 0,
|
"labelPercentage": 0,
|
||||||
"link": "",
|
"link": "",
|
||||||
"route": [
|
"route": [
|
||||||
|
{
|
||||||
|
"x": 925.8150024414062,
|
||||||
|
"y": -186.9040069580078
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"x": 946.4920043945312,
|
"x": 946.4920043945312,
|
||||||
"y": -183.62899780273438
|
"y": -183.62899780273438
|
||||||
|
|
@ -1298,6 +1342,10 @@
|
||||||
{
|
{
|
||||||
"x": 946.4920043945312,
|
"x": 946.4920043945312,
|
||||||
"y": 207.62899780273438
|
"y": 207.62899780273438
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"x": 925.8150024414062,
|
||||||
|
"y": 210.9040069580078
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"isCurve": true,
|
"isCurve": true,
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
Loading…
Reference in a new issue