fix custom label positions for nodes with constrained widths

This commit is contained in:
Alexander Wang 2024-05-02 11:55:23 -06:00
parent 36eee25661
commit 353e1d767d
No known key found for this signature in database
GPG key ID: BE3937D0D52D8927
8 changed files with 387 additions and 17 deletions

View file

@ -570,13 +570,12 @@ func positionLabelsIcons(obj *d2graph.Object) {
} else {
obj.LabelPosition = go2.Pointer(label.InsideMiddleCenter.String())
}
}
if float64(obj.LabelDimensions.Width) > obj.Width || float64(obj.LabelDimensions.Height) > obj.Height {
if len(obj.ChildrenArray) > 0 {
obj.LabelPosition = go2.Pointer(label.OutsideTopCenter.String())
} else {
obj.LabelPosition = go2.Pointer(label.OutsideBottomCenter.String())
if float64(obj.LabelDimensions.Width) > obj.Width || float64(obj.LabelDimensions.Height) > obj.Height {
if len(obj.ChildrenArray) > 0 {
obj.LabelPosition = go2.Pointer(label.OutsideTopCenter.String())
} else {
obj.LabelPosition = go2.Pointer(label.OutsideBottomCenter.String())
}
}
}
}

View file

@ -1148,13 +1148,12 @@ func positionLabelsIcons(obj *d2graph.Object) {
} else {
obj.LabelPosition = go2.Pointer(label.InsideMiddleCenter.String())
}
}
if float64(obj.LabelDimensions.Width) > obj.Width || float64(obj.LabelDimensions.Height) > obj.Height {
if len(obj.ChildrenArray) > 0 {
obj.LabelPosition = go2.Pointer(label.OutsideTopCenter.String())
} else {
obj.LabelPosition = go2.Pointer(label.OutsideBottomCenter.String())
if float64(obj.LabelDimensions.Width) > obj.Width || float64(obj.LabelDimensions.Height) > obj.Height {
if len(obj.ChildrenArray) > 0 {
obj.LabelPosition = go2.Pointer(label.OutsideTopCenter.String())
} else {
obj.LabelPosition = go2.Pointer(label.OutsideBottomCenter.String())
}
}
}
}

View file

@ -313,9 +313,6 @@ func (diagram Diagram) BoundingBox() (topLeft, bottomRight Point) {
if targetShape.Label != "" {
labelPosition := label.FromString(targetShape.LabelPosition)
if !labelPosition.IsOutside() {
continue
}
shapeType := DSL_SHAPE_TO_SHAPE_TYPE[targetShape.Type]
s := shape.NewShape(shapeType,

View file

@ -189,6 +189,13 @@ b: hello there cat {
height: 66
}
-- width-smaller-than-label-custom-pos --
x: {
width: 20
label: long label
label.near: center-center
}
-- nested-spread-substitutions-regression --
vars: {
dog1: Frido {

View file

@ -0,0 +1,89 @@
{
"name": "",
"isFolderOnly": false,
"fontFamily": "SourceSansPro",
"shapes": [
{
"id": "x",
"type": "rectangle",
"pos": {
"x": 0,
"y": 0
},
"width": 20,
"height": 61,
"opacity": 1,
"strokeDash": 0,
"strokeWidth": 2,
"borderRadius": 0,
"fill": "B6",
"stroke": "B1",
"shadow": false,
"3d": false,
"multiple": false,
"double-border": false,
"tooltip": "",
"link": "",
"icon": null,
"iconPosition": "",
"blend": false,
"fields": null,
"methods": null,
"columns": null,
"label": "long label",
"fontSize": 16,
"fontFamily": "DEFAULT",
"language": "",
"color": "N1",
"italic": false,
"bold": true,
"underline": false,
"labelWidth": 69,
"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
}
}

View file

@ -0,0 +1,95 @@
<?xml version="1.0" encoding="utf-8"?><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" d2Version="v0.6.5-HEAD" preserveAspectRatio="xMinYMin meet" viewBox="0 0 69 63"><svg id="d2-svg" class="d2-2812354434" width="69" height="63" viewBox="-24 -1 69 63"><rect x="-24.000000" y="-1.000000" width="69.000000" height="63.000000" rx="0.000000" class=" fill-N7" stroke-width="0" /><style type="text/css"><![CDATA[
.d2-2812354434 .text-bold {
font-family: "d2-2812354434-font-bold";
}
@font-face {
font-family: d2-2812354434-font-bold;
src: url("data:application/font-woff;base64,d09GRgABAAAAAAh4AAoAAAAADawAAguFAAAAAAAAAAAAAAAAAAAAAAAAAABPUy8yAAAA9AAAAGAAAABgXxHXrmNtYXAAAAFUAAAAWAAAAGYBswFEZ2x5ZgAAAawAAALPAAADODMDLHNoZWFkAAAEfAAAADYAAAA2G38e1GhoZWEAAAS0AAAAJAAAACQKfwXIaG10eAAABNgAAAAkAAAAJBFnAadsb2NhAAAE/AAAABQAAAAUA2QERG1heHAAAAUQAAAAIAAAACAAIQD3bmFtZQAABTAAAAMoAAAIKgjwVkFwb3N0AAAIWAAAAB0AAAAg/9EAMgADAioCvAAFAAACigJYAAAASwKKAlgAAAFeADIBKQAAAgsHAwMEAwICBGAAAvcAAAADAAAAAAAAAABBREJPACAAIP//Au7/BgAAA9gBESAAAZ8AAAAAAfAClAAAACAAA3icTMsxDsExAEfhr/9WdRBn6LlsJGIRzsNAHM1JfhIxeNsbPhRVwUazw9aw6KaDo5Oza4Jp//tLkndeeeaRe25f/V+xqJqVbm3wAQAA//8BAAD//6r/Eut4nGSSzY/bRBjG33G8NhsMqR1/JLvrOrYTj73dbFRPbJd81AlrGrEkbXYraFBpou6BS8pWbFOxII6IG6f0gDhwghsXhDhQaTmD4AZSz0j8AQitOKUOcpI99TRzmJlnfr/3gTXoA1BH1BNIwTpkQAAJgPA6XyIYm2xAgsBUUgFGPNunhPjbb7BDOw69XfhS+2Q0Qr0h9eT5g7u9o6P/RvV6/PVPT+Mv0KOnABRsz8/Rn2gGeTABFMPyqn5gWabBsNj3iStLvIlNhglcP/AYRhLln6P+Z1PKdLRW0auMa6P3T9O01nkpX8rebGjcnfDmIKPjnHRfLR6fxH+TLfNEyd5JX1FzCiR57fk5JVNnIIIGsGZY2G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9gzXGcP6DOhIGZCwgjHkAkjrpgRkeMTMWPCkIgQR4cWMYW+JgRCjtF/fg3wKZgRKOKYAkeMT0xAztgi/iKvlHNlHOo0s7sWBWMCLuRxSUCCI2VESkLEpeIUFGS8okGDnIH4ZhTkeORMiPFImTGiQZc2p/QZMyHH0VakkplPypCCawLld2ZRdmZAREJurK5ICMXTiV8k7w6nOLpksl2PfLoR4Usc38m75JbK9is8/bo1Zpt5l2wC5upnrK7EurnWBMe6LfO2+Fa44BXuXv3ZZPL+HoX6XyjyBVeaf6hJJWKS4NwuLXwpyHePcRzp3MFXR76nQ58Turyhr3OLHj1anNGnw2v5dunh+JouZxzLoyO8uGtLMWf8gOMbOrIpY0fWn8XEIn4mM3Xn4jhTHVMy9bxk7qnWSBXefcLlDqUb6sjlM9AelZZO80u0ZwEjU0UmhlP1cqmN3PoXmiKmqqWc7e19uQ1z273lFt+QaodLtS44lZNbMHrfVL13NHOtH4+AkJQLWQxImdKg4Ea8zwm4IsZxrO6daEsKWiufMs+NVBIxFYMOieLMyPQ3MN34xn2woXtnb0ko/5Lp5aqq+2Rx6tXtjN6oe8s737ocrU2gYVNN19Q0ENfEtB9pp9b5+/LN9bqlPOWIlJjwXy/AMzya7HPAIWNlGOhmbq9DUy9Ek5ccqvpLIlkNpefIIhzg8ZwDDnjJ83f6uGTijItbcVnP3eKYI7ocflAVC/suR7xeffv/rL+LaVO1OJ6uTi/uPcUnd1DrF9qz2/eyp4mVk5hbtNutOCNgWnJxu+s1ucd4/wAAAP//AQAA///0t09ReJxiYGYAg//nGIwYsAAAAAAA//8BAAD//y8BAgMAAAA=");
}]]></style><style type="text/css"><![CDATA[.shape {
shape-rendering: geometricPrecision;
stroke-linejoin: round;
}
.connection {
stroke-linecap: round;
stroke-linejoin: round;
}
.blend {
mix-blend-mode: multiply;
opacity: 0.5;
}
.d2-2812354434 .fill-N1{fill:#0A0F25;}
.d2-2812354434 .fill-N2{fill:#676C7E;}
.d2-2812354434 .fill-N3{fill:#9499AB;}
.d2-2812354434 .fill-N4{fill:#CFD2DD;}
.d2-2812354434 .fill-N5{fill:#DEE1EB;}
.d2-2812354434 .fill-N6{fill:#EEF1F8;}
.d2-2812354434 .fill-N7{fill:#FFFFFF;}
.d2-2812354434 .fill-B1{fill:#0D32B2;}
.d2-2812354434 .fill-B2{fill:#0D32B2;}
.d2-2812354434 .fill-B3{fill:#E3E9FD;}
.d2-2812354434 .fill-B4{fill:#E3E9FD;}
.d2-2812354434 .fill-B5{fill:#EDF0FD;}
.d2-2812354434 .fill-B6{fill:#F7F8FE;}
.d2-2812354434 .fill-AA2{fill:#4A6FF3;}
.d2-2812354434 .fill-AA4{fill:#EDF0FD;}
.d2-2812354434 .fill-AA5{fill:#F7F8FE;}
.d2-2812354434 .fill-AB4{fill:#EDF0FD;}
.d2-2812354434 .fill-AB5{fill:#F7F8FE;}
.d2-2812354434 .stroke-N1{stroke:#0A0F25;}
.d2-2812354434 .stroke-N2{stroke:#676C7E;}
.d2-2812354434 .stroke-N3{stroke:#9499AB;}
.d2-2812354434 .stroke-N4{stroke:#CFD2DD;}
.d2-2812354434 .stroke-N5{stroke:#DEE1EB;}
.d2-2812354434 .stroke-N6{stroke:#EEF1F8;}
.d2-2812354434 .stroke-N7{stroke:#FFFFFF;}
.d2-2812354434 .stroke-B1{stroke:#0D32B2;}
.d2-2812354434 .stroke-B2{stroke:#0D32B2;}
.d2-2812354434 .stroke-B3{stroke:#E3E9FD;}
.d2-2812354434 .stroke-B4{stroke:#E3E9FD;}
.d2-2812354434 .stroke-B5{stroke:#EDF0FD;}
.d2-2812354434 .stroke-B6{stroke:#F7F8FE;}
.d2-2812354434 .stroke-AA2{stroke:#4A6FF3;}
.d2-2812354434 .stroke-AA4{stroke:#EDF0FD;}
.d2-2812354434 .stroke-AA5{stroke:#F7F8FE;}
.d2-2812354434 .stroke-AB4{stroke:#EDF0FD;}
.d2-2812354434 .stroke-AB5{stroke:#F7F8FE;}
.d2-2812354434 .background-color-N1{background-color:#0A0F25;}
.d2-2812354434 .background-color-N2{background-color:#676C7E;}
.d2-2812354434 .background-color-N3{background-color:#9499AB;}
.d2-2812354434 .background-color-N4{background-color:#CFD2DD;}
.d2-2812354434 .background-color-N5{background-color:#DEE1EB;}
.d2-2812354434 .background-color-N6{background-color:#EEF1F8;}
.d2-2812354434 .background-color-N7{background-color:#FFFFFF;}
.d2-2812354434 .background-color-B1{background-color:#0D32B2;}
.d2-2812354434 .background-color-B2{background-color:#0D32B2;}
.d2-2812354434 .background-color-B3{background-color:#E3E9FD;}
.d2-2812354434 .background-color-B4{background-color:#E3E9FD;}
.d2-2812354434 .background-color-B5{background-color:#EDF0FD;}
.d2-2812354434 .background-color-B6{background-color:#F7F8FE;}
.d2-2812354434 .background-color-AA2{background-color:#4A6FF3;}
.d2-2812354434 .background-color-AA4{background-color:#EDF0FD;}
.d2-2812354434 .background-color-AA5{background-color:#F7F8FE;}
.d2-2812354434 .background-color-AB4{background-color:#EDF0FD;}
.d2-2812354434 .background-color-AB5{background-color:#F7F8FE;}
.d2-2812354434 .color-N1{color:#0A0F25;}
.d2-2812354434 .color-N2{color:#676C7E;}
.d2-2812354434 .color-N3{color:#9499AB;}
.d2-2812354434 .color-N4{color:#CFD2DD;}
.d2-2812354434 .color-N5{color:#DEE1EB;}
.d2-2812354434 .color-N6{color:#EEF1F8;}
.d2-2812354434 .color-N7{color:#FFFFFF;}
.d2-2812354434 .color-B1{color:#0D32B2;}
.d2-2812354434 .color-B2{color:#0D32B2;}
.d2-2812354434 .color-B3{color:#E3E9FD;}
.d2-2812354434 .color-B4{color:#E3E9FD;}
.d2-2812354434 .color-B5{color:#EDF0FD;}
.d2-2812354434 .color-B6{color:#F7F8FE;}
.d2-2812354434 .color-AA2{color:#4A6FF3;}
.d2-2812354434 .color-AA4{color:#EDF0FD;}
.d2-2812354434 .color-AA5{color:#F7F8FE;}
.d2-2812354434 .color-AB4{color:#EDF0FD;}
.d2-2812354434 .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}]]></style><g id="x"><g class="shape" ><rect x="0.000000" y="0.000000" width="20.000000" height="61.000000" class=" stroke-B1 fill-B6" style="stroke-width:2;" /></g><text x="10.000000" y="36.000000" class="text-bold fill-N1" style="text-anchor:middle;font-size:16px">long label</text></g><mask id="d2-2812354434" maskUnits="userSpaceOnUse" x="-24" y="-1" width="69" height="63">
<rect x="-24" y="-1" width="69" height="63" fill="white"></rect>
<rect x="-24.500000" y="20.000000" width="69" height="21" fill="rgba(0,0,0,0.75)"></rect>
</mask></svg></svg>

After

Width:  |  Height:  |  Size: 9.2 KiB

View file

@ -0,0 +1,89 @@
{
"name": "",
"isFolderOnly": false,
"fontFamily": "SourceSansPro",
"shapes": [
{
"id": "x",
"type": "rectangle",
"pos": {
"x": 12,
"y": 12
},
"width": 20,
"height": 61,
"opacity": 1,
"strokeDash": 0,
"strokeWidth": 2,
"borderRadius": 0,
"fill": "B6",
"stroke": "B1",
"shadow": false,
"3d": false,
"multiple": false,
"double-border": false,
"tooltip": "",
"link": "",
"icon": null,
"iconPosition": "",
"blend": false,
"fields": null,
"methods": null,
"columns": null,
"label": "long label",
"fontSize": 16,
"fontFamily": "DEFAULT",
"language": "",
"color": "N1",
"italic": false,
"bold": true,
"underline": false,
"labelWidth": 69,
"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
}
}

View file

@ -0,0 +1,95 @@
<?xml version="1.0" encoding="utf-8"?><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" d2Version="v0.6.5-HEAD" preserveAspectRatio="xMinYMin meet" viewBox="0 0 69 63"><svg id="d2-svg" class="d2-1319582122" width="69" height="63" viewBox="-12 11 69 63"><rect x="-12.000000" y="11.000000" width="69.000000" height="63.000000" rx="0.000000" class=" fill-N7" stroke-width="0" /><style type="text/css"><![CDATA[
.d2-1319582122 .text-bold {
font-family: "d2-1319582122-font-bold";
}
@font-face {
font-family: d2-1319582122-font-bold;
src: url("data:application/font-woff;base64,d09GRgABAAAAAAh4AAoAAAAADawAAguFAAAAAAAAAAAAAAAAAAAAAAAAAABPUy8yAAAA9AAAAGAAAABgXxHXrmNtYXAAAAFUAAAAWAAAAGYBswFEZ2x5ZgAAAawAAALPAAADODMDLHNoZWFkAAAEfAAAADYAAAA2G38e1GhoZWEAAAS0AAAAJAAAACQKfwXIaG10eAAABNgAAAAkAAAAJBFnAadsb2NhAAAE/AAAABQAAAAUA2QERG1heHAAAAUQAAAAIAAAACAAIQD3bmFtZQAABTAAAAMoAAAIKgjwVkFwb3N0AAAIWAAAAB0AAAAg/9EAMgADAioCvAAFAAACigJYAAAASwKKAlgAAAFeADIBKQAAAgsHAwMEAwICBGAAAvcAAAADAAAAAAAAAABBREJPACAAIP//Au7/BgAAA9gBESAAAZ8AAAAAAfAClAAAACAAA3icTMsxDsExAEfhr/9WdRBn6LlsJGIRzsNAHM1JfhIxeNsbPhRVwUazw9aw6KaDo5Oza4Jp//tLkndeeeaRe25f/V+xqJqVbm3wAQAA//8BAAD//6r/Eut4nGSSzY/bRBjG33G8NhsMqR1/JLvrOrYTj73dbFRPbJd81AlrGrEkbXYraFBpou6BS8pWbFOxII6IG6f0gDhwghsXhDhQaTmD4AZSz0j8AQitOKUOcpI99TRzmJlnfr/3gTXoA1BH1BNIwTpkQAAJgPA6XyIYm2xAgsBUUgFGPNunhPjbb7BDOw69XfhS+2Q0Qr0h9eT5g7u9o6P/RvV6/PVPT+Mv0KOnABRsz8/Rn2gGeTABFMPyqn5gWabBsNj3iStLvIlNhglcP/AYRhLln6P+Z1PKdLRW0auMa6P3T9O01nkpX8rebGjcn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R3Dn2w7/jL8Kfu8XeAKvOBXwxV2yQxvscOPhrd5hMWsVHlE03CNz9gzXGcP6DOhIGZCwgjHkAkjrpgRkeMTMWPCkIgQR4cWMYW+JgRCjtF/fg3wKZgRKOKYAkeMT0xAztgi/iKvlHNlHOo0s7sWBWMCLuRxSUCCI2VESkLEpeIUFGS8okGDnIH4ZhTkeORMiPFImTGiQZc2p/QZMyHH0VakkplPypCCawLld2ZRdmZAREJurK5ICMXTiV8k7w6nOLpksl2PfLoR4Usc38m75JbK9is8/bo1Zpt5l2wC5upnrK7EurnWBMe6LfO2+Fa44BXuXv3ZZPL+HoX6XyjyBVeaf6hJJWKS4NwuLXwpyHePcRzp3MFXR76nQ58Turyhr3OLHj1anNGnw2v5dunh+JouZxzLoyO8uGtLMWf8gOMbOrIpY0fWn8XEIn4mM3Xn4jhTHVMy9bxk7qnWSBXefcLlDqUb6sjlM9AelZZO80u0ZwEjU0UmhlP1cqmN3PoXmiKmqqWc7e19uQ1z273lFt+QaodLtS44lZNbMHrfVL13NHOtH4+AkJQLWQxImdKg4Ea8zwm4IsZxrO6daEsKWiufMs+NVBIxFYMOieLMyPQ3MN34xn2woXtnb0ko/5Lp5aqq+2Rx6tXtjN6oe8s737ocrU2gYVNN19Q0ENfEtB9pp9b5+/LN9bqlPOWIlJjwXy/AMzya7HPAIWNlGOhmbq9DUy9Ek5ccqvpLIlkNpefIIhzg8ZwDDnjJ83f6uGTijItbcVnP3eKYI7ocflAVC/suR7xeffv/rL+LaVO1OJ6uTi/uPcUnd1DrF9qz2/eyp4mVk5hbtNutOCNgWnJxu+s1ucd4/wAAAP//AQAA///0t09ReJxiYGYAg//nGIwYsAAAAAAA//8BAAD//y8BAgMAAAA=");
}]]></style><style type="text/css"><![CDATA[.shape {
shape-rendering: geometricPrecision;
stroke-linejoin: round;
}
.connection {
stroke-linecap: round;
stroke-linejoin: round;
}
.blend {
mix-blend-mode: multiply;
opacity: 0.5;
}
.d2-1319582122 .fill-N1{fill:#0A0F25;}
.d2-1319582122 .fill-N2{fill:#676C7E;}
.d2-1319582122 .fill-N3{fill:#9499AB;}
.d2-1319582122 .fill-N4{fill:#CFD2DD;}
.d2-1319582122 .fill-N5{fill:#DEE1EB;}
.d2-1319582122 .fill-N6{fill:#EEF1F8;}
.d2-1319582122 .fill-N7{fill:#FFFFFF;}
.d2-1319582122 .fill-B1{fill:#0D32B2;}
.d2-1319582122 .fill-B2{fill:#0D32B2;}
.d2-1319582122 .fill-B3{fill:#E3E9FD;}
.d2-1319582122 .fill-B4{fill:#E3E9FD;}
.d2-1319582122 .fill-B5{fill:#EDF0FD;}
.d2-1319582122 .fill-B6{fill:#F7F8FE;}
.d2-1319582122 .fill-AA2{fill:#4A6FF3;}
.d2-1319582122 .fill-AA4{fill:#EDF0FD;}
.d2-1319582122 .fill-AA5{fill:#F7F8FE;}
.d2-1319582122 .fill-AB4{fill:#EDF0FD;}
.d2-1319582122 .fill-AB5{fill:#F7F8FE;}
.d2-1319582122 .stroke-N1{stroke:#0A0F25;}
.d2-1319582122 .stroke-N2{stroke:#676C7E;}
.d2-1319582122 .stroke-N3{stroke:#9499AB;}
.d2-1319582122 .stroke-N4{stroke:#CFD2DD;}
.d2-1319582122 .stroke-N5{stroke:#DEE1EB;}
.d2-1319582122 .stroke-N6{stroke:#EEF1F8;}
.d2-1319582122 .stroke-N7{stroke:#FFFFFF;}
.d2-1319582122 .stroke-B1{stroke:#0D32B2;}
.d2-1319582122 .stroke-B2{stroke:#0D32B2;}
.d2-1319582122 .stroke-B3{stroke:#E3E9FD;}
.d2-1319582122 .stroke-B4{stroke:#E3E9FD;}
.d2-1319582122 .stroke-B5{stroke:#EDF0FD;}
.d2-1319582122 .stroke-B6{stroke:#F7F8FE;}
.d2-1319582122 .stroke-AA2{stroke:#4A6FF3;}
.d2-1319582122 .stroke-AA4{stroke:#EDF0FD;}
.d2-1319582122 .stroke-AA5{stroke:#F7F8FE;}
.d2-1319582122 .stroke-AB4{stroke:#EDF0FD;}
.d2-1319582122 .stroke-AB5{stroke:#F7F8FE;}
.d2-1319582122 .background-color-N1{background-color:#0A0F25;}
.d2-1319582122 .background-color-N2{background-color:#676C7E;}
.d2-1319582122 .background-color-N3{background-color:#9499AB;}
.d2-1319582122 .background-color-N4{background-color:#CFD2DD;}
.d2-1319582122 .background-color-N5{background-color:#DEE1EB;}
.d2-1319582122 .background-color-N6{background-color:#EEF1F8;}
.d2-1319582122 .background-color-N7{background-color:#FFFFFF;}
.d2-1319582122 .background-color-B1{background-color:#0D32B2;}
.d2-1319582122 .background-color-B2{background-color:#0D32B2;}
.d2-1319582122 .background-color-B3{background-color:#E3E9FD;}
.d2-1319582122 .background-color-B4{background-color:#E3E9FD;}
.d2-1319582122 .background-color-B5{background-color:#EDF0FD;}
.d2-1319582122 .background-color-B6{background-color:#F7F8FE;}
.d2-1319582122 .background-color-AA2{background-color:#4A6FF3;}
.d2-1319582122 .background-color-AA4{background-color:#EDF0FD;}
.d2-1319582122 .background-color-AA5{background-color:#F7F8FE;}
.d2-1319582122 .background-color-AB4{background-color:#EDF0FD;}
.d2-1319582122 .background-color-AB5{background-color:#F7F8FE;}
.d2-1319582122 .color-N1{color:#0A0F25;}
.d2-1319582122 .color-N2{color:#676C7E;}
.d2-1319582122 .color-N3{color:#9499AB;}
.d2-1319582122 .color-N4{color:#CFD2DD;}
.d2-1319582122 .color-N5{color:#DEE1EB;}
.d2-1319582122 .color-N6{color:#EEF1F8;}
.d2-1319582122 .color-N7{color:#FFFFFF;}
.d2-1319582122 .color-B1{color:#0D32B2;}
.d2-1319582122 .color-B2{color:#0D32B2;}
.d2-1319582122 .color-B3{color:#E3E9FD;}
.d2-1319582122 .color-B4{color:#E3E9FD;}
.d2-1319582122 .color-B5{color:#EDF0FD;}
.d2-1319582122 .color-B6{color:#F7F8FE;}
.d2-1319582122 .color-AA2{color:#4A6FF3;}
.d2-1319582122 .color-AA4{color:#EDF0FD;}
.d2-1319582122 .color-AA5{color:#F7F8FE;}
.d2-1319582122 .color-AB4{color:#EDF0FD;}
.d2-1319582122 .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}]]></style><g id="x"><g class="shape" ><rect x="12.000000" y="12.000000" width="20.000000" height="61.000000" class=" stroke-B1 fill-B6" style="stroke-width:2;" /></g><text x="22.000000" y="48.000000" class="text-bold fill-N1" style="text-anchor:middle;font-size:16px">long label</text></g><mask id="d2-1319582122" maskUnits="userSpaceOnUse" x="-12" y="11" width="69" height="63">
<rect x="-12" y="11" width="69" height="63" fill="white"></rect>
<rect x="-12.500000" y="32.000000" width="69" height="21" fill="rgba(0,0,0,0.75)"></rect>
</mask></svg></svg>

After

Width:  |  Height:  |  Size: 9.2 KiB