diff --git a/e2etests/regression_test.go b/e2etests/regression_test.go
index e66d250ed..55bc62b14 100644
--- a/e2etests/regression_test.go
+++ b/e2etests/regression_test.go
@@ -1038,6 +1038,7 @@ cf many required: {
loadFromFile(t, "cylinder_grid_label"),
loadFromFile(t, "grid_with_latex"),
loadFromFile(t, "icons_on_top"),
+ loadFromFile(t, "dagre_disconnected_edge"),
}
runa(t, tcs)
diff --git a/e2etests/testdata/files/dagre_disconnected_edge.d2 b/e2etests/testdata/files/dagre_disconnected_edge.d2
new file mode 100644
index 000000000..a51b8241c
--- /dev/null
+++ b/e2etests/testdata/files/dagre_disconnected_edge.d2
@@ -0,0 +1,13 @@
+x -> y
+
+x: program {
+ label.near: top-center
+ icon: https://icons.terrastruct.com/essentials%2F005-programmer.svg
+ icon.near: outside-top-right
+}
+
+y: profits {
+ label.near: bottom-right
+ icon: https://icons.terrastruct.com/essentials%2Fprofits.svg
+ icon.near: outside-left-center
+}
diff --git a/e2etests/testdata/regression/dagre_disconnected_edge/dagre/board.exp.json b/e2etests/testdata/regression/dagre_disconnected_edge/dagre/board.exp.json
new file mode 100644
index 000000000..0c668d3c9
--- /dev/null
+++ b/e2etests/testdata/regression/dagre_disconnected_edge/dagre/board.exp.json
@@ -0,0 +1,202 @@
+{
+ "name": "",
+ "isFolderOnly": false,
+ "fontFamily": "SourceSansPro",
+ "shapes": [
+ {
+ "id": "x",
+ "type": "rectangle",
+ "pos": {
+ "x": 0,
+ "y": 0
+ },
+ "width": 131,
+ "height": 92,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "B6",
+ "stroke": "B1",
+ "shadow": false,
+ "3d": false,
+ "multiple": false,
+ "double-border": false,
+ "tooltip": "",
+ "link": "",
+ "icon": {
+ "Scheme": "https",
+ "Opaque": "",
+ "User": null,
+ "Host": "icons.terrastruct.com",
+ "Path": "/essentials/005-programmer.svg",
+ "RawPath": "/essentials%2F005-programmer.svg",
+ "OmitHost": false,
+ "ForceQuery": false,
+ "RawQuery": "",
+ "Fragment": "",
+ "RawFragment": ""
+ },
+ "iconPosition": "OUTSIDE_TOP_RIGHT",
+ "blend": false,
+ "fields": null,
+ "methods": null,
+ "columns": null,
+ "label": "program",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "N1",
+ "italic": false,
+ "bold": true,
+ "underline": false,
+ "labelWidth": 60,
+ "labelHeight": 21,
+ "labelPosition": "INSIDE_TOP_CENTER",
+ "zIndex": 0,
+ "level": 1
+ },
+ {
+ "id": "y",
+ "type": "rectangle",
+ "pos": {
+ "x": 81,
+ "y": 192
+ },
+ "width": 118,
+ "height": 92,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "B6",
+ "stroke": "B1",
+ "shadow": false,
+ "3d": false,
+ "multiple": false,
+ "double-border": false,
+ "tooltip": "",
+ "link": "",
+ "icon": {
+ "Scheme": "https",
+ "Opaque": "",
+ "User": null,
+ "Host": "icons.terrastruct.com",
+ "Path": "/essentials/profits.svg",
+ "RawPath": "/essentials%2Fprofits.svg",
+ "OmitHost": false,
+ "ForceQuery": false,
+ "RawQuery": "",
+ "Fragment": "",
+ "RawFragment": ""
+ },
+ "iconPosition": "OUTSIDE_LEFT_MIDDLE",
+ "blend": false,
+ "fields": null,
+ "methods": null,
+ "columns": null,
+ "label": "profits",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "N1",
+ "italic": false,
+ "bold": true,
+ "underline": false,
+ "labelWidth": 47,
+ "labelHeight": 21,
+ "labelPosition": "INSIDE_BOTTOM_RIGHT",
+ "zIndex": 0,
+ "level": 1
+ }
+ ],
+ "connections": [
+ {
+ "id": "(x -> y)[0]",
+ "src": "x",
+ "srcArrow": "none",
+ "dst": "y",
+ "dstArrow": "triangle",
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "stroke": "B1",
+ "borderRadius": 10,
+ "label": "",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "N2",
+ "italic": true,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 0,
+ "labelHeight": 0,
+ "labelPosition": "",
+ "labelPercentage": 0,
+ "route": [
+ {
+ "x": 139.5,
+ "y": 92
+ },
+ {
+ "x": 139.5,
+ "y": 132
+ },
+ {
+ "x": 139.5,
+ "y": 152
+ },
+ {
+ "x": 139.5,
+ "y": 192
+ }
+ ],
+ "isCurve": true,
+ "animated": false,
+ "tooltip": "",
+ "icon": null,
+ "zIndex": 0
+ }
+ ],
+ "root": {
+ "id": "",
+ "type": "",
+ "pos": {
+ "x": 0,
+ "y": 0
+ },
+ "width": 0,
+ "height": 0,
+ "opacity": 0,
+ "strokeDash": 0,
+ "strokeWidth": 0,
+ "borderRadius": 0,
+ "fill": "N7",
+ "stroke": "",
+ "shadow": false,
+ "3d": false,
+ "multiple": false,
+ "double-border": false,
+ "tooltip": "",
+ "link": "",
+ "icon": null,
+ "iconPosition": "",
+ "blend": false,
+ "fields": null,
+ "methods": null,
+ "columns": null,
+ "label": "",
+ "fontSize": 0,
+ "fontFamily": "",
+ "language": "",
+ "color": "",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 0,
+ "labelHeight": 0,
+ "zIndex": 0,
+ "level": 0
+ }
+}
diff --git a/e2etests/testdata/regression/dagre_disconnected_edge/dagre/sketch.exp.svg b/e2etests/testdata/regression/dagre_disconnected_edge/dagre/sketch.exp.svg
new file mode 100644
index 000000000..af5c010ef
--- /dev/null
+++ b/e2etests/testdata/regression/dagre_disconnected_edge/dagre/sketch.exp.svg
@@ -0,0 +1,96 @@
+
\ No newline at end of file
diff --git a/e2etests/testdata/regression/dagre_disconnected_edge/elk/board.exp.json b/e2etests/testdata/regression/dagre_disconnected_edge/elk/board.exp.json
new file mode 100644
index 000000000..4630de718
--- /dev/null
+++ b/e2etests/testdata/regression/dagre_disconnected_edge/elk/board.exp.json
@@ -0,0 +1,193 @@
+{
+ "name": "",
+ "isFolderOnly": false,
+ "fontFamily": "SourceSansPro",
+ "shapes": [
+ {
+ "id": "x",
+ "type": "rectangle",
+ "pos": {
+ "x": 40,
+ "y": 12
+ },
+ "width": 131,
+ "height": 118,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "B6",
+ "stroke": "B1",
+ "shadow": false,
+ "3d": false,
+ "multiple": false,
+ "double-border": false,
+ "tooltip": "",
+ "link": "",
+ "icon": {
+ "Scheme": "https",
+ "Opaque": "",
+ "User": null,
+ "Host": "icons.terrastruct.com",
+ "Path": "/essentials/005-programmer.svg",
+ "RawPath": "/essentials%2F005-programmer.svg",
+ "OmitHost": false,
+ "ForceQuery": false,
+ "RawQuery": "",
+ "Fragment": "",
+ "RawFragment": ""
+ },
+ "iconPosition": "OUTSIDE_TOP_RIGHT",
+ "blend": false,
+ "fields": null,
+ "methods": null,
+ "columns": null,
+ "label": "program",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "N1",
+ "italic": false,
+ "bold": true,
+ "underline": false,
+ "labelWidth": 60,
+ "labelHeight": 21,
+ "labelPosition": "INSIDE_TOP_CENTER",
+ "zIndex": 0,
+ "level": 1
+ },
+ {
+ "id": "y",
+ "type": "rectangle",
+ "pos": {
+ "x": 81,
+ "y": 200
+ },
+ "width": 118,
+ "height": 118,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "B6",
+ "stroke": "B1",
+ "shadow": false,
+ "3d": false,
+ "multiple": false,
+ "double-border": false,
+ "tooltip": "",
+ "link": "",
+ "icon": {
+ "Scheme": "https",
+ "Opaque": "",
+ "User": null,
+ "Host": "icons.terrastruct.com",
+ "Path": "/essentials/profits.svg",
+ "RawPath": "/essentials%2Fprofits.svg",
+ "OmitHost": false,
+ "ForceQuery": false,
+ "RawQuery": "",
+ "Fragment": "",
+ "RawFragment": ""
+ },
+ "iconPosition": "OUTSIDE_LEFT_MIDDLE",
+ "blend": false,
+ "fields": null,
+ "methods": null,
+ "columns": null,
+ "label": "profits",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "N1",
+ "italic": false,
+ "bold": true,
+ "underline": false,
+ "labelWidth": 47,
+ "labelHeight": 21,
+ "labelPosition": "INSIDE_BOTTOM_RIGHT",
+ "zIndex": 0,
+ "level": 1
+ }
+ ],
+ "connections": [
+ {
+ "id": "(x -> y)[0]",
+ "src": "x",
+ "srcArrow": "none",
+ "dst": "y",
+ "dstArrow": "triangle",
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "stroke": "B1",
+ "borderRadius": 10,
+ "label": "",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "N2",
+ "italic": true,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 0,
+ "labelHeight": 0,
+ "labelPosition": "",
+ "labelPercentage": 0,
+ "route": [
+ {
+ "x": 105.5,
+ "y": 130
+ },
+ {
+ "x": 105.5,
+ "y": 200
+ }
+ ],
+ "animated": false,
+ "tooltip": "",
+ "icon": null,
+ "zIndex": 0
+ }
+ ],
+ "root": {
+ "id": "",
+ "type": "",
+ "pos": {
+ "x": 0,
+ "y": 0
+ },
+ "width": 0,
+ "height": 0,
+ "opacity": 0,
+ "strokeDash": 0,
+ "strokeWidth": 0,
+ "borderRadius": 0,
+ "fill": "N7",
+ "stroke": "",
+ "shadow": false,
+ "3d": false,
+ "multiple": false,
+ "double-border": false,
+ "tooltip": "",
+ "link": "",
+ "icon": null,
+ "iconPosition": "",
+ "blend": false,
+ "fields": null,
+ "methods": null,
+ "columns": null,
+ "label": "",
+ "fontSize": 0,
+ "fontFamily": "",
+ "language": "",
+ "color": "",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 0,
+ "labelHeight": 0,
+ "zIndex": 0,
+ "level": 0
+ }
+}
diff --git a/e2etests/testdata/regression/dagre_disconnected_edge/elk/sketch.exp.svg b/e2etests/testdata/regression/dagre_disconnected_edge/elk/sketch.exp.svg
new file mode 100644
index 000000000..37e784f9a
--- /dev/null
+++ b/e2etests/testdata/regression/dagre_disconnected_edge/elk/sketch.exp.svg
@@ -0,0 +1,96 @@
+programprofits
+
+
+
+
\ No newline at end of file