diff --git a/e2etests/testdata/files/grid_image_label_position.d2 b/e2etests/testdata/files/grid_image_label_position.d2 index 834e69f5b..d1fc25115 100644 --- a/e2etests/testdata/files/grid_image_label_position.d2 +++ b/e2etests/testdata/files/grid_image_label_position.d2 @@ -1,5 +1,6 @@ Processing: { grid-columns: 2 + grid-gap: 0 flink: { label: stream processor shape: image @@ -10,4 +11,15 @@ Processing: { shape: image icon: https://icons.terrastruct.com/essentials/004-picture.svg } + o: { + label: 1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16 + label.near: outside-right-center + shape: image + icon: https://icons.terrastruct.com/essentials/004-picture.svg + } + k: { + label: streaming database + shape: image + icon: https://icons.terrastruct.com/essentials/004-picture.svg + } } diff --git a/e2etests/testdata/regression/grid_image_label_position/dagre/board.exp.json b/e2etests/testdata/regression/grid_image_label_position/dagre/board.exp.json index 2e2c723f5..79df53590 100644 --- a/e2etests/testdata/regression/grid_image_label_position/dagre/board.exp.json +++ b/e2etests/testdata/regression/grid_image_label_position/dagre/board.exp.json @@ -10,8 +10,8 @@ "x": 0, "y": 0 }, - "width": 416, - "height": 248, + "width": 279, + "height": 302, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, @@ -48,8 +48,8 @@ "id": "Processing.flink", "type": "image", "pos": { - "x": 60, - "y": 60 + "x": 0, + "y": 46 }, "width": 128, "height": 128, @@ -101,8 +101,8 @@ "id": "Processing.sdb", "type": "image", "pos": { - "x": 228, - "y": 60 + "x": 0, + "y": 174 }, "width": 128, "height": 128, @@ -149,6 +149,112 @@ "labelPosition": "INSIDE_TOP_CENTER", "zIndex": 0, "level": 2 + }, + { + "id": "Processing.o", + "type": "image", + "pos": { + "x": 128, + "y": 46 + }, + "width": 128, + "height": 128, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "N7", + "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/004-picture.svg", + "RawPath": "", + "OmitHost": false, + "ForceQuery": false, + "RawQuery": "", + "Fragment": "", + "RawFragment": "" + }, + "iconPosition": "INSIDE_MIDDLE_CENTER", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 18, + "labelHeight": 261, + "labelPosition": "OUTSIDE_RIGHT_MIDDLE", + "zIndex": 0, + "level": 2 + }, + { + "id": "Processing.k", + "type": "image", + "pos": { + "x": 128, + "y": 174 + }, + "width": 151, + "height": 128, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "N7", + "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/004-picture.svg", + "RawPath": "", + "OmitHost": false, + "ForceQuery": false, + "RawQuery": "", + "Fragment": "", + "RawFragment": "" + }, + "iconPosition": "INSIDE_MIDDLE_CENTER", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "streaming database", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 141, + "labelHeight": 21, + "labelPosition": "INSIDE_TOP_CENTER", + "zIndex": 0, + "level": 2 } ], "connections": [], diff --git a/e2etests/testdata/regression/grid_image_label_position/dagre/sketch.exp.svg b/e2etests/testdata/regression/grid_image_label_position/dagre/sketch.exp.svg index ed6897d3c..09b86acbb 100644 --- a/e2etests/testdata/regression/grid_image_label_position/dagre/sketch.exp.svg +++ b/e2etests/testdata/regression/grid_image_label_position/dagre/sketch.exp.svg @@ -1,17 +1,17 @@ -Processingstream processorstreaming database - - - - + .d2-1439441582 .fill-N1{fill:#0A0F25;} + .d2-1439441582 .fill-N2{fill:#676C7E;} + .d2-1439441582 .fill-N3{fill:#9499AB;} + .d2-1439441582 .fill-N4{fill:#CFD2DD;} + .d2-1439441582 .fill-N5{fill:#DEE1EB;} + .d2-1439441582 .fill-N6{fill:#EEF1F8;} + .d2-1439441582 .fill-N7{fill:#FFFFFF;} + .d2-1439441582 .fill-B1{fill:#0D32B2;} + .d2-1439441582 .fill-B2{fill:#0D32B2;} + .d2-1439441582 .fill-B3{fill:#E3E9FD;} + .d2-1439441582 .fill-B4{fill:#E3E9FD;} + .d2-1439441582 .fill-B5{fill:#EDF0FD;} + .d2-1439441582 .fill-B6{fill:#F7F8FE;} + .d2-1439441582 .fill-AA2{fill:#4A6FF3;} + .d2-1439441582 .fill-AA4{fill:#EDF0FD;} + .d2-1439441582 .fill-AA5{fill:#F7F8FE;} + .d2-1439441582 .fill-AB4{fill:#EDF0FD;} + .d2-1439441582 .fill-AB5{fill:#F7F8FE;} + .d2-1439441582 .stroke-N1{stroke:#0A0F25;} + .d2-1439441582 .stroke-N2{stroke:#676C7E;} + .d2-1439441582 .stroke-N3{stroke:#9499AB;} + .d2-1439441582 .stroke-N4{stroke:#CFD2DD;} + .d2-1439441582 .stroke-N5{stroke:#DEE1EB;} + .d2-1439441582 .stroke-N6{stroke:#EEF1F8;} + .d2-1439441582 .stroke-N7{stroke:#FFFFFF;} + .d2-1439441582 .stroke-B1{stroke:#0D32B2;} + .d2-1439441582 .stroke-B2{stroke:#0D32B2;} + .d2-1439441582 .stroke-B3{stroke:#E3E9FD;} + .d2-1439441582 .stroke-B4{stroke:#E3E9FD;} + .d2-1439441582 .stroke-B5{stroke:#EDF0FD;} + .d2-1439441582 .stroke-B6{stroke:#F7F8FE;} + .d2-1439441582 .stroke-AA2{stroke:#4A6FF3;} + .d2-1439441582 .stroke-AA4{stroke:#EDF0FD;} + .d2-1439441582 .stroke-AA5{stroke:#F7F8FE;} + .d2-1439441582 .stroke-AB4{stroke:#EDF0FD;} + .d2-1439441582 .stroke-AB5{stroke:#F7F8FE;} + .d2-1439441582 .background-color-N1{background-color:#0A0F25;} + .d2-1439441582 .background-color-N2{background-color:#676C7E;} + .d2-1439441582 .background-color-N3{background-color:#9499AB;} + .d2-1439441582 .background-color-N4{background-color:#CFD2DD;} + .d2-1439441582 .background-color-N5{background-color:#DEE1EB;} + .d2-1439441582 .background-color-N6{background-color:#EEF1F8;} + .d2-1439441582 .background-color-N7{background-color:#FFFFFF;} + .d2-1439441582 .background-color-B1{background-color:#0D32B2;} + .d2-1439441582 .background-color-B2{background-color:#0D32B2;} + .d2-1439441582 .background-color-B3{background-color:#E3E9FD;} + .d2-1439441582 .background-color-B4{background-color:#E3E9FD;} + .d2-1439441582 .background-color-B5{background-color:#EDF0FD;} + .d2-1439441582 .background-color-B6{background-color:#F7F8FE;} + .d2-1439441582 .background-color-AA2{background-color:#4A6FF3;} + .d2-1439441582 .background-color-AA4{background-color:#EDF0FD;} + .d2-1439441582 .background-color-AA5{background-color:#F7F8FE;} + .d2-1439441582 .background-color-AB4{background-color:#EDF0FD;} + .d2-1439441582 .background-color-AB5{background-color:#F7F8FE;} + .d2-1439441582 .color-N1{color:#0A0F25;} + .d2-1439441582 .color-N2{color:#676C7E;} + .d2-1439441582 .color-N3{color:#9499AB;} + .d2-1439441582 .color-N4{color:#CFD2DD;} + .d2-1439441582 .color-N5{color:#DEE1EB;} + .d2-1439441582 .color-N6{color:#EEF1F8;} + .d2-1439441582 .color-N7{color:#FFFFFF;} + .d2-1439441582 .color-B1{color:#0D32B2;} + .d2-1439441582 .color-B2{color:#0D32B2;} + .d2-1439441582 .color-B3{color:#E3E9FD;} + .d2-1439441582 .color-B4{color:#E3E9FD;} + .d2-1439441582 .color-B5{color:#EDF0FD;} + .d2-1439441582 .color-B6{color:#F7F8FE;} + .d2-1439441582 .color-AA2{color:#4A6FF3;} + .d2-1439441582 .color-AA4{color:#EDF0FD;} + .d2-1439441582 .color-AA5{color:#F7F8FE;} + .d2-1439441582 .color-AB4{color:#EDF0FD;} + .d2-1439441582 .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}]]>Processingstream processorstreaming database12345678910111213141516streaming database + + + + + + \ No newline at end of file diff --git a/e2etests/testdata/regression/grid_image_label_position/elk/board.exp.json b/e2etests/testdata/regression/grid_image_label_position/elk/board.exp.json index 872dcd7a5..5f9125a0d 100644 --- a/e2etests/testdata/regression/grid_image_label_position/elk/board.exp.json +++ b/e2etests/testdata/regression/grid_image_label_position/elk/board.exp.json @@ -10,8 +10,8 @@ "x": 12, "y": 12 }, - "width": 416, - "height": 248, + "width": 279, + "height": 302, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, @@ -48,8 +48,8 @@ "id": "Processing.flink", "type": "image", "pos": { - "x": 72, - "y": 72 + "x": 12, + "y": 58 }, "width": 128, "height": 128, @@ -101,8 +101,8 @@ "id": "Processing.sdb", "type": "image", "pos": { - "x": 240, - "y": 72 + "x": 12, + "y": 186 }, "width": 128, "height": 128, @@ -149,6 +149,112 @@ "labelPosition": "INSIDE_TOP_CENTER", "zIndex": 0, "level": 2 + }, + { + "id": "Processing.o", + "type": "image", + "pos": { + "x": 140, + "y": 58 + }, + "width": 128, + "height": 128, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "N7", + "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/004-picture.svg", + "RawPath": "", + "OmitHost": false, + "ForceQuery": false, + "RawQuery": "", + "Fragment": "", + "RawFragment": "" + }, + "iconPosition": "INSIDE_MIDDLE_CENTER", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 18, + "labelHeight": 261, + "labelPosition": "OUTSIDE_RIGHT_MIDDLE", + "zIndex": 0, + "level": 2 + }, + { + "id": "Processing.k", + "type": "image", + "pos": { + "x": 140, + "y": 186 + }, + "width": 151, + "height": 128, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "N7", + "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/004-picture.svg", + "RawPath": "", + "OmitHost": false, + "ForceQuery": false, + "RawQuery": "", + "Fragment": "", + "RawFragment": "" + }, + "iconPosition": "INSIDE_MIDDLE_CENTER", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "streaming database", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 141, + "labelHeight": 21, + "labelPosition": "INSIDE_TOP_CENTER", + "zIndex": 0, + "level": 2 } ], "connections": [], diff --git a/e2etests/testdata/regression/grid_image_label_position/elk/sketch.exp.svg b/e2etests/testdata/regression/grid_image_label_position/elk/sketch.exp.svg index ba0be7705..16b92ebd5 100644 --- a/e2etests/testdata/regression/grid_image_label_position/elk/sketch.exp.svg +++ b/e2etests/testdata/regression/grid_image_label_position/elk/sketch.exp.svg @@ -1,17 +1,17 @@ -Processingstream processorstreaming database - - - - + .d2-3830371870 .fill-N1{fill:#0A0F25;} + .d2-3830371870 .fill-N2{fill:#676C7E;} + .d2-3830371870 .fill-N3{fill:#9499AB;} + .d2-3830371870 .fill-N4{fill:#CFD2DD;} + .d2-3830371870 .fill-N5{fill:#DEE1EB;} + .d2-3830371870 .fill-N6{fill:#EEF1F8;} + .d2-3830371870 .fill-N7{fill:#FFFFFF;} + .d2-3830371870 .fill-B1{fill:#0D32B2;} + .d2-3830371870 .fill-B2{fill:#0D32B2;} + .d2-3830371870 .fill-B3{fill:#E3E9FD;} + .d2-3830371870 .fill-B4{fill:#E3E9FD;} + .d2-3830371870 .fill-B5{fill:#EDF0FD;} + .d2-3830371870 .fill-B6{fill:#F7F8FE;} + .d2-3830371870 .fill-AA2{fill:#4A6FF3;} + .d2-3830371870 .fill-AA4{fill:#EDF0FD;} + .d2-3830371870 .fill-AA5{fill:#F7F8FE;} + .d2-3830371870 .fill-AB4{fill:#EDF0FD;} + .d2-3830371870 .fill-AB5{fill:#F7F8FE;} + .d2-3830371870 .stroke-N1{stroke:#0A0F25;} + .d2-3830371870 .stroke-N2{stroke:#676C7E;} + .d2-3830371870 .stroke-N3{stroke:#9499AB;} + .d2-3830371870 .stroke-N4{stroke:#CFD2DD;} + .d2-3830371870 .stroke-N5{stroke:#DEE1EB;} + .d2-3830371870 .stroke-N6{stroke:#EEF1F8;} + .d2-3830371870 .stroke-N7{stroke:#FFFFFF;} + .d2-3830371870 .stroke-B1{stroke:#0D32B2;} + .d2-3830371870 .stroke-B2{stroke:#0D32B2;} + .d2-3830371870 .stroke-B3{stroke:#E3E9FD;} + .d2-3830371870 .stroke-B4{stroke:#E3E9FD;} + .d2-3830371870 .stroke-B5{stroke:#EDF0FD;} + .d2-3830371870 .stroke-B6{stroke:#F7F8FE;} + .d2-3830371870 .stroke-AA2{stroke:#4A6FF3;} + .d2-3830371870 .stroke-AA4{stroke:#EDF0FD;} + .d2-3830371870 .stroke-AA5{stroke:#F7F8FE;} + .d2-3830371870 .stroke-AB4{stroke:#EDF0FD;} + .d2-3830371870 .stroke-AB5{stroke:#F7F8FE;} + .d2-3830371870 .background-color-N1{background-color:#0A0F25;} + .d2-3830371870 .background-color-N2{background-color:#676C7E;} + .d2-3830371870 .background-color-N3{background-color:#9499AB;} + .d2-3830371870 .background-color-N4{background-color:#CFD2DD;} + .d2-3830371870 .background-color-N5{background-color:#DEE1EB;} + .d2-3830371870 .background-color-N6{background-color:#EEF1F8;} + .d2-3830371870 .background-color-N7{background-color:#FFFFFF;} + .d2-3830371870 .background-color-B1{background-color:#0D32B2;} + .d2-3830371870 .background-color-B2{background-color:#0D32B2;} + .d2-3830371870 .background-color-B3{background-color:#E3E9FD;} + .d2-3830371870 .background-color-B4{background-color:#E3E9FD;} + .d2-3830371870 .background-color-B5{background-color:#EDF0FD;} + .d2-3830371870 .background-color-B6{background-color:#F7F8FE;} + .d2-3830371870 .background-color-AA2{background-color:#4A6FF3;} + .d2-3830371870 .background-color-AA4{background-color:#EDF0FD;} + .d2-3830371870 .background-color-AA5{background-color:#F7F8FE;} + .d2-3830371870 .background-color-AB4{background-color:#EDF0FD;} + .d2-3830371870 .background-color-AB5{background-color:#F7F8FE;} + .d2-3830371870 .color-N1{color:#0A0F25;} + .d2-3830371870 .color-N2{color:#676C7E;} + .d2-3830371870 .color-N3{color:#9499AB;} + .d2-3830371870 .color-N4{color:#CFD2DD;} + .d2-3830371870 .color-N5{color:#DEE1EB;} + .d2-3830371870 .color-N6{color:#EEF1F8;} + .d2-3830371870 .color-N7{color:#FFFFFF;} + .d2-3830371870 .color-B1{color:#0D32B2;} + .d2-3830371870 .color-B2{color:#0D32B2;} + .d2-3830371870 .color-B3{color:#E3E9FD;} + .d2-3830371870 .color-B4{color:#E3E9FD;} + .d2-3830371870 .color-B5{color:#EDF0FD;} + .d2-3830371870 .color-B6{color:#F7F8FE;} + .d2-3830371870 .color-AA2{color:#4A6FF3;} + .d2-3830371870 .color-AA4{color:#EDF0FD;} + .d2-3830371870 .color-AA5{color:#F7F8FE;} + .d2-3830371870 .color-AB4{color:#EDF0FD;} + .d2-3830371870 .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}]]>Processingstream processorstreaming database12345678910111213141516streaming database + + + + + + \ No newline at end of file