diff --git a/e2etests/regression_test.go b/e2etests/regression_test.go
index 30362e97d..e66d250ed 100644
--- a/e2etests/regression_test.go
+++ b/e2etests/regression_test.go
@@ -1037,6 +1037,7 @@ cf many required: {
loadFromFile(t, "grid_oom"),
loadFromFile(t, "cylinder_grid_label"),
loadFromFile(t, "grid_with_latex"),
+ loadFromFile(t, "icons_on_top"),
}
runa(t, tcs)
diff --git a/e2etests/testdata/files/icons_on_top.d2 b/e2etests/testdata/files/icons_on_top.d2
new file mode 100644
index 000000000..e9ac08830
--- /dev/null
+++ b/e2etests/testdata/files/icons_on_top.d2
@@ -0,0 +1,15 @@
+classes: {
+ GREEN: {style.stroke: "#2b9464"; style.fill: "#2b9464"}
+ RED: {style.stroke: "#d14d28"; style.fill: "#d14d28"}
+ YELLOW: {style.stroke: "#f5df65"; style.fill: "#f5df65"}
+ BLUE: {style.stroke: "#59c8df"; style.fill: "#59c8df"}
+}
+
+grid-rows: 2
+grid-columns: 2
+grid-gap: 0
+
+1: "link" {class: RED; link: "example.com"}
+2: "none" {class: YELLOW}
+3: "link, tooltip" {class: BLUE; link: "example.com"; tooltip: tooltip}
+4: "none" {class: GREEN}
diff --git a/e2etests/testdata/regression/icons_on_top/dagre/board.exp.json b/e2etests/testdata/regression/icons_on_top/dagre/board.exp.json
new file mode 100644
index 000000000..f704138e0
--- /dev/null
+++ b/e2etests/testdata/regression/icons_on_top/dagre/board.exp.json
@@ -0,0 +1,224 @@
+{
+ "name": "",
+ "isFolderOnly": false,
+ "fontFamily": "SourceSansPro",
+ "shapes": [
+ {
+ "id": "1",
+ "type": "rectangle",
+ "classes": [
+ "RED"
+ ],
+ "pos": {
+ "x": 0,
+ "y": 0
+ },
+ "width": 191,
+ "height": 66,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "#d14d28",
+ "stroke": "#d14d28",
+ "shadow": false,
+ "3d": false,
+ "multiple": false,
+ "double-border": false,
+ "tooltip": "",
+ "link": "example.com",
+ "icon": null,
+ "iconPosition": "",
+ "blend": false,
+ "fields": null,
+ "methods": null,
+ "columns": null,
+ "label": "link",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "N1",
+ "italic": false,
+ "bold": true,
+ "underline": false,
+ "labelWidth": 27,
+ "labelHeight": 21,
+ "labelPosition": "INSIDE_MIDDLE_CENTER",
+ "zIndex": 0,
+ "level": 1
+ },
+ {
+ "id": "2",
+ "type": "rectangle",
+ "classes": [
+ "YELLOW"
+ ],
+ "pos": {
+ "x": 191,
+ "y": 0
+ },
+ "width": 80,
+ "height": 66,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "#f5df65",
+ "stroke": "#f5df65",
+ "shadow": false,
+ "3d": false,
+ "multiple": false,
+ "double-border": false,
+ "tooltip": "",
+ "link": "",
+ "icon": null,
+ "iconPosition": "",
+ "blend": false,
+ "fields": null,
+ "methods": null,
+ "columns": null,
+ "label": "none",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "N1",
+ "italic": false,
+ "bold": true,
+ "underline": false,
+ "labelWidth": 35,
+ "labelHeight": 21,
+ "labelPosition": "INSIDE_MIDDLE_CENTER",
+ "zIndex": 0,
+ "level": 1
+ },
+ {
+ "id": "3",
+ "type": "rectangle",
+ "classes": [
+ "BLUE"
+ ],
+ "pos": {
+ "x": 0,
+ "y": 66
+ },
+ "width": 191,
+ "height": 66,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "#59c8df",
+ "stroke": "#59c8df",
+ "shadow": false,
+ "3d": false,
+ "multiple": false,
+ "double-border": false,
+ "tooltip": "tooltip",
+ "link": "example.com",
+ "icon": null,
+ "iconPosition": "",
+ "blend": false,
+ "fields": null,
+ "methods": null,
+ "columns": null,
+ "label": "link, tooltip",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "N1",
+ "italic": false,
+ "bold": true,
+ "underline": false,
+ "labelWidth": 82,
+ "labelHeight": 21,
+ "labelPosition": "INSIDE_MIDDLE_CENTER",
+ "zIndex": 0,
+ "level": 1
+ },
+ {
+ "id": "4",
+ "type": "rectangle",
+ "classes": [
+ "GREEN"
+ ],
+ "pos": {
+ "x": 191,
+ "y": 66
+ },
+ "width": 80,
+ "height": 66,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "#2b9464",
+ "stroke": "#2b9464",
+ "shadow": false,
+ "3d": false,
+ "multiple": false,
+ "double-border": false,
+ "tooltip": "",
+ "link": "",
+ "icon": null,
+ "iconPosition": "",
+ "blend": false,
+ "fields": null,
+ "methods": null,
+ "columns": null,
+ "label": "none",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "N1",
+ "italic": false,
+ "bold": true,
+ "underline": false,
+ "labelWidth": 35,
+ "labelHeight": 21,
+ "labelPosition": "INSIDE_MIDDLE_CENTER",
+ "zIndex": 0,
+ "level": 1
+ }
+ ],
+ "connections": [],
+ "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/icons_on_top/dagre/sketch.exp.svg b/e2etests/testdata/regression/icons_on_top/dagre/sketch.exp.svg
new file mode 100644
index 000000000..b4af867be
--- /dev/null
+++ b/e2etests/testdata/regression/icons_on_top/dagre/sketch.exp.svg
@@ -0,0 +1,138 @@
+
\ No newline at end of file
diff --git a/e2etests/testdata/regression/icons_on_top/elk/board.exp.json b/e2etests/testdata/regression/icons_on_top/elk/board.exp.json
new file mode 100644
index 000000000..f704138e0
--- /dev/null
+++ b/e2etests/testdata/regression/icons_on_top/elk/board.exp.json
@@ -0,0 +1,224 @@
+{
+ "name": "",
+ "isFolderOnly": false,
+ "fontFamily": "SourceSansPro",
+ "shapes": [
+ {
+ "id": "1",
+ "type": "rectangle",
+ "classes": [
+ "RED"
+ ],
+ "pos": {
+ "x": 0,
+ "y": 0
+ },
+ "width": 191,
+ "height": 66,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "#d14d28",
+ "stroke": "#d14d28",
+ "shadow": false,
+ "3d": false,
+ "multiple": false,
+ "double-border": false,
+ "tooltip": "",
+ "link": "example.com",
+ "icon": null,
+ "iconPosition": "",
+ "blend": false,
+ "fields": null,
+ "methods": null,
+ "columns": null,
+ "label": "link",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "N1",
+ "italic": false,
+ "bold": true,
+ "underline": false,
+ "labelWidth": 27,
+ "labelHeight": 21,
+ "labelPosition": "INSIDE_MIDDLE_CENTER",
+ "zIndex": 0,
+ "level": 1
+ },
+ {
+ "id": "2",
+ "type": "rectangle",
+ "classes": [
+ "YELLOW"
+ ],
+ "pos": {
+ "x": 191,
+ "y": 0
+ },
+ "width": 80,
+ "height": 66,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "#f5df65",
+ "stroke": "#f5df65",
+ "shadow": false,
+ "3d": false,
+ "multiple": false,
+ "double-border": false,
+ "tooltip": "",
+ "link": "",
+ "icon": null,
+ "iconPosition": "",
+ "blend": false,
+ "fields": null,
+ "methods": null,
+ "columns": null,
+ "label": "none",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "N1",
+ "italic": false,
+ "bold": true,
+ "underline": false,
+ "labelWidth": 35,
+ "labelHeight": 21,
+ "labelPosition": "INSIDE_MIDDLE_CENTER",
+ "zIndex": 0,
+ "level": 1
+ },
+ {
+ "id": "3",
+ "type": "rectangle",
+ "classes": [
+ "BLUE"
+ ],
+ "pos": {
+ "x": 0,
+ "y": 66
+ },
+ "width": 191,
+ "height": 66,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "#59c8df",
+ "stroke": "#59c8df",
+ "shadow": false,
+ "3d": false,
+ "multiple": false,
+ "double-border": false,
+ "tooltip": "tooltip",
+ "link": "example.com",
+ "icon": null,
+ "iconPosition": "",
+ "blend": false,
+ "fields": null,
+ "methods": null,
+ "columns": null,
+ "label": "link, tooltip",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "N1",
+ "italic": false,
+ "bold": true,
+ "underline": false,
+ "labelWidth": 82,
+ "labelHeight": 21,
+ "labelPosition": "INSIDE_MIDDLE_CENTER",
+ "zIndex": 0,
+ "level": 1
+ },
+ {
+ "id": "4",
+ "type": "rectangle",
+ "classes": [
+ "GREEN"
+ ],
+ "pos": {
+ "x": 191,
+ "y": 66
+ },
+ "width": 80,
+ "height": 66,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "#2b9464",
+ "stroke": "#2b9464",
+ "shadow": false,
+ "3d": false,
+ "multiple": false,
+ "double-border": false,
+ "tooltip": "",
+ "link": "",
+ "icon": null,
+ "iconPosition": "",
+ "blend": false,
+ "fields": null,
+ "methods": null,
+ "columns": null,
+ "label": "none",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "N1",
+ "italic": false,
+ "bold": true,
+ "underline": false,
+ "labelWidth": 35,
+ "labelHeight": 21,
+ "labelPosition": "INSIDE_MIDDLE_CENTER",
+ "zIndex": 0,
+ "level": 1
+ }
+ ],
+ "connections": [],
+ "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/icons_on_top/elk/sketch.exp.svg b/e2etests/testdata/regression/icons_on_top/elk/sketch.exp.svg
new file mode 100644
index 000000000..b4af867be
--- /dev/null
+++ b/e2etests/testdata/regression/icons_on_top/elk/sketch.exp.svg
@@ -0,0 +1,138 @@
+link
+
+
+
+
+
+
+
+
+
+
+
+nonelink, tooltip
+
+
+
+
+
+
+
+
+
+
+
+
+tooltip
+
+
+
+
+
+
+
+
+
+
+
+none
+
+
+
+
+
+
\ No newline at end of file