diff --git a/ci/release/changelogs/next.md b/ci/release/changelogs/next.md
index 490e338df..ab1a84721 100644
--- a/ci/release/changelogs/next.md
+++ b/ci/release/changelogs/next.md
@@ -9,3 +9,4 @@
- `d2 fmt` only rewrites if it has changes, instead of always rewriting. [#470](https://github.com/terrastruct/d2/pull/470)
- Fixed an issue where text could overflow in sql_table shapes. [#458](https://github.com/terrastruct/d2/pull/458)
- Fixed an issue with elk layouts accounting for edge labels as if they were placed on the side of the edge. [#483](https://github.com/terrastruct/d2/pull/483)
+- Fixed an issue where dagre layouts may not have enough spacing for all edge labels. [#484](https://github.com/terrastruct/d2/pull/484)
diff --git a/d2layouts/d2dagrelayout/layout.go b/d2layouts/d2dagrelayout/layout.go
index 3ae70e35a..68d8ec0f6 100644
--- a/d2layouts/d2dagrelayout/layout.go
+++ b/d2layouts/d2dagrelayout/layout.go
@@ -64,22 +64,35 @@ func Layout(ctx context.Context, g *d2graph.Graph) (err error) {
}
rootAttrs := dagreGraphAttrs{
- ranksep: 100,
edgesep: 40,
nodesep: 60,
}
+ isHorizontal := false
switch g.Root.Attributes.Direction.Value {
case "down":
rootAttrs.rankdir = "TB"
case "right":
rootAttrs.rankdir = "LR"
+ isHorizontal = true
case "left":
rootAttrs.rankdir = "RL"
+ isHorizontal = true
case "up":
rootAttrs.rankdir = "BT"
default:
rootAttrs.rankdir = "TB"
}
+
+ maxLabelSize := 0
+ for _, edge := range g.Edges {
+ size := edge.LabelDimensions.Width
+ if !isHorizontal {
+ size = edge.LabelDimensions.Height
+ }
+ maxLabelSize = go2.Max(maxLabelSize, size)
+ }
+ rootAttrs.ranksep = go2.Max(100, maxLabelSize+40)
+
configJS := setGraphAttrs(rootAttrs)
if _, err := vm.RunString(configJS); err != nil {
return err
diff --git a/e2etests/regression_test.go b/e2etests/regression_test.go
index d115f1ba0..6498d9ef3 100644
--- a/e2etests/regression_test.go
+++ b/e2etests/regression_test.go
@@ -148,6 +148,29 @@ apollo_workflow: apollo-deploy.yaml {
style.font-size: 20
}
}
+`,
+ },
+ {
+ name: "dagre_edge_label_spacing",
+ script: `direction: right
+
+build_workflow: lambda-build.yaml {
+
+ push: Push to main branch {
+ style.font-size: 25
+ }
+ GHA: GitHub Actions {
+ style.font-size: 25
+ }
+ S3.style.font-size: 25
+ Terraform.style.font-size: 25
+ AWS.style.font-size: 25
+
+ push -> GHA: Triggers
+ GHA -> S3: Builds zip & pushes it
+ S3 <-> Terraform: Pulls zip to deploy
+ Terraform -> AWS: Changes the live lambdas
+}
`,
},
}
diff --git a/e2etests/testdata/regression/dagre_edge_label_spacing/dagre/board.exp.json b/e2etests/testdata/regression/dagre_edge_label_spacing/dagre/board.exp.json
new file mode 100644
index 000000000..50eca01cc
--- /dev/null
+++ b/e2etests/testdata/regression/dagre_edge_label_spacing/dagre/board.exp.json
@@ -0,0 +1,439 @@
+{
+ "name": "",
+ "shapes": [
+ {
+ "id": "build_workflow",
+ "type": "",
+ "pos": {
+ "x": 0,
+ "y": 0
+ },
+ "width": 2148,
+ "height": 237,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "#E3E9FD",
+ "stroke": "#0D32B2",
+ "shadow": false,
+ "3d": false,
+ "multiple": false,
+ "tooltip": "",
+ "link": "",
+ "icon": null,
+ "iconPosition": "",
+ "blend": false,
+ "fields": null,
+ "methods": null,
+ "columns": null,
+ "label": "lambda-build.yaml",
+ "fontSize": 28,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#0A0F25",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 226,
+ "labelHeight": 41,
+ "labelPosition": "INSIDE_TOP_CENTER",
+ "zIndex": 0,
+ "level": 1
+ },
+ {
+ "id": "build_workflow.push",
+ "type": "",
+ "pos": {
+ "x": 105,
+ "y": 50
+ },
+ "width": 330,
+ "height": 137,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "#EDF0FD",
+ "stroke": "#0D32B2",
+ "shadow": false,
+ "3d": false,
+ "multiple": false,
+ "tooltip": "",
+ "link": "",
+ "icon": null,
+ "iconPosition": "",
+ "blend": false,
+ "fields": null,
+ "methods": null,
+ "columns": null,
+ "label": "Push to main branch",
+ "fontSize": 25,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#0A0F25",
+ "italic": false,
+ "bold": true,
+ "underline": false,
+ "labelWidth": 230,
+ "labelHeight": 37,
+ "labelPosition": "INSIDE_MIDDLE_CENTER",
+ "zIndex": 0,
+ "level": 2
+ },
+ {
+ "id": "build_workflow.GHA",
+ "type": "",
+ "pos": {
+ "x": 644,
+ "y": 50
+ },
+ "width": 269,
+ "height": 137,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "#EDF0FD",
+ "stroke": "#0D32B2",
+ "shadow": false,
+ "3d": false,
+ "multiple": false,
+ "tooltip": "",
+ "link": "",
+ "icon": null,
+ "iconPosition": "",
+ "blend": false,
+ "fields": null,
+ "methods": null,
+ "columns": null,
+ "label": "GitHub Actions",
+ "fontSize": 25,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#0A0F25",
+ "italic": false,
+ "bold": true,
+ "underline": false,
+ "labelWidth": 169,
+ "labelHeight": 37,
+ "labelPosition": "INSIDE_MIDDLE_CENTER",
+ "zIndex": 0,
+ "level": 2
+ },
+ {
+ "id": "build_workflow.S3",
+ "type": "",
+ "pos": {
+ "x": 1122,
+ "y": 50
+ },
+ "width": 131,
+ "height": 137,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "#EDF0FD",
+ "stroke": "#0D32B2",
+ "shadow": false,
+ "3d": false,
+ "multiple": false,
+ "tooltip": "",
+ "link": "",
+ "icon": null,
+ "iconPosition": "",
+ "blend": false,
+ "fields": null,
+ "methods": null,
+ "columns": null,
+ "label": "S3",
+ "fontSize": 25,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#0A0F25",
+ "italic": false,
+ "bold": true,
+ "underline": false,
+ "labelWidth": 31,
+ "labelHeight": 37,
+ "labelPosition": "INSIDE_MIDDLE_CENTER",
+ "zIndex": 0,
+ "level": 2
+ },
+ {
+ "id": "build_workflow.Terraform",
+ "type": "",
+ "pos": {
+ "x": 1462,
+ "y": 50
+ },
+ "width": 218,
+ "height": 137,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "#EDF0FD",
+ "stroke": "#0D32B2",
+ "shadow": false,
+ "3d": false,
+ "multiple": false,
+ "tooltip": "",
+ "link": "",
+ "icon": null,
+ "iconPosition": "",
+ "blend": false,
+ "fields": null,
+ "methods": null,
+ "columns": null,
+ "label": "Terraform",
+ "fontSize": 25,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#0A0F25",
+ "italic": false,
+ "bold": true,
+ "underline": false,
+ "labelWidth": 118,
+ "labelHeight": 37,
+ "labelPosition": "INSIDE_MIDDLE_CENTER",
+ "zIndex": 0,
+ "level": 2
+ },
+ {
+ "id": "build_workflow.AWS",
+ "type": "",
+ "pos": {
+ "x": 1889,
+ "y": 50
+ },
+ "width": 155,
+ "height": 137,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "#EDF0FD",
+ "stroke": "#0D32B2",
+ "shadow": false,
+ "3d": false,
+ "multiple": false,
+ "tooltip": "",
+ "link": "",
+ "icon": null,
+ "iconPosition": "",
+ "blend": false,
+ "fields": null,
+ "methods": null,
+ "columns": null,
+ "label": "AWS",
+ "fontSize": 25,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#0A0F25",
+ "italic": false,
+ "bold": true,
+ "underline": false,
+ "labelWidth": 55,
+ "labelHeight": 37,
+ "labelPosition": "INSIDE_MIDDLE_CENTER",
+ "zIndex": 0,
+ "level": 2
+ }
+ ],
+ "connections": [
+ {
+ "id": "build_workflow.(push -> GHA)[0]",
+ "src": "build_workflow.push",
+ "srcArrow": "none",
+ "srcLabel": "",
+ "dst": "build_workflow.GHA",
+ "dstArrow": "triangle",
+ "dstLabel": "",
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "stroke": "#0D32B2",
+ "label": "Triggers",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#676C7E",
+ "italic": true,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 54,
+ "labelHeight": 21,
+ "labelPosition": "INSIDE_MIDDLE_CENTER",
+ "labelPercentage": 0,
+ "route": [
+ {
+ "x": 435.5,
+ "y": 118.5
+ },
+ {
+ "x": 518.3,
+ "y": 118.5
+ },
+ {
+ "x": 559.9,
+ "y": 118.5
+ },
+ {
+ "x": 643.5,
+ "y": 118.5
+ }
+ ],
+ "isCurve": true,
+ "animated": false,
+ "tooltip": "",
+ "icon": null,
+ "zIndex": 0
+ },
+ {
+ "id": "build_workflow.(GHA -> S3)[0]",
+ "src": "build_workflow.GHA",
+ "srcArrow": "none",
+ "srcLabel": "",
+ "dst": "build_workflow.S3",
+ "dstArrow": "triangle",
+ "dstLabel": "",
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "stroke": "#0D32B2",
+ "label": "Builds zip & pushes it",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#676C7E",
+ "italic": true,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 138,
+ "labelHeight": 21,
+ "labelPosition": "INSIDE_MIDDLE_CENTER",
+ "labelPercentage": 0,
+ "route": [
+ {
+ "x": 913.5,
+ "y": 118.5
+ },
+ {
+ "x": 996.3,
+ "y": 118.5
+ },
+ {
+ "x": 1037.9,
+ "y": 118.5
+ },
+ {
+ "x": 1121.5,
+ "y": 118.5
+ }
+ ],
+ "isCurve": true,
+ "animated": false,
+ "tooltip": "",
+ "icon": null,
+ "zIndex": 0
+ },
+ {
+ "id": "build_workflow.(S3 <-> Terraform)[0]",
+ "src": "build_workflow.S3",
+ "srcArrow": "triangle",
+ "srcLabel": "",
+ "dst": "build_workflow.Terraform",
+ "dstArrow": "triangle",
+ "dstLabel": "",
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "stroke": "#0D32B2",
+ "label": "Pulls zip to deploy",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#676C7E",
+ "italic": true,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 119,
+ "labelHeight": 21,
+ "labelPosition": "INSIDE_MIDDLE_CENTER",
+ "labelPercentage": 0,
+ "route": [
+ {
+ "x": 1253.5,
+ "y": 118.5
+ },
+ {
+ "x": 1336.3,
+ "y": 118.5
+ },
+ {
+ "x": 1377.9,
+ "y": 118.5
+ },
+ {
+ "x": 1461.5,
+ "y": 118.5
+ }
+ ],
+ "isCurve": true,
+ "animated": false,
+ "tooltip": "",
+ "icon": null,
+ "zIndex": 0
+ },
+ {
+ "id": "build_workflow.(Terraform -> AWS)[0]",
+ "src": "build_workflow.Terraform",
+ "srcArrow": "none",
+ "srcLabel": "",
+ "dst": "build_workflow.AWS",
+ "dstArrow": "triangle",
+ "dstLabel": "",
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "stroke": "#0D32B2",
+ "label": "Changes the live lambdas",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#676C7E",
+ "italic": true,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 169,
+ "labelHeight": 21,
+ "labelPosition": "INSIDE_MIDDLE_CENTER",
+ "labelPercentage": 0,
+ "route": [
+ {
+ "x": 1680.5,
+ "y": 118.5
+ },
+ {
+ "x": 1763.3,
+ "y": 118.5
+ },
+ {
+ "x": 1804.9,
+ "y": 118.5
+ },
+ {
+ "x": 1888.5,
+ "y": 118.5
+ }
+ ],
+ "isCurve": true,
+ "animated": false,
+ "tooltip": "",
+ "icon": null,
+ "zIndex": 0
+ }
+ ]
+}
diff --git a/e2etests/testdata/regression/dagre_edge_label_spacing/dagre/sketch.exp.svg b/e2etests/testdata/regression/dagre_edge_label_spacing/dagre/sketch.exp.svg
new file mode 100644
index 000000000..fe87ffcc1
--- /dev/null
+++ b/e2etests/testdata/regression/dagre_edge_label_spacing/dagre/sketch.exp.svg
@@ -0,0 +1,48 @@
+
+
\ No newline at end of file
diff --git a/e2etests/testdata/regression/dagre_edge_label_spacing/elk/board.exp.json b/e2etests/testdata/regression/dagre_edge_label_spacing/elk/board.exp.json
new file mode 100644
index 000000000..6ea04a102
--- /dev/null
+++ b/e2etests/testdata/regression/dagre_edge_label_spacing/elk/board.exp.json
@@ -0,0 +1,403 @@
+{
+ "name": "",
+ "shapes": [
+ {
+ "id": "build_workflow",
+ "type": "",
+ "pos": {
+ "x": 12,
+ "y": 12
+ },
+ "width": 1893,
+ "height": 287,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "#E3E9FD",
+ "stroke": "#0D32B2",
+ "shadow": false,
+ "3d": false,
+ "multiple": false,
+ "tooltip": "",
+ "link": "",
+ "icon": null,
+ "iconPosition": "",
+ "blend": false,
+ "fields": null,
+ "methods": null,
+ "columns": null,
+ "label": "lambda-build.yaml",
+ "fontSize": 28,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#0A0F25",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 226,
+ "labelHeight": 41,
+ "labelPosition": "INSIDE_TOP_CENTER",
+ "zIndex": 0,
+ "level": 1
+ },
+ {
+ "id": "build_workflow.push",
+ "type": "",
+ "pos": {
+ "x": 87,
+ "y": 87
+ },
+ "width": 330,
+ "height": 137,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "#EDF0FD",
+ "stroke": "#0D32B2",
+ "shadow": false,
+ "3d": false,
+ "multiple": false,
+ "tooltip": "",
+ "link": "",
+ "icon": null,
+ "iconPosition": "",
+ "blend": false,
+ "fields": null,
+ "methods": null,
+ "columns": null,
+ "label": "Push to main branch",
+ "fontSize": 25,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#0A0F25",
+ "italic": false,
+ "bold": true,
+ "underline": false,
+ "labelWidth": 230,
+ "labelHeight": 37,
+ "labelPosition": "INSIDE_MIDDLE_CENTER",
+ "zIndex": 0,
+ "level": 2
+ },
+ {
+ "id": "build_workflow.GHA",
+ "type": "",
+ "pos": {
+ "x": 511,
+ "y": 87
+ },
+ "width": 269,
+ "height": 137,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "#EDF0FD",
+ "stroke": "#0D32B2",
+ "shadow": false,
+ "3d": false,
+ "multiple": false,
+ "tooltip": "",
+ "link": "",
+ "icon": null,
+ "iconPosition": "",
+ "blend": false,
+ "fields": null,
+ "methods": null,
+ "columns": null,
+ "label": "GitHub Actions",
+ "fontSize": 25,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#0A0F25",
+ "italic": false,
+ "bold": true,
+ "underline": false,
+ "labelWidth": 169,
+ "labelHeight": 37,
+ "labelPosition": "INSIDE_MIDDLE_CENTER",
+ "zIndex": 0,
+ "level": 2
+ },
+ {
+ "id": "build_workflow.S3",
+ "type": "",
+ "pos": {
+ "x": 958,
+ "y": 87
+ },
+ "width": 131,
+ "height": 137,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "#EDF0FD",
+ "stroke": "#0D32B2",
+ "shadow": false,
+ "3d": false,
+ "multiple": false,
+ "tooltip": "",
+ "link": "",
+ "icon": null,
+ "iconPosition": "",
+ "blend": false,
+ "fields": null,
+ "methods": null,
+ "columns": null,
+ "label": "S3",
+ "fontSize": 25,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#0A0F25",
+ "italic": false,
+ "bold": true,
+ "underline": false,
+ "labelWidth": 31,
+ "labelHeight": 37,
+ "labelPosition": "INSIDE_MIDDLE_CENTER",
+ "zIndex": 0,
+ "level": 2
+ },
+ {
+ "id": "build_workflow.Terraform",
+ "type": "",
+ "pos": {
+ "x": 1248,
+ "y": 87
+ },
+ "width": 218,
+ "height": 137,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "#EDF0FD",
+ "stroke": "#0D32B2",
+ "shadow": false,
+ "3d": false,
+ "multiple": false,
+ "tooltip": "",
+ "link": "",
+ "icon": null,
+ "iconPosition": "",
+ "blend": false,
+ "fields": null,
+ "methods": null,
+ "columns": null,
+ "label": "Terraform",
+ "fontSize": 25,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#0A0F25",
+ "italic": false,
+ "bold": true,
+ "underline": false,
+ "labelWidth": 118,
+ "labelHeight": 37,
+ "labelPosition": "INSIDE_MIDDLE_CENTER",
+ "zIndex": 0,
+ "level": 2
+ },
+ {
+ "id": "build_workflow.AWS",
+ "type": "",
+ "pos": {
+ "x": 1675,
+ "y": 87
+ },
+ "width": 155,
+ "height": 137,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "#EDF0FD",
+ "stroke": "#0D32B2",
+ "shadow": false,
+ "3d": false,
+ "multiple": false,
+ "tooltip": "",
+ "link": "",
+ "icon": null,
+ "iconPosition": "",
+ "blend": false,
+ "fields": null,
+ "methods": null,
+ "columns": null,
+ "label": "AWS",
+ "fontSize": 25,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#0A0F25",
+ "italic": false,
+ "bold": true,
+ "underline": false,
+ "labelWidth": 55,
+ "labelHeight": 37,
+ "labelPosition": "INSIDE_MIDDLE_CENTER",
+ "zIndex": 0,
+ "level": 2
+ }
+ ],
+ "connections": [
+ {
+ "id": "build_workflow.(push -> GHA)[0]",
+ "src": "build_workflow.push",
+ "srcArrow": "none",
+ "srcLabel": "",
+ "dst": "build_workflow.GHA",
+ "dstArrow": "triangle",
+ "dstLabel": "",
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "stroke": "#0D32B2",
+ "label": "Triggers",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#676C7E",
+ "italic": true,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 54,
+ "labelHeight": 21,
+ "labelPosition": "INSIDE_MIDDLE_CENTER",
+ "labelPercentage": 0,
+ "route": [
+ {
+ "x": 417,
+ "y": 155.5
+ },
+ {
+ "x": 511,
+ "y": 155.5
+ }
+ ],
+ "animated": false,
+ "tooltip": "",
+ "icon": null,
+ "zIndex": 0
+ },
+ {
+ "id": "build_workflow.(GHA -> S3)[0]",
+ "src": "build_workflow.GHA",
+ "srcArrow": "none",
+ "srcLabel": "",
+ "dst": "build_workflow.S3",
+ "dstArrow": "triangle",
+ "dstLabel": "",
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "stroke": "#0D32B2",
+ "label": "Builds zip & pushes it",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#676C7E",
+ "italic": true,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 138,
+ "labelHeight": 21,
+ "labelPosition": "INSIDE_MIDDLE_CENTER",
+ "labelPercentage": 0,
+ "route": [
+ {
+ "x": 780,
+ "y": 155.5
+ },
+ {
+ "x": 958,
+ "y": 155.5
+ }
+ ],
+ "animated": false,
+ "tooltip": "",
+ "icon": null,
+ "zIndex": 0
+ },
+ {
+ "id": "build_workflow.(S3 <-> Terraform)[0]",
+ "src": "build_workflow.S3",
+ "srcArrow": "triangle",
+ "srcLabel": "",
+ "dst": "build_workflow.Terraform",
+ "dstArrow": "triangle",
+ "dstLabel": "",
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "stroke": "#0D32B2",
+ "label": "Pulls zip to deploy",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#676C7E",
+ "italic": true,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 119,
+ "labelHeight": 21,
+ "labelPosition": "INSIDE_MIDDLE_CENTER",
+ "labelPercentage": 0,
+ "route": [
+ {
+ "x": 1089,
+ "y": 155.5
+ },
+ {
+ "x": 1248,
+ "y": 155.5
+ }
+ ],
+ "animated": false,
+ "tooltip": "",
+ "icon": null,
+ "zIndex": 0
+ },
+ {
+ "id": "build_workflow.(Terraform -> AWS)[0]",
+ "src": "build_workflow.Terraform",
+ "srcArrow": "none",
+ "srcLabel": "",
+ "dst": "build_workflow.AWS",
+ "dstArrow": "triangle",
+ "dstLabel": "",
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "stroke": "#0D32B2",
+ "label": "Changes the live lambdas",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#676C7E",
+ "italic": true,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 169,
+ "labelHeight": 21,
+ "labelPosition": "INSIDE_MIDDLE_CENTER",
+ "labelPercentage": 0,
+ "route": [
+ {
+ "x": 1466,
+ "y": 155.5
+ },
+ {
+ "x": 1675,
+ "y": 155.5
+ }
+ ],
+ "animated": false,
+ "tooltip": "",
+ "icon": null,
+ "zIndex": 0
+ }
+ ]
+}
diff --git a/e2etests/testdata/regression/dagre_edge_label_spacing/elk/sketch.exp.svg b/e2etests/testdata/regression/dagre_edge_label_spacing/elk/sketch.exp.svg
new file mode 100644
index 000000000..33be96f29
--- /dev/null
+++ b/e2etests/testdata/regression/dagre_edge_label_spacing/elk/sketch.exp.svg
@@ -0,0 +1,48 @@
+
+
\ No newline at end of file
diff --git a/e2etests/testdata/regression/elk_alignment/dagre/board.exp.json b/e2etests/testdata/regression/elk_alignment/dagre/board.exp.json
index 8a8cda91a..f869f9bde 100644
--- a/e2etests/testdata/regression/elk_alignment/dagre/board.exp.json
+++ b/e2etests/testdata/regression/elk_alignment/dagre/board.exp.json
@@ -9,7 +9,7 @@
"y": 0
},
"width": 430,
- "height": 1235,
+ "height": 1488,
"opacity": 1,
"strokeDash": 0,
"strokeWidth": 2,
@@ -46,7 +46,7 @@
"type": "",
"pos": {
"x": 50,
- "y": 50
+ "y": 73
},
"width": 330,
"height": 137,
@@ -86,7 +86,7 @@
"type": "",
"pos": {
"x": 81,
- "y": 287
+ "y": 356
},
"width": 269,
"height": 137,
@@ -126,7 +126,7 @@
"type": "",
"pos": {
"x": 150,
- "y": 524
+ "y": 639
},
"width": 131,
"height": 137,
@@ -166,7 +166,7 @@
"type": "",
"pos": {
"x": 106,
- "y": 811
+ "y": 995
},
"width": 218,
"height": 137,
@@ -206,7 +206,7 @@
"type": "",
"pos": {
"x": 138,
- "y": 1048
+ "y": 1278
},
"width": 155,
"height": 137,
@@ -249,7 +249,7 @@
"y": 0
},
"width": 371,
- "height": 711,
+ "height": 849,
"opacity": 1,
"strokeDash": 0,
"strokeWidth": 2,
@@ -286,7 +286,7 @@
"type": "",
"pos": {
"x": 520,
- "y": 50
+ "y": 73
},
"width": 271,
"height": 137,
@@ -326,7 +326,7 @@
"type": "",
"pos": {
"x": 521,
- "y": 287
+ "y": 356
},
"width": 269,
"height": 137,
@@ -366,7 +366,7 @@
"type": "",
"pos": {
"x": 578,
- "y": 524
+ "y": 639
},
"width": 155,
"height": 137,
@@ -409,7 +409,7 @@
"y": 0
},
"width": 369,
- "height": 711,
+ "height": 849,
"opacity": 1,
"strokeDash": 0,
"strokeWidth": 2,
@@ -446,7 +446,7 @@
"type": "",
"pos": {
"x": 947,
- "y": 50
+ "y": 73
},
"width": 238,
"height": 137,
@@ -486,7 +486,7 @@
"type": "",
"pos": {
"x": 931,
- "y": 287
+ "y": 356
},
"width": 269,
"height": 137,
@@ -526,7 +526,7 @@
"type": "",
"pos": {
"x": 988,
- "y": 524
+ "y": 639
},
"width": 155,
"height": 137,
@@ -590,19 +590,19 @@
"route": [
{
"x": 215,
- "y": 187
+ "y": 210
},
{
"x": 215,
- "y": 227
+ "y": 268.4
},
{
"x": 215,
- "y": 247
+ "y": 297.6
},
{
"x": 215,
- "y": 287
+ "y": 356
}
],
"isCurve": true,
@@ -638,19 +638,19 @@
"route": [
{
"x": 215,
- "y": 424
+ "y": 493
},
{
"x": 215,
- "y": 464
+ "y": 551.4
},
{
"x": 215,
- "y": 484
+ "y": 580.6
},
{
"x": 215,
- "y": 524
+ "y": 639
}
],
"isCurve": true,
@@ -686,19 +686,19 @@
"route": [
{
"x": 215,
- "y": 661
+ "y": 776
},
{
"x": 215,
- "y": 701
+ "y": 834.4
},
{
"x": 215,
- "y": 771
+ "y": 936.6
},
{
"x": 215,
- "y": 811
+ "y": 995
}
],
"isCurve": true,
@@ -734,19 +734,19 @@
"route": [
{
"x": 215,
- "y": 948
+ "y": 1132
},
{
"x": 215,
- "y": 988
+ "y": 1190.4
},
{
"x": 215,
- "y": 1008
+ "y": 1219.6
},
{
"x": 215,
- "y": 1048
+ "y": 1278
}
],
"isCurve": true,
@@ -782,19 +782,19 @@
"route": [
{
"x": 655.5,
- "y": 187
+ "y": 210
},
{
"x": 655.5,
- "y": 227
+ "y": 268.4
},
{
"x": 655.5,
- "y": 247
+ "y": 297.6
},
{
"x": 655.5,
- "y": 287
+ "y": 356
}
],
"isCurve": true,
@@ -830,19 +830,19 @@
"route": [
{
"x": 655.5,
- "y": 424
+ "y": 493
},
{
"x": 655.5,
- "y": 464
+ "y": 551.4
},
{
"x": 655.5,
- "y": 484
+ "y": 580.6
},
{
"x": 655.5,
- "y": 524
+ "y": 639
}
],
"isCurve": true,
@@ -878,19 +878,19 @@
"route": [
{
"x": 1065.5,
- "y": 187
+ "y": 210
},
{
"x": 1065.5,
- "y": 227
+ "y": 268.4
},
{
"x": 1065.5,
- "y": 247
+ "y": 297.6
},
{
"x": 1065.5,
- "y": 287
+ "y": 356
}
],
"isCurve": true,
@@ -926,19 +926,19 @@
"route": [
{
"x": 1065.5,
- "y": 424
+ "y": 493
},
{
"x": 1065.5,
- "y": 464
+ "y": 551.4
},
{
"x": 1065.5,
- "y": 484
+ "y": 580.6
},
{
"x": 1065.5,
- "y": 524
+ "y": 639
}
],
"isCurve": true,
diff --git a/e2etests/testdata/regression/elk_alignment/dagre/sketch.exp.svg b/e2etests/testdata/regression/elk_alignment/dagre/sketch.exp.svg
index c2f959670..d2807cff6 100644
--- a/e2etests/testdata/regression/elk_alignment/dagre/sketch.exp.svg
+++ b/e2etests/testdata/regression/elk_alignment/dagre/sketch.exp.svg
@@ -2,7 +2,7 @@