d2render: pill-shaped connection label fills

This commit is contained in:
Alexander Wang 2024-09-14 17:33:46 -06:00
parent fe64773a8a
commit dd89a286ba
No known key found for this signature in database
GPG key ID: BE3937D0D52D8927
8 changed files with 1659 additions and 2 deletions

View file

@ -1323,6 +1323,27 @@ C <-> D: triangle {
}
}`,
},
{
name: "connection-style-fill",
script: `
shape: sequence_diagram
customer
employee
rental
item
(* -> *)[*].style.fill: black
(* -> *)[*].style.font-color: white
customer -> employee: "rent(this, i, p)"
employee -> rental: "new(this, i, p)"
rental -> employee
employee -> rental: isValid()
rental -> item: isRentable(c)
item -> customer: is(Adult)
customer -> item: true
`,
},
}
runa(t, tcs)
}

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 81 KiB

View file

@ -623,8 +623,9 @@ func drawConnection(writer io.Writer, labelMaskID string, connection d2target.Co
}
if connection.Fill != color.Empty {
rectEl := d2themes.NewThemableElement("rect")
rectEl.X, rectEl.Y = labelTL.X, labelTL.Y
rectEl.Width, rectEl.Height = float64(connection.LabelWidth), float64(connection.LabelHeight)
rectEl.Rx = 999
rectEl.X, rectEl.Y = labelTL.X-4, labelTL.Y-2
rectEl.Width, rectEl.Height = float64(connection.LabelWidth)+8, float64(connection.LabelHeight)+4
rectEl.Fill = connection.Fill
fmt.Fprint(writer, rectEl.Render())
}

View file

@ -0,0 +1,638 @@
{
"name": "",
"isFolderOnly": false,
"fontFamily": "SourceSansPro",
"shapes": [
{
"id": "customer",
"type": "rectangle",
"pos": {
"x": 12,
"y": 52
},
"width": 109,
"height": 66,
"opacity": 1,
"strokeDash": 0,
"strokeWidth": 2,
"borderRadius": 0,
"fill": "B5",
"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": "customer",
"fontSize": 16,
"fontFamily": "DEFAULT",
"language": "",
"color": "N1",
"italic": false,
"bold": false,
"underline": false,
"labelWidth": 64,
"labelHeight": 21,
"labelPosition": "INSIDE_MIDDLE_CENTER",
"zIndex": 0,
"level": 1
},
{
"id": "employee",
"type": "rectangle",
"pos": {
"x": 171,
"y": 52
},
"width": 112,
"height": 66,
"opacity": 1,
"strokeDash": 0,
"strokeWidth": 2,
"borderRadius": 0,
"fill": "B5",
"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": "employee",
"fontSize": 16,
"fontFamily": "DEFAULT",
"language": "",
"color": "N1",
"italic": false,
"bold": false,
"underline": false,
"labelWidth": 67,
"labelHeight": 21,
"labelPosition": "INSIDE_MIDDLE_CENTER",
"zIndex": 0,
"level": 1
},
{
"id": "rental",
"type": "rectangle",
"pos": {
"x": 327,
"y": 52
},
"width": 100,
"height": 66,
"opacity": 1,
"strokeDash": 0,
"strokeWidth": 2,
"borderRadius": 0,
"fill": "B5",
"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": "rental",
"fontSize": 16,
"fontFamily": "DEFAULT",
"language": "",
"color": "N1",
"italic": false,
"bold": false,
"underline": false,
"labelWidth": 39,
"labelHeight": 21,
"labelPosition": "INSIDE_MIDDLE_CENTER",
"zIndex": 0,
"level": 1
},
{
"id": "item",
"type": "rectangle",
"pos": {
"x": 477,
"y": 52
},
"width": 100,
"height": 66,
"opacity": 1,
"strokeDash": 0,
"strokeWidth": 2,
"borderRadius": 0,
"fill": "B5",
"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": "item",
"fontSize": 16,
"fontFamily": "DEFAULT",
"language": "",
"color": "N1",
"italic": false,
"bold": false,
"underline": false,
"labelWidth": 30,
"labelHeight": 21,
"labelPosition": "INSIDE_MIDDLE_CENTER",
"zIndex": 0,
"level": 1
}
],
"connections": [
{
"id": "(customer -> employee)[0]",
"src": "customer",
"srcArrow": "none",
"dst": "employee",
"dstArrow": "triangle",
"opacity": 1,
"strokeDash": 0,
"strokeWidth": 2,
"stroke": "B1",
"fill": "black",
"borderRadius": 10,
"label": "rent(this, i, p)",
"fontSize": 16,
"fontFamily": "DEFAULT",
"language": "",
"color": "white",
"italic": true,
"bold": false,
"underline": false,
"labelWidth": 86,
"labelHeight": 21,
"labelPosition": "INSIDE_MIDDLE_CENTER",
"labelPercentage": 0,
"route": [
{
"x": 66.5,
"y": 198
},
{
"x": 227,
"y": 198
}
],
"animated": false,
"tooltip": "",
"icon": null,
"zIndex": 4
},
{
"id": "(employee -> rental)[0]",
"src": "employee",
"srcArrow": "none",
"dst": "rental",
"dstArrow": "triangle",
"opacity": 1,
"strokeDash": 0,
"strokeWidth": 2,
"stroke": "B1",
"fill": "black",
"borderRadius": 10,
"label": "new(this, i, p)",
"fontSize": 16,
"fontFamily": "DEFAULT",
"language": "",
"color": "white",
"italic": true,
"bold": false,
"underline": false,
"labelWidth": 87,
"labelHeight": 21,
"labelPosition": "INSIDE_MIDDLE_CENTER",
"labelPercentage": 0,
"route": [
{
"x": 227,
"y": 288
},
{
"x": 377,
"y": 288
}
],
"animated": false,
"tooltip": "",
"icon": null,
"zIndex": 4
},
{
"id": "(rental -> employee)[0]",
"src": "rental",
"srcArrow": "none",
"dst": "employee",
"dstArrow": "triangle",
"opacity": 1,
"strokeDash": 0,
"strokeWidth": 2,
"stroke": "B1",
"fill": "black",
"borderRadius": 10,
"label": "",
"fontSize": 16,
"fontFamily": "DEFAULT",
"language": "",
"color": "white",
"italic": true,
"bold": false,
"underline": false,
"labelWidth": 0,
"labelHeight": 0,
"labelPosition": "",
"labelPercentage": 0,
"route": [
{
"x": 377,
"y": 368
},
{
"x": 227,
"y": 368
}
],
"animated": false,
"tooltip": "",
"icon": null,
"zIndex": 4
},
{
"id": "(employee -> rental)[1]",
"src": "employee",
"srcArrow": "none",
"dst": "rental",
"dstArrow": "triangle",
"opacity": 1,
"strokeDash": 0,
"strokeWidth": 2,
"stroke": "B1",
"fill": "black",
"borderRadius": 10,
"label": "isValid()",
"fontSize": 16,
"fontFamily": "DEFAULT",
"language": "",
"color": "white",
"italic": true,
"bold": false,
"underline": false,
"labelWidth": 52,
"labelHeight": 21,
"labelPosition": "INSIDE_MIDDLE_CENTER",
"labelPercentage": 0,
"route": [
{
"x": 227,
"y": 448
},
{
"x": 377,
"y": 448
}
],
"animated": false,
"tooltip": "",
"icon": null,
"zIndex": 4
},
{
"id": "(rental -> item)[0]",
"src": "rental",
"srcArrow": "none",
"dst": "item",
"dstArrow": "triangle",
"opacity": 1,
"strokeDash": 0,
"strokeWidth": 2,
"stroke": "B1",
"fill": "black",
"borderRadius": 10,
"label": "isRentable(c)",
"fontSize": 16,
"fontFamily": "DEFAULT",
"language": "",
"color": "white",
"italic": true,
"bold": false,
"underline": false,
"labelWidth": 85,
"labelHeight": 21,
"labelPosition": "INSIDE_MIDDLE_CENTER",
"labelPercentage": 0,
"route": [
{
"x": 377,
"y": 538
},
{
"x": 527,
"y": 538
}
],
"animated": false,
"tooltip": "",
"icon": null,
"zIndex": 4
},
{
"id": "(item -> customer)[0]",
"src": "item",
"srcArrow": "none",
"dst": "customer",
"dstArrow": "triangle",
"opacity": 1,
"strokeDash": 0,
"strokeWidth": 2,
"stroke": "B1",
"fill": "black",
"borderRadius": 10,
"label": "is(Adult)",
"fontSize": 16,
"fontFamily": "DEFAULT",
"language": "",
"color": "white",
"italic": true,
"bold": false,
"underline": false,
"labelWidth": 54,
"labelHeight": 21,
"labelPosition": "INSIDE_MIDDLE_CENTER",
"labelPercentage": 0,
"route": [
{
"x": 527,
"y": 628
},
{
"x": 66.5,
"y": 628
}
],
"animated": false,
"tooltip": "",
"icon": null,
"zIndex": 4
},
{
"id": "(customer -> item)[0]",
"src": "customer",
"srcArrow": "none",
"dst": "item",
"dstArrow": "triangle",
"opacity": 1,
"strokeDash": 0,
"strokeWidth": 2,
"stroke": "B1",
"fill": "black",
"borderRadius": 10,
"label": "true",
"fontSize": 16,
"fontFamily": "DEFAULT",
"language": "",
"color": "white",
"italic": true,
"bold": false,
"underline": false,
"labelWidth": 28,
"labelHeight": 21,
"labelPosition": "INSIDE_MIDDLE_CENTER",
"labelPercentage": 0,
"route": [
{
"x": 66.5,
"y": 718
},
{
"x": 527,
"y": 718
}
],
"animated": false,
"tooltip": "",
"icon": null,
"zIndex": 4
},
{
"id": "(customer -- )[0]",
"src": "customer",
"srcArrow": "none",
"dst": "customer-lifeline-end-1038758816",
"dstArrow": "none",
"opacity": 1,
"strokeDash": 6,
"strokeWidth": 2,
"stroke": "B2",
"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": 66.5,
"y": 118
},
{
"x": 66.5,
"y": 788
}
],
"animated": false,
"tooltip": "",
"icon": null,
"zIndex": 1
},
{
"id": "(employee -- )[0]",
"src": "employee",
"srcArrow": "none",
"dst": "employee-lifeline-end-1493022808",
"dstArrow": "none",
"opacity": 1,
"strokeDash": 6,
"strokeWidth": 2,
"stroke": "B2",
"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": 227,
"y": 118
},
{
"x": 227,
"y": 788
}
],
"animated": false,
"tooltip": "",
"icon": null,
"zIndex": 1
},
{
"id": "(rental -- )[0]",
"src": "rental",
"srcArrow": "none",
"dst": "rental-lifeline-end-580282478",
"dstArrow": "none",
"opacity": 1,
"strokeDash": 6,
"strokeWidth": 2,
"stroke": "B2",
"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": 377,
"y": 118
},
{
"x": 377,
"y": 788
}
],
"animated": false,
"tooltip": "",
"icon": null,
"zIndex": 1
},
{
"id": "(item -- )[0]",
"src": "item",
"srcArrow": "none",
"dst": "item-lifeline-end-4102336625",
"dstArrow": "none",
"opacity": 1,
"strokeDash": 6,
"strokeWidth": 2,
"stroke": "B2",
"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": 527,
"y": 118
},
{
"x": 527,
"y": 788
}
],
"animated": false,
"tooltip": "",
"icon": null,
"zIndex": 1
}
],
"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
}
}

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 20 KiB

View file

@ -0,0 +1,638 @@
{
"name": "",
"isFolderOnly": false,
"fontFamily": "SourceSansPro",
"shapes": [
{
"id": "customer",
"type": "rectangle",
"pos": {
"x": 12,
"y": 52
},
"width": 109,
"height": 66,
"opacity": 1,
"strokeDash": 0,
"strokeWidth": 2,
"borderRadius": 0,
"fill": "B5",
"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": "customer",
"fontSize": 16,
"fontFamily": "DEFAULT",
"language": "",
"color": "N1",
"italic": false,
"bold": false,
"underline": false,
"labelWidth": 64,
"labelHeight": 21,
"labelPosition": "INSIDE_MIDDLE_CENTER",
"zIndex": 0,
"level": 1
},
{
"id": "employee",
"type": "rectangle",
"pos": {
"x": 171,
"y": 52
},
"width": 112,
"height": 66,
"opacity": 1,
"strokeDash": 0,
"strokeWidth": 2,
"borderRadius": 0,
"fill": "B5",
"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": "employee",
"fontSize": 16,
"fontFamily": "DEFAULT",
"language": "",
"color": "N1",
"italic": false,
"bold": false,
"underline": false,
"labelWidth": 67,
"labelHeight": 21,
"labelPosition": "INSIDE_MIDDLE_CENTER",
"zIndex": 0,
"level": 1
},
{
"id": "rental",
"type": "rectangle",
"pos": {
"x": 327,
"y": 52
},
"width": 100,
"height": 66,
"opacity": 1,
"strokeDash": 0,
"strokeWidth": 2,
"borderRadius": 0,
"fill": "B5",
"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": "rental",
"fontSize": 16,
"fontFamily": "DEFAULT",
"language": "",
"color": "N1",
"italic": false,
"bold": false,
"underline": false,
"labelWidth": 39,
"labelHeight": 21,
"labelPosition": "INSIDE_MIDDLE_CENTER",
"zIndex": 0,
"level": 1
},
{
"id": "item",
"type": "rectangle",
"pos": {
"x": 477,
"y": 52
},
"width": 100,
"height": 66,
"opacity": 1,
"strokeDash": 0,
"strokeWidth": 2,
"borderRadius": 0,
"fill": "B5",
"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": "item",
"fontSize": 16,
"fontFamily": "DEFAULT",
"language": "",
"color": "N1",
"italic": false,
"bold": false,
"underline": false,
"labelWidth": 30,
"labelHeight": 21,
"labelPosition": "INSIDE_MIDDLE_CENTER",
"zIndex": 0,
"level": 1
}
],
"connections": [
{
"id": "(customer -> employee)[0]",
"src": "customer",
"srcArrow": "none",
"dst": "employee",
"dstArrow": "triangle",
"opacity": 1,
"strokeDash": 0,
"strokeWidth": 2,
"stroke": "B1",
"fill": "black",
"borderRadius": 10,
"label": "rent(this, i, p)",
"fontSize": 16,
"fontFamily": "DEFAULT",
"language": "",
"color": "white",
"italic": true,
"bold": false,
"underline": false,
"labelWidth": 86,
"labelHeight": 21,
"labelPosition": "INSIDE_MIDDLE_CENTER",
"labelPercentage": 0,
"route": [
{
"x": 66.5,
"y": 198
},
{
"x": 227,
"y": 198
}
],
"animated": false,
"tooltip": "",
"icon": null,
"zIndex": 4
},
{
"id": "(employee -> rental)[0]",
"src": "employee",
"srcArrow": "none",
"dst": "rental",
"dstArrow": "triangle",
"opacity": 1,
"strokeDash": 0,
"strokeWidth": 2,
"stroke": "B1",
"fill": "black",
"borderRadius": 10,
"label": "new(this, i, p)",
"fontSize": 16,
"fontFamily": "DEFAULT",
"language": "",
"color": "white",
"italic": true,
"bold": false,
"underline": false,
"labelWidth": 87,
"labelHeight": 21,
"labelPosition": "INSIDE_MIDDLE_CENTER",
"labelPercentage": 0,
"route": [
{
"x": 227,
"y": 288
},
{
"x": 377,
"y": 288
}
],
"animated": false,
"tooltip": "",
"icon": null,
"zIndex": 4
},
{
"id": "(rental -> employee)[0]",
"src": "rental",
"srcArrow": "none",
"dst": "employee",
"dstArrow": "triangle",
"opacity": 1,
"strokeDash": 0,
"strokeWidth": 2,
"stroke": "B1",
"fill": "black",
"borderRadius": 10,
"label": "",
"fontSize": 16,
"fontFamily": "DEFAULT",
"language": "",
"color": "white",
"italic": true,
"bold": false,
"underline": false,
"labelWidth": 0,
"labelHeight": 0,
"labelPosition": "",
"labelPercentage": 0,
"route": [
{
"x": 377,
"y": 368
},
{
"x": 227,
"y": 368
}
],
"animated": false,
"tooltip": "",
"icon": null,
"zIndex": 4
},
{
"id": "(employee -> rental)[1]",
"src": "employee",
"srcArrow": "none",
"dst": "rental",
"dstArrow": "triangle",
"opacity": 1,
"strokeDash": 0,
"strokeWidth": 2,
"stroke": "B1",
"fill": "black",
"borderRadius": 10,
"label": "isValid()",
"fontSize": 16,
"fontFamily": "DEFAULT",
"language": "",
"color": "white",
"italic": true,
"bold": false,
"underline": false,
"labelWidth": 52,
"labelHeight": 21,
"labelPosition": "INSIDE_MIDDLE_CENTER",
"labelPercentage": 0,
"route": [
{
"x": 227,
"y": 448
},
{
"x": 377,
"y": 448
}
],
"animated": false,
"tooltip": "",
"icon": null,
"zIndex": 4
},
{
"id": "(rental -> item)[0]",
"src": "rental",
"srcArrow": "none",
"dst": "item",
"dstArrow": "triangle",
"opacity": 1,
"strokeDash": 0,
"strokeWidth": 2,
"stroke": "B1",
"fill": "black",
"borderRadius": 10,
"label": "isRentable(c)",
"fontSize": 16,
"fontFamily": "DEFAULT",
"language": "",
"color": "white",
"italic": true,
"bold": false,
"underline": false,
"labelWidth": 85,
"labelHeight": 21,
"labelPosition": "INSIDE_MIDDLE_CENTER",
"labelPercentage": 0,
"route": [
{
"x": 377,
"y": 538
},
{
"x": 527,
"y": 538
}
],
"animated": false,
"tooltip": "",
"icon": null,
"zIndex": 4
},
{
"id": "(item -> customer)[0]",
"src": "item",
"srcArrow": "none",
"dst": "customer",
"dstArrow": "triangle",
"opacity": 1,
"strokeDash": 0,
"strokeWidth": 2,
"stroke": "B1",
"fill": "black",
"borderRadius": 10,
"label": "is(Adult)",
"fontSize": 16,
"fontFamily": "DEFAULT",
"language": "",
"color": "white",
"italic": true,
"bold": false,
"underline": false,
"labelWidth": 54,
"labelHeight": 21,
"labelPosition": "INSIDE_MIDDLE_CENTER",
"labelPercentage": 0,
"route": [
{
"x": 527,
"y": 628
},
{
"x": 66.5,
"y": 628
}
],
"animated": false,
"tooltip": "",
"icon": null,
"zIndex": 4
},
{
"id": "(customer -> item)[0]",
"src": "customer",
"srcArrow": "none",
"dst": "item",
"dstArrow": "triangle",
"opacity": 1,
"strokeDash": 0,
"strokeWidth": 2,
"stroke": "B1",
"fill": "black",
"borderRadius": 10,
"label": "true",
"fontSize": 16,
"fontFamily": "DEFAULT",
"language": "",
"color": "white",
"italic": true,
"bold": false,
"underline": false,
"labelWidth": 28,
"labelHeight": 21,
"labelPosition": "INSIDE_MIDDLE_CENTER",
"labelPercentage": 0,
"route": [
{
"x": 66.5,
"y": 718
},
{
"x": 527,
"y": 718
}
],
"animated": false,
"tooltip": "",
"icon": null,
"zIndex": 4
},
{
"id": "(customer -- )[0]",
"src": "customer",
"srcArrow": "none",
"dst": "customer-lifeline-end-1038758816",
"dstArrow": "none",
"opacity": 1,
"strokeDash": 6,
"strokeWidth": 2,
"stroke": "B2",
"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": 66.5,
"y": 118
},
{
"x": 66.5,
"y": 788
}
],
"animated": false,
"tooltip": "",
"icon": null,
"zIndex": 1
},
{
"id": "(employee -- )[0]",
"src": "employee",
"srcArrow": "none",
"dst": "employee-lifeline-end-1493022808",
"dstArrow": "none",
"opacity": 1,
"strokeDash": 6,
"strokeWidth": 2,
"stroke": "B2",
"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": 227,
"y": 118
},
{
"x": 227,
"y": 788
}
],
"animated": false,
"tooltip": "",
"icon": null,
"zIndex": 1
},
{
"id": "(rental -- )[0]",
"src": "rental",
"srcArrow": "none",
"dst": "rental-lifeline-end-580282478",
"dstArrow": "none",
"opacity": 1,
"strokeDash": 6,
"strokeWidth": 2,
"stroke": "B2",
"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": 377,
"y": 118
},
{
"x": 377,
"y": 788
}
],
"animated": false,
"tooltip": "",
"icon": null,
"zIndex": 1
},
{
"id": "(item -- )[0]",
"src": "item",
"srcArrow": "none",
"dst": "item-lifeline-end-4102336625",
"dstArrow": "none",
"opacity": 1,
"strokeDash": 6,
"strokeWidth": 2,
"stroke": "B2",
"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": 527,
"y": 118
},
{
"x": 527,
"y": 788
}
],
"animated": false,
"tooltip": "",
"icon": null,
"zIndex": 1
}
],
"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
}
}

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 20 KiB

View file

@ -378,3 +378,21 @@ D: "Alignment\nOf\nAlignment\nOf"{
RightAligned
Justified
}
-- connection-style-fill --
shape: sequence_diagram
customer
employee
rental
item
(* -> *)[*].style.fill: black
(* -> *)[*].style.font-color: white
customer -> employee: "rent(this, i, p)"
employee -> rental: "new(this, i, p)"
rental -> employee
employee -> rental: isValid()
rental -> item: isRentable(c)
item -> customer: is(Adult)
customer -> item: true