diff --git a/e2etests/testdata/files/overlapping_child_label.d2 b/e2etests/testdata/files/overlapping_child_label.d2
index 8af560505..c8e945e91 100644
--- a/e2etests/testdata/files/overlapping_child_label.d2
+++ b/e2etests/testdata/files/overlapping_child_label.d2
@@ -4,30 +4,42 @@ heyy: {
hey.label.near: outside-bottom-right
}
-ayyy: {
+aaaa: {
label.near: top-right
icon.near: top-left
class: icon
- beee: {
+ bbbb: {
label.near: outside-top-left
icon.near: outside-top-right
class: icon
}
}
-ceee: {
+cccc: {
label.near: top-right
icon.near: bottom-left
class: icon
- deee: {
+ dddd: {
label.near: outside-top-right
icon.near: outside-bottom-left
class: icon
}
}
+eeeeeeeeeeeeeeeeeee: {
+ label.near: center-right
+ icon.near: center-left
+ class: icon
+
+ fffffffffff: {
+ label.near: outside-right-center
+ icon.near: outside-left-center
+ class: icon
+ }
+}
+
classes: {
icon.icon: https://icons.terrastruct.com/essentials/time.svg
}
diff --git a/e2etests/testdata/stable/overlapping_child_label/dagre/board.exp.json b/e2etests/testdata/stable/overlapping_child_label/dagre/board.exp.json
index d4b5af472..68e4a89c8 100644
--- a/e2etests/testdata/stable/overlapping_child_label/dagre/board.exp.json
+++ b/e2etests/testdata/stable/overlapping_child_label/dagre/board.exp.json
@@ -11,7 +11,7 @@
"y": 33
},
"width": 131,
- "height": 490,
+ "height": 500,
"opacity": 1,
"strokeDash": 0,
"strokeWidth": 2,
@@ -127,17 +127,17 @@
"level": 2
},
{
- "id": "ayyy",
+ "id": "aaaa",
"type": "rectangle",
"classes": [
"icon"
],
"pos": {
"x": 181,
- "y": -60
+ "y": -70
},
- "width": 164,
- "height": 232,
+ "width": 167,
+ "height": 242,
"opacity": 1,
"strokeDash": 0,
"strokeWidth": 2,
@@ -168,7 +168,7 @@
"fields": null,
"methods": null,
"columns": null,
- "label": "ayyy",
+ "label": "aaaa",
"fontSize": 28,
"fontFamily": "DEFAULT",
"language": "",
@@ -176,14 +176,14 @@
"italic": false,
"bold": false,
"underline": false,
- "labelWidth": 53,
+ "labelWidth": 55,
"labelHeight": 36,
"labelPosition": "INSIDE_TOP_RIGHT",
"zIndex": 0,
"level": 1
},
{
- "id": "ayyy.beee",
+ "id": "aaaa.bbbb",
"type": "rectangle",
"classes": [
"icon"
@@ -192,7 +192,7 @@
"x": 211,
"y": 50
},
- "width": 104,
+ "width": 107,
"height": 92,
"opacity": 1,
"strokeDash": 0,
@@ -224,7 +224,7 @@
"fields": null,
"methods": null,
"columns": null,
- "label": "beee",
+ "label": "bbbb",
"fontSize": 16,
"fontFamily": "DEFAULT",
"language": "",
@@ -232,24 +232,24 @@
"italic": false,
"bold": true,
"underline": false,
- "labelWidth": 33,
+ "labelWidth": 36,
"labelHeight": 21,
"labelPosition": "OUTSIDE_TOP_LEFT",
"zIndex": 0,
"level": 2
},
{
- "id": "ceee",
+ "id": "cccc",
"type": "rectangle",
"classes": [
"icon"
],
"pos": {
- "x": 385,
- "y": -17
+ "x": 388,
+ "y": -27
},
- "width": 165,
- "height": 297,
+ "width": 168,
+ "height": 317,
"opacity": 1,
"strokeDash": 0,
"strokeWidth": 2,
@@ -280,7 +280,7 @@
"fields": null,
"methods": null,
"columns": null,
- "label": "ceee",
+ "label": "cccc",
"fontSize": 28,
"fontFamily": "DEFAULT",
"language": "",
@@ -288,23 +288,23 @@
"italic": false,
"bold": false,
"underline": false,
- "labelWidth": 53,
+ "labelWidth": 51,
"labelHeight": 36,
"labelPosition": "INSIDE_TOP_RIGHT",
"zIndex": 0,
"level": 1
},
{
- "id": "ceee.deee",
+ "id": "cccc.dddd",
"type": "rectangle",
"classes": [
"icon"
],
"pos": {
- "x": 415,
+ "x": 418,
"y": 50
},
- "width": 105,
+ "width": 108,
"height": 92,
"opacity": 1,
"strokeDash": 0,
@@ -336,7 +336,7 @@
"fields": null,
"methods": null,
"columns": null,
- "label": "deee",
+ "label": "dddd",
"fontSize": 16,
"fontFamily": "DEFAULT",
"language": "",
@@ -344,11 +344,123 @@
"italic": false,
"bold": true,
"underline": false,
- "labelWidth": 34,
+ "labelWidth": 37,
"labelHeight": 21,
"labelPosition": "OUTSIDE_TOP_RIGHT",
"zIndex": 0,
"level": 2
+ },
+ {
+ "id": "eeeeeeeeeeeeeeeeeee",
+ "type": "rectangle",
+ "classes": [
+ "icon"
+ ],
+ "pos": {
+ "x": 626,
+ "y": 20
+ },
+ "width": 624,
+ "height": 152,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "B4",
+ "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/time.svg",
+ "RawPath": "",
+ "OmitHost": false,
+ "ForceQuery": false,
+ "RawQuery": "",
+ "Fragment": "",
+ "RawFragment": ""
+ },
+ "iconPosition": "INSIDE_MIDDLE_LEFT",
+ "blend": false,
+ "fields": null,
+ "methods": null,
+ "columns": null,
+ "label": "eeeeeeeeeeeeeeeeeee",
+ "fontSize": 28,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "N1",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 263,
+ "labelHeight": 36,
+ "labelPosition": "INSIDE_MIDDLE_RIGHT",
+ "zIndex": 0,
+ "level": 1
+ },
+ {
+ "id": "eeeeeeeeeeeeeeeeeee.fffffffffff",
+ "type": "rectangle",
+ "classes": [
+ "icon"
+ ],
+ "pos": {
+ "x": 774,
+ "y": 50
+ },
+ "width": 132,
+ "height": 92,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "B5",
+ "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/time.svg",
+ "RawPath": "",
+ "OmitHost": false,
+ "ForceQuery": false,
+ "RawQuery": "",
+ "Fragment": "",
+ "RawFragment": ""
+ },
+ "iconPosition": "OUTSIDE_LEFT_MIDDLE",
+ "blend": false,
+ "fields": null,
+ "methods": null,
+ "columns": null,
+ "label": "fffffffffff",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "N1",
+ "italic": false,
+ "bold": true,
+ "underline": false,
+ "labelWidth": 61,
+ "labelHeight": 21,
+ "labelPosition": "OUTSIDE_RIGHT_MIDDLE",
+ "zIndex": 0,
+ "level": 2
}
],
"connections": [
diff --git a/e2etests/testdata/stable/overlapping_child_label/dagre/sketch.exp.svg b/e2etests/testdata/stable/overlapping_child_label/dagre/sketch.exp.svg
index 1d315a75d..a18fd9f65 100644
--- a/e2etests/testdata/stable/overlapping_child_label/dagre/sketch.exp.svg
+++ b/e2etests/testdata/stable/overlapping_child_label/dagre/sketch.exp.svg
@@ -1,17 +1,17 @@
-
\ No newline at end of file
diff --git a/e2etests/testdata/stable/overlapping_child_label/elk/board.exp.json b/e2etests/testdata/stable/overlapping_child_label/elk/board.exp.json
index 9b2579ba4..f7d744bab 100644
--- a/e2etests/testdata/stable/overlapping_child_label/elk/board.exp.json
+++ b/e2etests/testdata/stable/overlapping_child_label/elk/board.exp.json
@@ -127,7 +127,7 @@
"level": 2
},
{
- "id": "ayyy",
+ "id": "aaaa",
"type": "rectangle",
"classes": [
"icon"
@@ -136,7 +136,7 @@
"x": 203,
"y": 42
},
- "width": 204,
+ "width": 207,
"height": 242,
"opacity": 1,
"strokeDash": 0,
@@ -168,7 +168,7 @@
"fields": null,
"methods": null,
"columns": null,
- "label": "ayyy",
+ "label": "aaaa",
"fontSize": 28,
"fontFamily": "DEFAULT",
"language": "",
@@ -176,14 +176,14 @@
"italic": false,
"bold": false,
"underline": false,
- "labelWidth": 53,
+ "labelWidth": 55,
"labelHeight": 36,
"labelPosition": "INSIDE_TOP_RIGHT",
"zIndex": 0,
"level": 1
},
{
- "id": "ayyy.beee",
+ "id": "aaaa.bbbb",
"type": "rectangle",
"classes": [
"icon"
@@ -192,7 +192,7 @@
"x": 253,
"y": 116
},
- "width": 104,
+ "width": 107,
"height": 118,
"opacity": 1,
"strokeDash": 0,
@@ -224,7 +224,7 @@
"fields": null,
"methods": null,
"columns": null,
- "label": "beee",
+ "label": "bbbb",
"fontSize": 16,
"fontFamily": "DEFAULT",
"language": "",
@@ -232,23 +232,23 @@
"italic": false,
"bold": true,
"underline": false,
- "labelWidth": 33,
+ "labelWidth": 36,
"labelHeight": 21,
"labelPosition": "OUTSIDE_TOP_LEFT",
"zIndex": 0,
"level": 2
},
{
- "id": "ceee",
+ "id": "cccc",
"type": "rectangle",
"classes": [
"icon"
],
"pos": {
- "x": 427,
+ "x": 430,
"y": 42
},
- "width": 205,
+ "width": 208,
"height": 242,
"opacity": 1,
"strokeDash": 0,
@@ -280,7 +280,7 @@
"fields": null,
"methods": null,
"columns": null,
- "label": "ceee",
+ "label": "cccc",
"fontSize": 28,
"fontFamily": "DEFAULT",
"language": "",
@@ -288,23 +288,23 @@
"italic": false,
"bold": false,
"underline": false,
- "labelWidth": 53,
+ "labelWidth": 51,
"labelHeight": 36,
"labelPosition": "INSIDE_TOP_RIGHT",
"zIndex": 0,
"level": 1
},
{
- "id": "ceee.deee",
+ "id": "cccc.dddd",
"type": "rectangle",
"classes": [
"icon"
],
"pos": {
- "x": 477,
+ "x": 480,
"y": 92
},
- "width": 105,
+ "width": 108,
"height": 118,
"opacity": 1,
"strokeDash": 0,
@@ -336,7 +336,7 @@
"fields": null,
"methods": null,
"columns": null,
- "label": "deee",
+ "label": "dddd",
"fontSize": 16,
"fontFamily": "DEFAULT",
"language": "",
@@ -344,11 +344,123 @@
"italic": false,
"bold": true,
"underline": false,
- "labelWidth": 34,
+ "labelWidth": 37,
"labelHeight": 21,
"labelPosition": "OUTSIDE_TOP_RIGHT",
"zIndex": 0,
"level": 2
+ },
+ {
+ "id": "eeeeeeeeeeeeeeeeeee",
+ "type": "rectangle",
+ "classes": [
+ "icon"
+ ],
+ "pos": {
+ "x": 658,
+ "y": 54
+ },
+ "width": 614,
+ "height": 218,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "B4",
+ "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/time.svg",
+ "RawPath": "",
+ "OmitHost": false,
+ "ForceQuery": false,
+ "RawQuery": "",
+ "Fragment": "",
+ "RawFragment": ""
+ },
+ "iconPosition": "INSIDE_MIDDLE_LEFT",
+ "blend": false,
+ "fields": null,
+ "methods": null,
+ "columns": null,
+ "label": "eeeeeeeeeeeeeeeeeee",
+ "fontSize": 28,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "N1",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 263,
+ "labelHeight": 36,
+ "labelPosition": "INSIDE_MIDDLE_RIGHT",
+ "zIndex": 0,
+ "level": 1
+ },
+ {
+ "id": "eeeeeeeeeeeeeeeeeee.fffffffffff",
+ "type": "rectangle",
+ "classes": [
+ "icon"
+ ],
+ "pos": {
+ "x": 801,
+ "y": 104
+ },
+ "width": 132,
+ "height": 118,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "B5",
+ "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/time.svg",
+ "RawPath": "",
+ "OmitHost": false,
+ "ForceQuery": false,
+ "RawQuery": "",
+ "Fragment": "",
+ "RawFragment": ""
+ },
+ "iconPosition": "OUTSIDE_LEFT_MIDDLE",
+ "blend": false,
+ "fields": null,
+ "methods": null,
+ "columns": null,
+ "label": "fffffffffff",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "N1",
+ "italic": false,
+ "bold": true,
+ "underline": false,
+ "labelWidth": 61,
+ "labelHeight": 21,
+ "labelPosition": "OUTSIDE_RIGHT_MIDDLE",
+ "zIndex": 0,
+ "level": 2
}
],
"connections": [
diff --git a/e2etests/testdata/stable/overlapping_child_label/elk/sketch.exp.svg b/e2etests/testdata/stable/overlapping_child_label/elk/sketch.exp.svg
index a96791eb4..701afc1a0 100644
--- a/e2etests/testdata/stable/overlapping_child_label/elk/sketch.exp.svg
+++ b/e2etests/testdata/stable/overlapping_child_label/elk/sketch.exp.svg
@@ -1,17 +1,17 @@
-heyyayyyceeeyoheybeeedeee
-
+ .d2-1602067992 .fill-N1{fill:#0A0F25;}
+ .d2-1602067992 .fill-N2{fill:#676C7E;}
+ .d2-1602067992 .fill-N3{fill:#9499AB;}
+ .d2-1602067992 .fill-N4{fill:#CFD2DD;}
+ .d2-1602067992 .fill-N5{fill:#DEE1EB;}
+ .d2-1602067992 .fill-N6{fill:#EEF1F8;}
+ .d2-1602067992 .fill-N7{fill:#FFFFFF;}
+ .d2-1602067992 .fill-B1{fill:#0D32B2;}
+ .d2-1602067992 .fill-B2{fill:#0D32B2;}
+ .d2-1602067992 .fill-B3{fill:#E3E9FD;}
+ .d2-1602067992 .fill-B4{fill:#E3E9FD;}
+ .d2-1602067992 .fill-B5{fill:#EDF0FD;}
+ .d2-1602067992 .fill-B6{fill:#F7F8FE;}
+ .d2-1602067992 .fill-AA2{fill:#4A6FF3;}
+ .d2-1602067992 .fill-AA4{fill:#EDF0FD;}
+ .d2-1602067992 .fill-AA5{fill:#F7F8FE;}
+ .d2-1602067992 .fill-AB4{fill:#EDF0FD;}
+ .d2-1602067992 .fill-AB5{fill:#F7F8FE;}
+ .d2-1602067992 .stroke-N1{stroke:#0A0F25;}
+ .d2-1602067992 .stroke-N2{stroke:#676C7E;}
+ .d2-1602067992 .stroke-N3{stroke:#9499AB;}
+ .d2-1602067992 .stroke-N4{stroke:#CFD2DD;}
+ .d2-1602067992 .stroke-N5{stroke:#DEE1EB;}
+ .d2-1602067992 .stroke-N6{stroke:#EEF1F8;}
+ .d2-1602067992 .stroke-N7{stroke:#FFFFFF;}
+ .d2-1602067992 .stroke-B1{stroke:#0D32B2;}
+ .d2-1602067992 .stroke-B2{stroke:#0D32B2;}
+ .d2-1602067992 .stroke-B3{stroke:#E3E9FD;}
+ .d2-1602067992 .stroke-B4{stroke:#E3E9FD;}
+ .d2-1602067992 .stroke-B5{stroke:#EDF0FD;}
+ .d2-1602067992 .stroke-B6{stroke:#F7F8FE;}
+ .d2-1602067992 .stroke-AA2{stroke:#4A6FF3;}
+ .d2-1602067992 .stroke-AA4{stroke:#EDF0FD;}
+ .d2-1602067992 .stroke-AA5{stroke:#F7F8FE;}
+ .d2-1602067992 .stroke-AB4{stroke:#EDF0FD;}
+ .d2-1602067992 .stroke-AB5{stroke:#F7F8FE;}
+ .d2-1602067992 .background-color-N1{background-color:#0A0F25;}
+ .d2-1602067992 .background-color-N2{background-color:#676C7E;}
+ .d2-1602067992 .background-color-N3{background-color:#9499AB;}
+ .d2-1602067992 .background-color-N4{background-color:#CFD2DD;}
+ .d2-1602067992 .background-color-N5{background-color:#DEE1EB;}
+ .d2-1602067992 .background-color-N6{background-color:#EEF1F8;}
+ .d2-1602067992 .background-color-N7{background-color:#FFFFFF;}
+ .d2-1602067992 .background-color-B1{background-color:#0D32B2;}
+ .d2-1602067992 .background-color-B2{background-color:#0D32B2;}
+ .d2-1602067992 .background-color-B3{background-color:#E3E9FD;}
+ .d2-1602067992 .background-color-B4{background-color:#E3E9FD;}
+ .d2-1602067992 .background-color-B5{background-color:#EDF0FD;}
+ .d2-1602067992 .background-color-B6{background-color:#F7F8FE;}
+ .d2-1602067992 .background-color-AA2{background-color:#4A6FF3;}
+ .d2-1602067992 .background-color-AA4{background-color:#EDF0FD;}
+ .d2-1602067992 .background-color-AA5{background-color:#F7F8FE;}
+ .d2-1602067992 .background-color-AB4{background-color:#EDF0FD;}
+ .d2-1602067992 .background-color-AB5{background-color:#F7F8FE;}
+ .d2-1602067992 .color-N1{color:#0A0F25;}
+ .d2-1602067992 .color-N2{color:#676C7E;}
+ .d2-1602067992 .color-N3{color:#9499AB;}
+ .d2-1602067992 .color-N4{color:#CFD2DD;}
+ .d2-1602067992 .color-N5{color:#DEE1EB;}
+ .d2-1602067992 .color-N6{color:#EEF1F8;}
+ .d2-1602067992 .color-N7{color:#FFFFFF;}
+ .d2-1602067992 .color-B1{color:#0D32B2;}
+ .d2-1602067992 .color-B2{color:#0D32B2;}
+ .d2-1602067992 .color-B3{color:#E3E9FD;}
+ .d2-1602067992 .color-B4{color:#E3E9FD;}
+ .d2-1602067992 .color-B5{color:#EDF0FD;}
+ .d2-1602067992 .color-B6{color:#F7F8FE;}
+ .d2-1602067992 .color-AA2{color:#4A6FF3;}
+ .d2-1602067992 .color-AA4{color:#EDF0FD;}
+ .d2-1602067992 .color-AA5{color:#F7F8FE;}
+ .d2-1602067992 .color-AB4{color:#EDF0FD;}
+ .d2-1602067992 .color-AB5{color:#F7F8FE;}.appendix text.text{fill:#0A0F25}.md{--color-fg-default:#0A0F25;--color-fg-muted:#676C7E;--color-fg-subtle:#9499AB;--color-canvas-default:#FFFFFF;--color-canvas-subtle:#EEF1F8;--color-border-default:#0D32B2;--color-border-muted:#0D32B2;--color-neutral-muted:#EEF1F8;--color-accent-fg:#0D32B2;--color-accent-emphasis:#0D32B2;--color-attention-subtle:#676C7E;--color-danger-fg:red;}.sketch-overlay-B1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B2{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B3{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-AA4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-N2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-N3{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N4{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N7{fill:url(#streaks-bright);mix-blend-mode:darken}.light-code{display: block}.dark-code{display: none}]]>heyyaaaacccceeeeeeeeeeeeeeeeeeeyoheybbbbddddfffffffffff
+
-
-
+
+
+
-
-
+
+
+
\ No newline at end of file