Merge pull request #1736 from gavin-ts/fix-cloud-innerbox
Fix cloud innerbox
|
|
@ -30,3 +30,4 @@
|
|||
- Fixes edge case where nested edge globs were creating excess shapes [#1713](https://github.com/terrastruct/d2/pull/1713)
|
||||
- Fixes a panic with a connection to a grid cell that is a container in TALA [#1729](https://github.com/terrastruct/d2/pull/1729)
|
||||
- Fixes incorrect grid cell positioning when the grid has a shape set and fixes content sometimes escaping circle shapes. [#1734](https://github.com/terrastruct/d2/pull/1734)
|
||||
- Fixes content sometimes escaping cloud shapes. [#1736](https://github.com/terrastruct/d2/pull/1736)
|
||||
|
|
|
|||
|
|
@ -167,6 +167,10 @@ func toShape(obj *d2graph.Object, theme *d2themes.Theme) d2target.Shape {
|
|||
case d2target.ShapeSQLTable:
|
||||
shape.SQLTable = *obj.SQLTable
|
||||
shape.FontSize -= d2target.HeaderFontAdd
|
||||
case d2target.ShapeCloud:
|
||||
if obj.ContentAspectRatio != nil {
|
||||
shape.ContentAspectRatio = go2.Pointer(*obj.ContentAspectRatio)
|
||||
}
|
||||
}
|
||||
shape.Label = text.Text
|
||||
shape.LabelWidth = text.Dimensions.Width
|
||||
|
|
|
|||
|
|
@ -107,6 +107,8 @@ type Object struct {
|
|||
LabelPosition *string `json:"labelPosition,omitempty"`
|
||||
IconPosition *string `json:"iconPosition,omitempty"`
|
||||
|
||||
ContentAspectRatio *float64 `json:"contentAspectRatio,omitempty"`
|
||||
|
||||
Class *d2target.Class `json:"class,omitempty"`
|
||||
SQLTable *d2target.SQLTable `json:"sql_table,omitempty"`
|
||||
|
||||
|
|
@ -1068,13 +1070,17 @@ func (obj *Object) SizeToContent(contentWidth, contentHeight, paddingX, paddingY
|
|||
obj.Width = sideLength
|
||||
obj.Height = sideLength
|
||||
} else if desiredHeight == 0 || desiredWidth == 0 {
|
||||
switch s.GetType() {
|
||||
switch shapeType {
|
||||
case shape.PERSON_TYPE:
|
||||
obj.Width, obj.Height = shape.LimitAR(obj.Width, obj.Height, shape.PERSON_AR_LIMIT)
|
||||
case shape.OVAL_TYPE:
|
||||
obj.Width, obj.Height = shape.LimitAR(obj.Width, obj.Height, shape.OVAL_AR_LIMIT)
|
||||
}
|
||||
}
|
||||
if shapeType == shape.CLOUD_TYPE {
|
||||
innerBox := s.GetInnerBoxForContent(contentWidth, contentHeight)
|
||||
obj.ContentAspectRatio = go2.Pointer(innerBox.Width / innerBox.Height)
|
||||
}
|
||||
}
|
||||
|
||||
func (obj *Object) OuterNearContainer() *Object {
|
||||
|
|
|
|||
|
|
@ -364,7 +364,11 @@ func (obj *Object) ToShape() shape.Shape {
|
|||
dslShape := strings.ToLower(obj.Shape.Value)
|
||||
shapeType := d2target.DSL_SHAPE_TO_SHAPE_TYPE[dslShape]
|
||||
contentBox := geo.NewBox(tl, obj.Width, obj.Height)
|
||||
return shape.NewShape(shapeType, contentBox)
|
||||
s := shape.NewShape(shapeType, contentBox)
|
||||
if shapeType == shape.CLOUD_TYPE && obj.ContentAspectRatio != nil {
|
||||
s.SetInnerBoxAspectRatio(*obj.ContentAspectRatio)
|
||||
}
|
||||
return s
|
||||
}
|
||||
|
||||
func (obj *Object) GetLabelTopLeft() *geo.Point {
|
||||
|
|
|
|||
|
|
@ -125,7 +125,6 @@ func Layout(ctx context.Context, g *d2graph.Graph) error {
|
|||
// depending on the shape innerBox may be larger than totalWidth, totalHeight
|
||||
// if this is the case, we want to center the cells within the larger innerBox
|
||||
innerBox := s.GetInnerBox()
|
||||
|
||||
var resizeDx, resizeDy float64
|
||||
if innerBox.Width > totalWidth {
|
||||
resizeDx = (innerBox.Width - totalWidth) / 2
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 129 KiB After Width: | Height: | Size: 129 KiB |
|
Before Width: | Height: | Size: 120 KiB After Width: | Height: | Size: 120 KiB |
|
Before Width: | Height: | Size: 164 KiB After Width: | Height: | Size: 164 KiB |
|
Before Width: | Height: | Size: 167 KiB After Width: | Height: | Size: 167 KiB |
|
|
@ -932,6 +932,9 @@ func drawShape(writer, appendixWriter io.Writer, diagramHash string, targetShape
|
|||
shapeType := d2target.DSL_SHAPE_TO_SHAPE_TYPE[targetShape.Type]
|
||||
|
||||
s := shape.NewShape(shapeType, geo.NewBox(tl, width, height))
|
||||
if shapeType == shape.CLOUD_TYPE && targetShape.ContentAspectRatio != nil {
|
||||
s.SetInnerBoxAspectRatio(*targetShape.ContentAspectRatio)
|
||||
}
|
||||
|
||||
var shadowAttr string
|
||||
if targetShape.Shadow {
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 27 KiB |
|
|
@ -469,6 +469,8 @@ type Shape struct {
|
|||
Class
|
||||
SQLTable
|
||||
|
||||
ContentAspectRatio *float64 `json:"contentAspectRatio,omitempty"`
|
||||
|
||||
Text
|
||||
|
||||
LabelPosition string `json:"labelPosition,omitempty"`
|
||||
|
|
|
|||
|
|
@ -1051,6 +1051,7 @@ cf many required: {
|
|||
loadFromFile(t, "grid_image_label_position"),
|
||||
loadFromFile(t, "glob_dimensions"),
|
||||
loadFromFile(t, "shaped_grid_positioning"),
|
||||
loadFromFile(t, "cloud_shaped_grid"),
|
||||
}
|
||||
|
||||
runa(t, tcs)
|
||||
|
|
|
|||
27
e2etests/testdata/files/cloud_shaped_grid.d2
vendored
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
vars: {
|
||||
grid-container: {
|
||||
label: ""
|
||||
grid-gap: 10
|
||||
grid-rows: 1
|
||||
grid-columns: 4
|
||||
a
|
||||
b
|
||||
c
|
||||
d
|
||||
}
|
||||
}
|
||||
cloud: {
|
||||
shape: cloud
|
||||
...${grid-container}
|
||||
width: 395
|
||||
height: 395
|
||||
}
|
||||
|
||||
circle: {
|
||||
shape: circle
|
||||
...${grid-container}
|
||||
width: 395
|
||||
height: 395
|
||||
}
|
||||
|
||||
direction: right
|
||||
1
e2etests/testdata/patterns/all_shapes/dagre/board.exp.json
generated
vendored
|
|
@ -703,6 +703,7 @@
|
|||
"fields": null,
|
||||
"methods": null,
|
||||
"columns": null,
|
||||
"contentAspectRatio": 2.586678832116788,
|
||||
"label": "cloud",
|
||||
"fontSize": 16,
|
||||
"fontFamily": "DEFAULT",
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 25 KiB |
1
e2etests/testdata/patterns/multiple/dagre/board.exp.json
generated
vendored
|
|
@ -703,6 +703,7 @@
|
|||
"fields": null,
|
||||
"methods": null,
|
||||
"columns": null,
|
||||
"contentAspectRatio": 2.586678832116788,
|
||||
"label": "cloud",
|
||||
"fontSize": 16,
|
||||
"fontFamily": "DEFAULT",
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |
1
e2etests/testdata/patterns/paper/dagre/board.exp.json
generated
vendored
|
|
@ -703,6 +703,7 @@
|
|||
"fields": null,
|
||||
"methods": null,
|
||||
"columns": null,
|
||||
"contentAspectRatio": 2.586678832116788,
|
||||
"label": "cloud",
|
||||
"fontSize": 16,
|
||||
"fontFamily": "DEFAULT",
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 449 KiB After Width: | Height: | Size: 449 KiB |
456
e2etests/testdata/regression/cloud_shaped_grid/dagre/board.exp.json
generated
vendored
Normal file
|
|
@ -0,0 +1,456 @@
|
|||
{
|
||||
"name": "",
|
||||
"isFolderOnly": false,
|
||||
"fontFamily": "SourceSansPro",
|
||||
"shapes": [
|
||||
{
|
||||
"id": "cloud.a",
|
||||
"type": "rectangle",
|
||||
"pos": {
|
||||
"x": 74,
|
||||
"y": 237
|
||||
},
|
||||
"width": 53,
|
||||
"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": "a",
|
||||
"fontSize": 16,
|
||||
"fontFamily": "DEFAULT",
|
||||
"language": "",
|
||||
"color": "N1",
|
||||
"italic": false,
|
||||
"bold": true,
|
||||
"underline": false,
|
||||
"labelWidth": 8,
|
||||
"labelHeight": 21,
|
||||
"labelPosition": "INSIDE_MIDDLE_CENTER",
|
||||
"zIndex": 0,
|
||||
"level": 2
|
||||
},
|
||||
{
|
||||
"id": "circle.a",
|
||||
"type": "rectangle",
|
||||
"pos": {
|
||||
"x": 76,
|
||||
"y": 619
|
||||
},
|
||||
"width": 53,
|
||||
"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": "a",
|
||||
"fontSize": 16,
|
||||
"fontFamily": "DEFAULT",
|
||||
"language": "",
|
||||
"color": "N1",
|
||||
"italic": false,
|
||||
"bold": true,
|
||||
"underline": false,
|
||||
"labelWidth": 8,
|
||||
"labelHeight": 21,
|
||||
"labelPosition": "INSIDE_MIDDLE_CENTER",
|
||||
"zIndex": 0,
|
||||
"level": 2
|
||||
},
|
||||
{
|
||||
"id": "cloud.b",
|
||||
"type": "rectangle",
|
||||
"pos": {
|
||||
"x": 137,
|
||||
"y": 237
|
||||
},
|
||||
"width": 53,
|
||||
"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": "b",
|
||||
"fontSize": 16,
|
||||
"fontFamily": "DEFAULT",
|
||||
"language": "",
|
||||
"color": "N1",
|
||||
"italic": false,
|
||||
"bold": true,
|
||||
"underline": false,
|
||||
"labelWidth": 8,
|
||||
"labelHeight": 21,
|
||||
"labelPosition": "INSIDE_MIDDLE_CENTER",
|
||||
"zIndex": 0,
|
||||
"level": 2
|
||||
},
|
||||
{
|
||||
"id": "circle.b",
|
||||
"type": "rectangle",
|
||||
"pos": {
|
||||
"x": 139,
|
||||
"y": 619
|
||||
},
|
||||
"width": 53,
|
||||
"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": "b",
|
||||
"fontSize": 16,
|
||||
"fontFamily": "DEFAULT",
|
||||
"language": "",
|
||||
"color": "N1",
|
||||
"italic": false,
|
||||
"bold": true,
|
||||
"underline": false,
|
||||
"labelWidth": 8,
|
||||
"labelHeight": 21,
|
||||
"labelPosition": "INSIDE_MIDDLE_CENTER",
|
||||
"zIndex": 0,
|
||||
"level": 2
|
||||
},
|
||||
{
|
||||
"id": "cloud.c",
|
||||
"type": "rectangle",
|
||||
"pos": {
|
||||
"x": 200,
|
||||
"y": 237
|
||||
},
|
||||
"width": 53,
|
||||
"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": "c",
|
||||
"fontSize": 16,
|
||||
"fontFamily": "DEFAULT",
|
||||
"language": "",
|
||||
"color": "N1",
|
||||
"italic": false,
|
||||
"bold": true,
|
||||
"underline": false,
|
||||
"labelWidth": 8,
|
||||
"labelHeight": 21,
|
||||
"labelPosition": "INSIDE_MIDDLE_CENTER",
|
||||
"zIndex": 0,
|
||||
"level": 2
|
||||
},
|
||||
{
|
||||
"id": "circle.c",
|
||||
"type": "rectangle",
|
||||
"pos": {
|
||||
"x": 202,
|
||||
"y": 619
|
||||
},
|
||||
"width": 53,
|
||||
"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": "c",
|
||||
"fontSize": 16,
|
||||
"fontFamily": "DEFAULT",
|
||||
"language": "",
|
||||
"color": "N1",
|
||||
"italic": false,
|
||||
"bold": true,
|
||||
"underline": false,
|
||||
"labelWidth": 8,
|
||||
"labelHeight": 21,
|
||||
"labelPosition": "INSIDE_MIDDLE_CENTER",
|
||||
"zIndex": 0,
|
||||
"level": 2
|
||||
},
|
||||
{
|
||||
"id": "cloud.d",
|
||||
"type": "rectangle",
|
||||
"pos": {
|
||||
"x": 263,
|
||||
"y": 237
|
||||
},
|
||||
"width": 54,
|
||||
"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": "d",
|
||||
"fontSize": 16,
|
||||
"fontFamily": "DEFAULT",
|
||||
"language": "",
|
||||
"color": "N1",
|
||||
"italic": false,
|
||||
"bold": true,
|
||||
"underline": false,
|
||||
"labelWidth": 9,
|
||||
"labelHeight": 21,
|
||||
"labelPosition": "INSIDE_MIDDLE_CENTER",
|
||||
"zIndex": 0,
|
||||
"level": 2
|
||||
},
|
||||
{
|
||||
"id": "circle.d",
|
||||
"type": "rectangle",
|
||||
"pos": {
|
||||
"x": 265,
|
||||
"y": 619
|
||||
},
|
||||
"width": 54,
|
||||
"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": "d",
|
||||
"fontSize": 16,
|
||||
"fontFamily": "DEFAULT",
|
||||
"language": "",
|
||||
"color": "N1",
|
||||
"italic": false,
|
||||
"bold": true,
|
||||
"underline": false,
|
||||
"labelWidth": 9,
|
||||
"labelHeight": 21,
|
||||
"labelPosition": "INSIDE_MIDDLE_CENTER",
|
||||
"zIndex": 0,
|
||||
"level": 2
|
||||
},
|
||||
{
|
||||
"id": "cloud",
|
||||
"type": "cloud",
|
||||
"pos": {
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"width": 395,
|
||||
"height": 395,
|
||||
"opacity": 1,
|
||||
"strokeDash": 0,
|
||||
"strokeWidth": 2,
|
||||
"borderRadius": 0,
|
||||
"fill": "N7",
|
||||
"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": "",
|
||||
"fontSize": 28,
|
||||
"fontFamily": "DEFAULT",
|
||||
"language": "",
|
||||
"color": "N1",
|
||||
"italic": false,
|
||||
"bold": false,
|
||||
"underline": false,
|
||||
"labelWidth": 0,
|
||||
"labelHeight": 0,
|
||||
"zIndex": 0,
|
||||
"level": 1
|
||||
},
|
||||
{
|
||||
"id": "circle",
|
||||
"type": "oval",
|
||||
"pos": {
|
||||
"x": 0,
|
||||
"y": 455
|
||||
},
|
||||
"width": 395,
|
||||
"height": 395,
|
||||
"opacity": 1,
|
||||
"strokeDash": 0,
|
||||
"strokeWidth": 2,
|
||||
"borderRadius": 0,
|
||||
"fill": "B4",
|
||||
"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": "",
|
||||
"fontSize": 28,
|
||||
"fontFamily": "DEFAULT",
|
||||
"language": "",
|
||||
"color": "N1",
|
||||
"italic": false,
|
||||
"bold": false,
|
||||
"underline": false,
|
||||
"labelWidth": 0,
|
||||
"labelHeight": 0,
|
||||
"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
|
||||
}
|
||||
}
|
||||
102
e2etests/testdata/regression/cloud_shaped_grid/dagre/sketch.exp.svg
vendored
Normal file
|
|
@ -0,0 +1,102 @@
|
|||
<?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.1-HEAD" preserveAspectRatio="xMinYMin meet" viewBox="0 0 397 852"><svg id="d2-svg" class="d2-264392866" width="397" height="852" viewBox="-1 -1 397 852"><rect x="-1.000000" y="-1.000000" width="397.000000" height="852.000000" rx="0.000000" class=" fill-N7" stroke-width="0" /><style type="text/css"><![CDATA[
|
||||
.d2-264392866 .text-bold {
|
||||
font-family: "d2-264392866-font-bold";
|
||||
}
|
||||
@font-face {
|
||||
font-family: d2-264392866-font-bold;
|
||||
src: url("data:application/font-woff;base64,d09GRgABAAAAAAdEAAoAAAAADBQAAguFAAAAAAAAAAAAAAAAAAAAAAAAAABPUy8yAAAA9AAAAGAAAABgXxHXr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fvyzfW6pTzliJSY8F8vwDM8muxzwCFjZRjoZm6vQ1MvRJOXHKr6SyJZDaXnyCIc4PGcAw54yfN3+rhk4oyLW3FZz93imCO6HH5QFQv7Lke8Xn37/6y/i2lTtTierk4v7j3FJ3dQ6xfas9v3sqeJlZOYW7TbrTgjYFpycbvrNbnHeP8AAAD//wEAAP//9LdPUXicYmBmAIP/5xiMGLAAAAAAAP//AQAA//8vAQIDAAAA");
|
||||
}]]></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-264392866 .fill-N1{fill:#0A0F25;}
|
||||
.d2-264392866 .fill-N2{fill:#676C7E;}
|
||||
.d2-264392866 .fill-N3{fill:#9499AB;}
|
||||
.d2-264392866 .fill-N4{fill:#CFD2DD;}
|
||||
.d2-264392866 .fill-N5{fill:#DEE1EB;}
|
||||
.d2-264392866 .fill-N6{fill:#EEF1F8;}
|
||||
.d2-264392866 .fill-N7{fill:#FFFFFF;}
|
||||
.d2-264392866 .fill-B1{fill:#0D32B2;}
|
||||
.d2-264392866 .fill-B2{fill:#0D32B2;}
|
||||
.d2-264392866 .fill-B3{fill:#E3E9FD;}
|
||||
.d2-264392866 .fill-B4{fill:#E3E9FD;}
|
||||
.d2-264392866 .fill-B5{fill:#EDF0FD;}
|
||||
.d2-264392866 .fill-B6{fill:#F7F8FE;}
|
||||
.d2-264392866 .fill-AA2{fill:#4A6FF3;}
|
||||
.d2-264392866 .fill-AA4{fill:#EDF0FD;}
|
||||
.d2-264392866 .fill-AA5{fill:#F7F8FE;}
|
||||
.d2-264392866 .fill-AB4{fill:#EDF0FD;}
|
||||
.d2-264392866 .fill-AB5{fill:#F7F8FE;}
|
||||
.d2-264392866 .stroke-N1{stroke:#0A0F25;}
|
||||
.d2-264392866 .stroke-N2{stroke:#676C7E;}
|
||||
.d2-264392866 .stroke-N3{stroke:#9499AB;}
|
||||
.d2-264392866 .stroke-N4{stroke:#CFD2DD;}
|
||||
.d2-264392866 .stroke-N5{stroke:#DEE1EB;}
|
||||
.d2-264392866 .stroke-N6{stroke:#EEF1F8;}
|
||||
.d2-264392866 .stroke-N7{stroke:#FFFFFF;}
|
||||
.d2-264392866 .stroke-B1{stroke:#0D32B2;}
|
||||
.d2-264392866 .stroke-B2{stroke:#0D32B2;}
|
||||
.d2-264392866 .stroke-B3{stroke:#E3E9FD;}
|
||||
.d2-264392866 .stroke-B4{stroke:#E3E9FD;}
|
||||
.d2-264392866 .stroke-B5{stroke:#EDF0FD;}
|
||||
.d2-264392866 .stroke-B6{stroke:#F7F8FE;}
|
||||
.d2-264392866 .stroke-AA2{stroke:#4A6FF3;}
|
||||
.d2-264392866 .stroke-AA4{stroke:#EDF0FD;}
|
||||
.d2-264392866 .stroke-AA5{stroke:#F7F8FE;}
|
||||
.d2-264392866 .stroke-AB4{stroke:#EDF0FD;}
|
||||
.d2-264392866 .stroke-AB5{stroke:#F7F8FE;}
|
||||
.d2-264392866 .background-color-N1{background-color:#0A0F25;}
|
||||
.d2-264392866 .background-color-N2{background-color:#676C7E;}
|
||||
.d2-264392866 .background-color-N3{background-color:#9499AB;}
|
||||
.d2-264392866 .background-color-N4{background-color:#CFD2DD;}
|
||||
.d2-264392866 .background-color-N5{background-color:#DEE1EB;}
|
||||
.d2-264392866 .background-color-N6{background-color:#EEF1F8;}
|
||||
.d2-264392866 .background-color-N7{background-color:#FFFFFF;}
|
||||
.d2-264392866 .background-color-B1{background-color:#0D32B2;}
|
||||
.d2-264392866 .background-color-B2{background-color:#0D32B2;}
|
||||
.d2-264392866 .background-color-B3{background-color:#E3E9FD;}
|
||||
.d2-264392866 .background-color-B4{background-color:#E3E9FD;}
|
||||
.d2-264392866 .background-color-B5{background-color:#EDF0FD;}
|
||||
.d2-264392866 .background-color-B6{background-color:#F7F8FE;}
|
||||
.d2-264392866 .background-color-AA2{background-color:#4A6FF3;}
|
||||
.d2-264392866 .background-color-AA4{background-color:#EDF0FD;}
|
||||
.d2-264392866 .background-color-AA5{background-color:#F7F8FE;}
|
||||
.d2-264392866 .background-color-AB4{background-color:#EDF0FD;}
|
||||
.d2-264392866 .background-color-AB5{background-color:#F7F8FE;}
|
||||
.d2-264392866 .color-N1{color:#0A0F25;}
|
||||
.d2-264392866 .color-N2{color:#676C7E;}
|
||||
.d2-264392866 .color-N3{color:#9499AB;}
|
||||
.d2-264392866 .color-N4{color:#CFD2DD;}
|
||||
.d2-264392866 .color-N5{color:#DEE1EB;}
|
||||
.d2-264392866 .color-N6{color:#EEF1F8;}
|
||||
.d2-264392866 .color-N7{color:#FFFFFF;}
|
||||
.d2-264392866 .color-B1{color:#0D32B2;}
|
||||
.d2-264392866 .color-B2{color:#0D32B2;}
|
||||
.d2-264392866 .color-B3{color:#E3E9FD;}
|
||||
.d2-264392866 .color-B4{color:#E3E9FD;}
|
||||
.d2-264392866 .color-B5{color:#EDF0FD;}
|
||||
.d2-264392866 .color-B6{color:#F7F8FE;}
|
||||
.d2-264392866 .color-AA2{color:#4A6FF3;}
|
||||
.d2-264392866 .color-AA4{color:#EDF0FD;}
|
||||
.d2-264392866 .color-AA5{color:#F7F8FE;}
|
||||
.d2-264392866 .color-AB4{color:#EDF0FD;}
|
||||
.d2-264392866 .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="cloud"><g class="shape" ><path d="M 65 138 C 65 142 62 146 60 146 C 26 151 0 205 0 270 C 0 339 30 395 67 395 H 322 C 362 395 395 335 395 263 C 395 194 365 136 327 132 C 324 132 322 129 321 124 C 312 54 273 1 227 1 C 197 1 170 23 153 58 C 151 62 148 63 146 62 C 139 58 132 56 124 56 C 93 54 68 91 65 138 Z" class=" stroke-B1 fill-N7" style="stroke-width:2;" /></g></g><g id="circle"><g class="shape" ><ellipse rx="197.500000" ry="197.500000" cx="197.500000" cy="652.500000" class="shape stroke-B1 fill-B4" style="stroke-width:2;" /></g></g><g id="cloud.a"><g class="shape" ><rect x="74.000000" y="237.000000" width="53.000000" height="66.000000" class=" stroke-B1 fill-B5" style="stroke-width:2;" /></g><text x="100.500000" y="275.500000" class="text-bold fill-N1" style="text-anchor:middle;font-size:16px">a</text></g><g id="circle.a"><g class="shape" ><rect x="76.000000" y="619.000000" width="53.000000" height="66.000000" class=" stroke-B1 fill-B5" style="stroke-width:2;" /></g><text x="102.500000" y="657.500000" class="text-bold fill-N1" style="text-anchor:middle;font-size:16px">a</text></g><g id="cloud.b"><g class="shape" ><rect x="137.000000" y="237.000000" width="53.000000" height="66.000000" class=" stroke-B1 fill-B5" style="stroke-width:2;" /></g><text x="163.500000" y="275.500000" class="text-bold fill-N1" style="text-anchor:middle;font-size:16px">b</text></g><g id="circle.b"><g class="shape" ><rect x="139.000000" y="619.000000" width="53.000000" height="66.000000" class=" stroke-B1 fill-B5" style="stroke-width:2;" /></g><text x="165.500000" y="657.500000" class="text-bold fill-N1" style="text-anchor:middle;font-size:16px">b</text></g><g id="cloud.c"><g class="shape" ><rect x="200.000000" y="237.000000" width="53.000000" height="66.000000" class=" stroke-B1 fill-B5" style="stroke-width:2;" /></g><text x="226.500000" y="275.500000" class="text-bold fill-N1" style="text-anchor:middle;font-size:16px">c</text></g><g id="circle.c"><g class="shape" ><rect x="202.000000" y="619.000000" width="53.000000" height="66.000000" class=" stroke-B1 fill-B5" style="stroke-width:2;" /></g><text x="228.500000" y="657.500000" class="text-bold fill-N1" style="text-anchor:middle;font-size:16px">c</text></g><g id="cloud.d"><g class="shape" ><rect x="263.000000" y="237.000000" width="54.000000" height="66.000000" class=" stroke-B1 fill-B5" style="stroke-width:2;" /></g><text x="290.000000" y="275.500000" class="text-bold fill-N1" style="text-anchor:middle;font-size:16px">d</text></g><g id="circle.d"><g class="shape" ><rect x="265.000000" y="619.000000" width="54.000000" height="66.000000" class=" stroke-B1 fill-B5" style="stroke-width:2;" /></g><text x="292.000000" y="657.500000" class="text-bold fill-N1" style="text-anchor:middle;font-size:16px">d</text></g><mask id="d2-264392866" maskUnits="userSpaceOnUse" x="-1" y="-1" width="397" height="852">
|
||||
<rect x="-1" y="-1" width="397" height="852" fill="white"></rect>
|
||||
<rect x="96.500000" y="259.500000" width="8" height="21" fill="rgba(0,0,0,0.75)"></rect>
|
||||
<rect x="98.500000" y="641.500000" width="8" height="21" fill="rgba(0,0,0,0.75)"></rect>
|
||||
<rect x="159.500000" y="259.500000" width="8" height="21" fill="rgba(0,0,0,0.75)"></rect>
|
||||
<rect x="161.500000" y="641.500000" width="8" height="21" fill="rgba(0,0,0,0.75)"></rect>
|
||||
<rect x="222.500000" y="259.500000" width="8" height="21" fill="rgba(0,0,0,0.75)"></rect>
|
||||
<rect x="224.500000" y="641.500000" width="8" height="21" fill="rgba(0,0,0,0.75)"></rect>
|
||||
<rect x="285.500000" y="259.500000" width="9" height="21" fill="rgba(0,0,0,0.75)"></rect>
|
||||
<rect x="287.500000" y="641.500000" width="9" height="21" fill="rgba(0,0,0,0.75)"></rect>
|
||||
</mask></svg></svg>
|
||||
|
After Width: | Height: | Size: 12 KiB |
456
e2etests/testdata/regression/cloud_shaped_grid/elk/board.exp.json
generated
vendored
Normal file
|
|
@ -0,0 +1,456 @@
|
|||
{
|
||||
"name": "",
|
||||
"isFolderOnly": false,
|
||||
"fontFamily": "SourceSansPro",
|
||||
"shapes": [
|
||||
{
|
||||
"id": "cloud.a",
|
||||
"type": "rectangle",
|
||||
"pos": {
|
||||
"x": 86,
|
||||
"y": 249
|
||||
},
|
||||
"width": 53,
|
||||
"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": "a",
|
||||
"fontSize": 16,
|
||||
"fontFamily": "DEFAULT",
|
||||
"language": "",
|
||||
"color": "N1",
|
||||
"italic": false,
|
||||
"bold": true,
|
||||
"underline": false,
|
||||
"labelWidth": 8,
|
||||
"labelHeight": 21,
|
||||
"labelPosition": "INSIDE_MIDDLE_CENTER",
|
||||
"zIndex": 0,
|
||||
"level": 2
|
||||
},
|
||||
{
|
||||
"id": "circle.a",
|
||||
"type": "rectangle",
|
||||
"pos": {
|
||||
"x": 88,
|
||||
"y": 591
|
||||
},
|
||||
"width": 53,
|
||||
"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": "a",
|
||||
"fontSize": 16,
|
||||
"fontFamily": "DEFAULT",
|
||||
"language": "",
|
||||
"color": "N1",
|
||||
"italic": false,
|
||||
"bold": true,
|
||||
"underline": false,
|
||||
"labelWidth": 8,
|
||||
"labelHeight": 21,
|
||||
"labelPosition": "INSIDE_MIDDLE_CENTER",
|
||||
"zIndex": 0,
|
||||
"level": 2
|
||||
},
|
||||
{
|
||||
"id": "cloud.b",
|
||||
"type": "rectangle",
|
||||
"pos": {
|
||||
"x": 149,
|
||||
"y": 249
|
||||
},
|
||||
"width": 53,
|
||||
"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": "b",
|
||||
"fontSize": 16,
|
||||
"fontFamily": "DEFAULT",
|
||||
"language": "",
|
||||
"color": "N1",
|
||||
"italic": false,
|
||||
"bold": true,
|
||||
"underline": false,
|
||||
"labelWidth": 8,
|
||||
"labelHeight": 21,
|
||||
"labelPosition": "INSIDE_MIDDLE_CENTER",
|
||||
"zIndex": 0,
|
||||
"level": 2
|
||||
},
|
||||
{
|
||||
"id": "circle.b",
|
||||
"type": "rectangle",
|
||||
"pos": {
|
||||
"x": 151,
|
||||
"y": 591
|
||||
},
|
||||
"width": 53,
|
||||
"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": "b",
|
||||
"fontSize": 16,
|
||||
"fontFamily": "DEFAULT",
|
||||
"language": "",
|
||||
"color": "N1",
|
||||
"italic": false,
|
||||
"bold": true,
|
||||
"underline": false,
|
||||
"labelWidth": 8,
|
||||
"labelHeight": 21,
|
||||
"labelPosition": "INSIDE_MIDDLE_CENTER",
|
||||
"zIndex": 0,
|
||||
"level": 2
|
||||
},
|
||||
{
|
||||
"id": "cloud.c",
|
||||
"type": "rectangle",
|
||||
"pos": {
|
||||
"x": 212,
|
||||
"y": 249
|
||||
},
|
||||
"width": 53,
|
||||
"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": "c",
|
||||
"fontSize": 16,
|
||||
"fontFamily": "DEFAULT",
|
||||
"language": "",
|
||||
"color": "N1",
|
||||
"italic": false,
|
||||
"bold": true,
|
||||
"underline": false,
|
||||
"labelWidth": 8,
|
||||
"labelHeight": 21,
|
||||
"labelPosition": "INSIDE_MIDDLE_CENTER",
|
||||
"zIndex": 0,
|
||||
"level": 2
|
||||
},
|
||||
{
|
||||
"id": "circle.c",
|
||||
"type": "rectangle",
|
||||
"pos": {
|
||||
"x": 214,
|
||||
"y": 591
|
||||
},
|
||||
"width": 53,
|
||||
"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": "c",
|
||||
"fontSize": 16,
|
||||
"fontFamily": "DEFAULT",
|
||||
"language": "",
|
||||
"color": "N1",
|
||||
"italic": false,
|
||||
"bold": true,
|
||||
"underline": false,
|
||||
"labelWidth": 8,
|
||||
"labelHeight": 21,
|
||||
"labelPosition": "INSIDE_MIDDLE_CENTER",
|
||||
"zIndex": 0,
|
||||
"level": 2
|
||||
},
|
||||
{
|
||||
"id": "cloud.d",
|
||||
"type": "rectangle",
|
||||
"pos": {
|
||||
"x": 275,
|
||||
"y": 249
|
||||
},
|
||||
"width": 54,
|
||||
"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": "d",
|
||||
"fontSize": 16,
|
||||
"fontFamily": "DEFAULT",
|
||||
"language": "",
|
||||
"color": "N1",
|
||||
"italic": false,
|
||||
"bold": true,
|
||||
"underline": false,
|
||||
"labelWidth": 9,
|
||||
"labelHeight": 21,
|
||||
"labelPosition": "INSIDE_MIDDLE_CENTER",
|
||||
"zIndex": 0,
|
||||
"level": 2
|
||||
},
|
||||
{
|
||||
"id": "circle.d",
|
||||
"type": "rectangle",
|
||||
"pos": {
|
||||
"x": 277,
|
||||
"y": 591
|
||||
},
|
||||
"width": 54,
|
||||
"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": "d",
|
||||
"fontSize": 16,
|
||||
"fontFamily": "DEFAULT",
|
||||
"language": "",
|
||||
"color": "N1",
|
||||
"italic": false,
|
||||
"bold": true,
|
||||
"underline": false,
|
||||
"labelWidth": 9,
|
||||
"labelHeight": 21,
|
||||
"labelPosition": "INSIDE_MIDDLE_CENTER",
|
||||
"zIndex": 0,
|
||||
"level": 2
|
||||
},
|
||||
{
|
||||
"id": "cloud",
|
||||
"type": "cloud",
|
||||
"pos": {
|
||||
"x": 12,
|
||||
"y": 12
|
||||
},
|
||||
"width": 395,
|
||||
"height": 395,
|
||||
"opacity": 1,
|
||||
"strokeDash": 0,
|
||||
"strokeWidth": 2,
|
||||
"borderRadius": 0,
|
||||
"fill": "N7",
|
||||
"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": "",
|
||||
"fontSize": 28,
|
||||
"fontFamily": "DEFAULT",
|
||||
"language": "",
|
||||
"color": "N1",
|
||||
"italic": false,
|
||||
"bold": false,
|
||||
"underline": false,
|
||||
"labelWidth": 0,
|
||||
"labelHeight": 0,
|
||||
"zIndex": 0,
|
||||
"level": 1
|
||||
},
|
||||
{
|
||||
"id": "circle",
|
||||
"type": "oval",
|
||||
"pos": {
|
||||
"x": 12,
|
||||
"y": 427
|
||||
},
|
||||
"width": 395,
|
||||
"height": 395,
|
||||
"opacity": 1,
|
||||
"strokeDash": 0,
|
||||
"strokeWidth": 2,
|
||||
"borderRadius": 0,
|
||||
"fill": "B4",
|
||||
"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": "",
|
||||
"fontSize": 28,
|
||||
"fontFamily": "DEFAULT",
|
||||
"language": "",
|
||||
"color": "N1",
|
||||
"italic": false,
|
||||
"bold": false,
|
||||
"underline": false,
|
||||
"labelWidth": 0,
|
||||
"labelHeight": 0,
|
||||
"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
|
||||
}
|
||||
}
|
||||
102
e2etests/testdata/regression/cloud_shaped_grid/elk/sketch.exp.svg
vendored
Normal file
|
|
@ -0,0 +1,102 @@
|
|||
<?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.1-HEAD" preserveAspectRatio="xMinYMin meet" viewBox="0 0 397 812"><svg id="d2-svg" class="d2-3959288689" width="397" height="812" viewBox="11 11 397 812"><rect x="11.000000" y="11.000000" width="397.000000" height="812.000000" rx="0.000000" class=" fill-N7" stroke-width="0" /><style type="text/css"><![CDATA[
|
||||
.d2-3959288689 .text-bold {
|
||||
font-family: "d2-3959288689-font-bold";
|
||||
}
|
||||
@font-face {
|
||||
font-family: d2-3959288689-font-bold;
|
||||
src: url("data:application/font-woff;base64,d09GRgABAAAAAAdEAAoAAAAADBQAAguFAAAAAAAAAAAAAAAAAAAAAAAAAABPUy8yAAAA9AAAAGAAAABgXxHXrmNtYXAAAAFUAAAANgAAADYAEACnZ2x5ZgAAAYwAAAHTAAAB6CtRtZRoZWFkAAADYAAAADYAAAA2G38e1GhoZWEAA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Zz93imCO6HH5QFQv7Lke8Xn37/6y/i2lTtTierk4v7j3FJ3dQ6xfas9v3sqeJlZOYW7TbrTgjYFpycbvrNbnHeP8AAAD//wEAAP//9LdPUXicYmBmAIP/5xiMGLAAAAAAAP//AQAA//8vAQIDAAAA");
|
||||
}]]></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-3959288689 .fill-N1{fill:#0A0F25;}
|
||||
.d2-3959288689 .fill-N2{fill:#676C7E;}
|
||||
.d2-3959288689 .fill-N3{fill:#9499AB;}
|
||||
.d2-3959288689 .fill-N4{fill:#CFD2DD;}
|
||||
.d2-3959288689 .fill-N5{fill:#DEE1EB;}
|
||||
.d2-3959288689 .fill-N6{fill:#EEF1F8;}
|
||||
.d2-3959288689 .fill-N7{fill:#FFFFFF;}
|
||||
.d2-3959288689 .fill-B1{fill:#0D32B2;}
|
||||
.d2-3959288689 .fill-B2{fill:#0D32B2;}
|
||||
.d2-3959288689 .fill-B3{fill:#E3E9FD;}
|
||||
.d2-3959288689 .fill-B4{fill:#E3E9FD;}
|
||||
.d2-3959288689 .fill-B5{fill:#EDF0FD;}
|
||||
.d2-3959288689 .fill-B6{fill:#F7F8FE;}
|
||||
.d2-3959288689 .fill-AA2{fill:#4A6FF3;}
|
||||
.d2-3959288689 .fill-AA4{fill:#EDF0FD;}
|
||||
.d2-3959288689 .fill-AA5{fill:#F7F8FE;}
|
||||
.d2-3959288689 .fill-AB4{fill:#EDF0FD;}
|
||||
.d2-3959288689 .fill-AB5{fill:#F7F8FE;}
|
||||
.d2-3959288689 .stroke-N1{stroke:#0A0F25;}
|
||||
.d2-3959288689 .stroke-N2{stroke:#676C7E;}
|
||||
.d2-3959288689 .stroke-N3{stroke:#9499AB;}
|
||||
.d2-3959288689 .stroke-N4{stroke:#CFD2DD;}
|
||||
.d2-3959288689 .stroke-N5{stroke:#DEE1EB;}
|
||||
.d2-3959288689 .stroke-N6{stroke:#EEF1F8;}
|
||||
.d2-3959288689 .stroke-N7{stroke:#FFFFFF;}
|
||||
.d2-3959288689 .stroke-B1{stroke:#0D32B2;}
|
||||
.d2-3959288689 .stroke-B2{stroke:#0D32B2;}
|
||||
.d2-3959288689 .stroke-B3{stroke:#E3E9FD;}
|
||||
.d2-3959288689 .stroke-B4{stroke:#E3E9FD;}
|
||||
.d2-3959288689 .stroke-B5{stroke:#EDF0FD;}
|
||||
.d2-3959288689 .stroke-B6{stroke:#F7F8FE;}
|
||||
.d2-3959288689 .stroke-AA2{stroke:#4A6FF3;}
|
||||
.d2-3959288689 .stroke-AA4{stroke:#EDF0FD;}
|
||||
.d2-3959288689 .stroke-AA5{stroke:#F7F8FE;}
|
||||
.d2-3959288689 .stroke-AB4{stroke:#EDF0FD;}
|
||||
.d2-3959288689 .stroke-AB5{stroke:#F7F8FE;}
|
||||
.d2-3959288689 .background-color-N1{background-color:#0A0F25;}
|
||||
.d2-3959288689 .background-color-N2{background-color:#676C7E;}
|
||||
.d2-3959288689 .background-color-N3{background-color:#9499AB;}
|
||||
.d2-3959288689 .background-color-N4{background-color:#CFD2DD;}
|
||||
.d2-3959288689 .background-color-N5{background-color:#DEE1EB;}
|
||||
.d2-3959288689 .background-color-N6{background-color:#EEF1F8;}
|
||||
.d2-3959288689 .background-color-N7{background-color:#FFFFFF;}
|
||||
.d2-3959288689 .background-color-B1{background-color:#0D32B2;}
|
||||
.d2-3959288689 .background-color-B2{background-color:#0D32B2;}
|
||||
.d2-3959288689 .background-color-B3{background-color:#E3E9FD;}
|
||||
.d2-3959288689 .background-color-B4{background-color:#E3E9FD;}
|
||||
.d2-3959288689 .background-color-B5{background-color:#EDF0FD;}
|
||||
.d2-3959288689 .background-color-B6{background-color:#F7F8FE;}
|
||||
.d2-3959288689 .background-color-AA2{background-color:#4A6FF3;}
|
||||
.d2-3959288689 .background-color-AA4{background-color:#EDF0FD;}
|
||||
.d2-3959288689 .background-color-AA5{background-color:#F7F8FE;}
|
||||
.d2-3959288689 .background-color-AB4{background-color:#EDF0FD;}
|
||||
.d2-3959288689 .background-color-AB5{background-color:#F7F8FE;}
|
||||
.d2-3959288689 .color-N1{color:#0A0F25;}
|
||||
.d2-3959288689 .color-N2{color:#676C7E;}
|
||||
.d2-3959288689 .color-N3{color:#9499AB;}
|
||||
.d2-3959288689 .color-N4{color:#CFD2DD;}
|
||||
.d2-3959288689 .color-N5{color:#DEE1EB;}
|
||||
.d2-3959288689 .color-N6{color:#EEF1F8;}
|
||||
.d2-3959288689 .color-N7{color:#FFFFFF;}
|
||||
.d2-3959288689 .color-B1{color:#0D32B2;}
|
||||
.d2-3959288689 .color-B2{color:#0D32B2;}
|
||||
.d2-3959288689 .color-B3{color:#E3E9FD;}
|
||||
.d2-3959288689 .color-B4{color:#E3E9FD;}
|
||||
.d2-3959288689 .color-B5{color:#EDF0FD;}
|
||||
.d2-3959288689 .color-B6{color:#F7F8FE;}
|
||||
.d2-3959288689 .color-AA2{color:#4A6FF3;}
|
||||
.d2-3959288689 .color-AA4{color:#EDF0FD;}
|
||||
.d2-3959288689 .color-AA5{color:#F7F8FE;}
|
||||
.d2-3959288689 .color-AB4{color:#EDF0FD;}
|
||||
.d2-3959288689 .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="cloud"><g class="shape" ><path d="M 77 150 C 77 154 74 158 72 158 C 38 163 12 217 12 282 C 12 351 42 407 79 407 H 334 C 374 407 407 347 407 275 C 407 206 377 148 339 144 C 336 144 334 141 333 136 C 324 66 285 13 239 13 C 209 13 182 35 165 70 C 163 74 160 75 158 74 C 151 70 144 68 136 68 C 105 66 80 103 77 150 Z" class=" stroke-B1 fill-N7" style="stroke-width:2;" /></g></g><g id="circle"><g class="shape" ><ellipse rx="197.500000" ry="197.500000" cx="209.500000" cy="624.500000" class="shape stroke-B1 fill-B4" style="stroke-width:2;" /></g></g><g id="cloud.a"><g class="shape" ><rect x="86.000000" y="249.000000" width="53.000000" height="66.000000" class=" stroke-B1 fill-B5" style="stroke-width:2;" /></g><text x="112.500000" y="287.500000" class="text-bold fill-N1" style="text-anchor:middle;font-size:16px">a</text></g><g id="circle.a"><g class="shape" ><rect x="88.000000" y="591.000000" width="53.000000" height="66.000000" class=" stroke-B1 fill-B5" style="stroke-width:2;" /></g><text x="114.500000" y="629.500000" class="text-bold fill-N1" style="text-anchor:middle;font-size:16px">a</text></g><g id="cloud.b"><g class="shape" ><rect x="149.000000" y="249.000000" width="53.000000" height="66.000000" class=" stroke-B1 fill-B5" style="stroke-width:2;" /></g><text x="175.500000" y="287.500000" class="text-bold fill-N1" style="text-anchor:middle;font-size:16px">b</text></g><g id="circle.b"><g class="shape" ><rect x="151.000000" y="591.000000" width="53.000000" height="66.000000" class=" stroke-B1 fill-B5" style="stroke-width:2;" /></g><text x="177.500000" y="629.500000" class="text-bold fill-N1" style="text-anchor:middle;font-size:16px">b</text></g><g id="cloud.c"><g class="shape" ><rect x="212.000000" y="249.000000" width="53.000000" height="66.000000" class=" stroke-B1 fill-B5" style="stroke-width:2;" /></g><text x="238.500000" y="287.500000" class="text-bold fill-N1" style="text-anchor:middle;font-size:16px">c</text></g><g id="circle.c"><g class="shape" ><rect x="214.000000" y="591.000000" width="53.000000" height="66.000000" class=" stroke-B1 fill-B5" style="stroke-width:2;" /></g><text x="240.500000" y="629.500000" class="text-bold fill-N1" style="text-anchor:middle;font-size:16px">c</text></g><g id="cloud.d"><g class="shape" ><rect x="275.000000" y="249.000000" width="54.000000" height="66.000000" class=" stroke-B1 fill-B5" style="stroke-width:2;" /></g><text x="302.000000" y="287.500000" class="text-bold fill-N1" style="text-anchor:middle;font-size:16px">d</text></g><g id="circle.d"><g class="shape" ><rect x="277.000000" y="591.000000" width="54.000000" height="66.000000" class=" stroke-B1 fill-B5" style="stroke-width:2;" /></g><text x="304.000000" y="629.500000" class="text-bold fill-N1" style="text-anchor:middle;font-size:16px">d</text></g><mask id="d2-3959288689" maskUnits="userSpaceOnUse" x="11" y="11" width="397" height="812">
|
||||
<rect x="11" y="11" width="397" height="812" fill="white"></rect>
|
||||
<rect x="108.500000" y="271.500000" width="8" height="21" fill="rgba(0,0,0,0.75)"></rect>
|
||||
<rect x="110.500000" y="613.500000" width="8" height="21" fill="rgba(0,0,0,0.75)"></rect>
|
||||
<rect x="171.500000" y="271.500000" width="8" height="21" fill="rgba(0,0,0,0.75)"></rect>
|
||||
<rect x="173.500000" y="613.500000" width="8" height="21" fill="rgba(0,0,0,0.75)"></rect>
|
||||
<rect x="234.500000" y="271.500000" width="8" height="21" fill="rgba(0,0,0,0.75)"></rect>
|
||||
<rect x="236.500000" y="613.500000" width="8" height="21" fill="rgba(0,0,0,0.75)"></rect>
|
||||
<rect x="297.500000" y="271.500000" width="9" height="21" fill="rgba(0,0,0,0.75)"></rect>
|
||||
<rect x="299.500000" y="613.500000" width="9" height="21" fill="rgba(0,0,0,0.75)"></rect>
|
||||
</mask></svg></svg>
|
||||
|
After Width: | Height: | Size: 12 KiB |
9
e2etests/testdata/regression/shaped_grid_positioning/dagre/board.exp.json
generated
vendored
|
|
@ -90,7 +90,7 @@
|
|||
"type": "rectangle",
|
||||
"pos": {
|
||||
"x": 3477,
|
||||
"y": 351
|
||||
"y": 321
|
||||
},
|
||||
"width": 53,
|
||||
"height": 66,
|
||||
|
|
@ -336,7 +336,7 @@
|
|||
"type": "rectangle",
|
||||
"pos": {
|
||||
"x": 3570,
|
||||
"y": 351
|
||||
"y": 321
|
||||
},
|
||||
"width": 54,
|
||||
"height": 66,
|
||||
|
|
@ -582,7 +582,7 @@
|
|||
"type": "rectangle",
|
||||
"pos": {
|
||||
"x": 3477,
|
||||
"y": 457
|
||||
"y": 427
|
||||
},
|
||||
"width": 53,
|
||||
"height": 66,
|
||||
|
|
@ -951,7 +951,7 @@
|
|||
"type": "rectangle",
|
||||
"pos": {
|
||||
"x": 3570,
|
||||
"y": 457
|
||||
"y": 427
|
||||
},
|
||||
"width": 54,
|
||||
"height": 66,
|
||||
|
|
@ -1219,6 +1219,7 @@
|
|||
"fields": null,
|
||||
"methods": null,
|
||||
"columns": null,
|
||||
"contentAspectRatio": 15.747196012106103,
|
||||
"label": "aaaaaaaaaaaaaaa aaaaaaaaaaaaaaa",
|
||||
"fontSize": 28,
|
||||
"fontFamily": "DEFAULT",
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 23 KiB |
9
e2etests/testdata/regression/shaped_grid_positioning/elk/board.exp.json
generated
vendored
|
|
@ -90,7 +90,7 @@
|
|||
"type": "rectangle",
|
||||
"pos": {
|
||||
"x": 3289,
|
||||
"y": 363
|
||||
"y": 333
|
||||
},
|
||||
"width": 53,
|
||||
"height": 66,
|
||||
|
|
@ -336,7 +336,7 @@
|
|||
"type": "rectangle",
|
||||
"pos": {
|
||||
"x": 3382,
|
||||
"y": 363
|
||||
"y": 333
|
||||
},
|
||||
"width": 54,
|
||||
"height": 66,
|
||||
|
|
@ -582,7 +582,7 @@
|
|||
"type": "rectangle",
|
||||
"pos": {
|
||||
"x": 3289,
|
||||
"y": 469
|
||||
"y": 439
|
||||
},
|
||||
"width": 53,
|
||||
"height": 66,
|
||||
|
|
@ -951,7 +951,7 @@
|
|||
"type": "rectangle",
|
||||
"pos": {
|
||||
"x": 3382,
|
||||
"y": 469
|
||||
"y": 439
|
||||
},
|
||||
"width": 54,
|
||||
"height": 66,
|
||||
|
|
@ -1219,6 +1219,7 @@
|
|||
"fields": null,
|
||||
"methods": null,
|
||||
"columns": null,
|
||||
"contentAspectRatio": 15.747196012106103,
|
||||
"label": "aaaaaaaaaaaaaaa aaaaaaaaaaaaaaa",
|
||||
"fontSize": 28,
|
||||
"fontFamily": "DEFAULT",
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 23 KiB |
1
e2etests/testdata/stable/all_shapes/dagre/board.exp.json
generated
vendored
|
|
@ -686,6 +686,7 @@
|
|||
"fields": null,
|
||||
"methods": null,
|
||||
"columns": null,
|
||||
"contentAspectRatio": 2.586678832116788,
|
||||
"label": "cloud",
|
||||
"fontSize": 16,
|
||||
"fontFamily": "DEFAULT",
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
1
e2etests/testdata/stable/all_shapes/elk/board.exp.json
generated
vendored
|
|
@ -686,6 +686,7 @@
|
|||
"fields": null,
|
||||
"methods": null,
|
||||
"columns": null,
|
||||
"contentAspectRatio": 2.586678832116788,
|
||||
"label": "cloud",
|
||||
"fontSize": 16,
|
||||
"fontFamily": "DEFAULT",
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
3
e2etests/testdata/stable/all_shapes_link/dagre/board.exp.json
generated
vendored
|
|
@ -778,6 +778,7 @@
|
|||
"fields": null,
|
||||
"methods": null,
|
||||
"columns": null,
|
||||
"contentAspectRatio": 2.586678832116788,
|
||||
"label": "cloud",
|
||||
"fontSize": 16,
|
||||
"fontFamily": "DEFAULT",
|
||||
|
|
@ -1567,6 +1568,7 @@
|
|||
"fields": null,
|
||||
"methods": null,
|
||||
"columns": null,
|
||||
"contentAspectRatio": 2.586678832116788,
|
||||
"label": "cloud",
|
||||
"fontSize": 16,
|
||||
"fontFamily": "DEFAULT",
|
||||
|
|
@ -2373,6 +2375,7 @@
|
|||
"fields": null,
|
||||
"methods": null,
|
||||
"columns": null,
|
||||
"contentAspectRatio": 2.586678832116788,
|
||||
"label": "cloud",
|
||||
"fontSize": 16,
|
||||
"fontFamily": "DEFAULT",
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 141 KiB After Width: | Height: | Size: 141 KiB |
3
e2etests/testdata/stable/all_shapes_link/elk/board.exp.json
generated
vendored
|
|
@ -778,6 +778,7 @@
|
|||
"fields": null,
|
||||
"methods": null,
|
||||
"columns": null,
|
||||
"contentAspectRatio": 2.586678832116788,
|
||||
"label": "cloud",
|
||||
"fontSize": 16,
|
||||
"fontFamily": "DEFAULT",
|
||||
|
|
@ -1567,6 +1568,7 @@
|
|||
"fields": null,
|
||||
"methods": null,
|
||||
"columns": null,
|
||||
"contentAspectRatio": 2.586678832116788,
|
||||
"label": "cloud",
|
||||
"fontSize": 16,
|
||||
"fontFamily": "DEFAULT",
|
||||
|
|
@ -2373,6 +2375,7 @@
|
|||
"fields": null,
|
||||
"methods": null,
|
||||
"columns": null,
|
||||
"contentAspectRatio": 2.586678832116788,
|
||||
"label": "cloud",
|
||||
"fontSize": 16,
|
||||
"fontFamily": "DEFAULT",
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 140 KiB After Width: | Height: | Size: 140 KiB |
1
e2etests/testdata/stable/all_shapes_multiple/dagre/board.exp.json
generated
vendored
|
|
@ -686,6 +686,7 @@
|
|||
"fields": null,
|
||||
"methods": null,
|
||||
"columns": null,
|
||||
"contentAspectRatio": 2.586678832116788,
|
||||
"label": "cloud",
|
||||
"fontSize": 16,
|
||||
"fontFamily": "DEFAULT",
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 24 KiB |
1
e2etests/testdata/stable/all_shapes_multiple/elk/board.exp.json
generated
vendored
|
|
@ -686,6 +686,7 @@
|
|||
"fields": null,
|
||||
"methods": null,
|
||||
"columns": null,
|
||||
"contentAspectRatio": 2.586678832116788,
|
||||
"label": "cloud",
|
||||
"fontSize": 16,
|
||||
"fontFamily": "DEFAULT",
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 24 KiB |
1
e2etests/testdata/stable/all_shapes_shadow/dagre/board.exp.json
generated
vendored
|
|
@ -686,6 +686,7 @@
|
|||
"fields": null,
|
||||
"methods": null,
|
||||
"columns": null,
|
||||
"contentAspectRatio": 2.586678832116788,
|
||||
"label": "cloud",
|
||||
"fontSize": 16,
|
||||
"fontFamily": "DEFAULT",
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
1
e2etests/testdata/stable/all_shapes_shadow/elk/board.exp.json
generated
vendored
|
|
@ -686,6 +686,7 @@
|
|||
"fields": null,
|
||||
"methods": null,
|
||||
"columns": null,
|
||||
"contentAspectRatio": 2.586678832116788,
|
||||
"label": "cloud",
|
||||
"fontSize": 16,
|
||||
"fontFamily": "DEFAULT",
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
1
e2etests/testdata/stable/nesting_power/dagre/board.exp.json
generated
vendored
|
|
@ -2038,6 +2038,7 @@
|
|||
"fields": null,
|
||||
"methods": null,
|
||||
"columns": null,
|
||||
"contentAspectRatio": 2.586678832116788,
|
||||
"label": "cloud",
|
||||
"fontSize": 16,
|
||||
"fontFamily": "DEFAULT",
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 116 KiB After Width: | Height: | Size: 116 KiB |
1
e2etests/testdata/stable/nesting_power/elk/board.exp.json
generated
vendored
|
|
@ -2038,6 +2038,7 @@
|
|||
"fields": null,
|
||||
"methods": null,
|
||||
"columns": null,
|
||||
"contentAspectRatio": 2.586678832116788,
|
||||
"label": "cloud",
|
||||
"fontSize": 16,
|
||||
"fontFamily": "DEFAULT",
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 117 KiB After Width: | Height: | Size: 116 KiB |
1
e2etests/testdata/stable/sequence_diagram_all_shapes/dagre/board.exp.json
generated
vendored
|
|
@ -167,6 +167,7 @@
|
|||
"fields": null,
|
||||
"methods": null,
|
||||
"columns": null,
|
||||
"contentAspectRatio": 4.253649635036496,
|
||||
"label": "cloudyyyy",
|
||||
"fontSize": 16,
|
||||
"fontFamily": "DEFAULT",
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 52 KiB After Width: | Height: | Size: 52 KiB |
1
e2etests/testdata/stable/sequence_diagram_all_shapes/elk/board.exp.json
generated
vendored
|
|
@ -167,6 +167,7 @@
|
|||
"fields": null,
|
||||
"methods": null,
|
||||
"columns": null,
|
||||
"contentAspectRatio": 4.253649635036496,
|
||||
"label": "cloudyyyy",
|
||||
"fontSize": 16,
|
||||
"fontFamily": "DEFAULT",
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 52 KiB After Width: | Height: | Size: 52 KiB |
1
e2etests/testdata/todo/container_label_edge_adjustment/dagre/board.exp.json
generated
vendored
|
|
@ -71,6 +71,7 @@
|
|||
"fields": null,
|
||||
"methods": null,
|
||||
"columns": null,
|
||||
"contentAspectRatio": 7.2903685241231955,
|
||||
"label": "a container label",
|
||||
"fontSize": 28,
|
||||
"fontFamily": "DEFAULT",
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
1
e2etests/testdata/todo/container_label_edge_adjustment/elk/board.exp.json
generated
vendored
|
|
@ -71,6 +71,7 @@
|
|||
"fields": null,
|
||||
"methods": null,
|
||||
"columns": null,
|
||||
"contentAspectRatio": 7.2903685241231955,
|
||||
"label": "a container label",
|
||||
"fontSize": 28,
|
||||
"fontFamily": "DEFAULT",
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
1
e2etests/testdata/todo/shape_set_width_height/dagre/board.exp.json
generated
vendored
|
|
@ -399,6 +399,7 @@
|
|||
"fields": null,
|
||||
"methods": null,
|
||||
"columns": null,
|
||||
"contentAspectRatio": 2.8467153284671527,
|
||||
"label": "cloud",
|
||||
"fontSize": 16,
|
||||
"fontFamily": "DEFAULT",
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 69 KiB After Width: | Height: | Size: 69 KiB |
1
e2etests/testdata/todo/shape_set_width_height/elk/board.exp.json
generated
vendored
|
|
@ -399,6 +399,7 @@
|
|||
"fields": null,
|
||||
"methods": null,
|
||||
"columns": null,
|
||||
"contentAspectRatio": 2.8467153284671527,
|
||||
"label": "cloud",
|
||||
"fontSize": 16,
|
||||
"fontFamily": "DEFAULT",
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 69 KiB After Width: | Height: | Size: 69 KiB |
|
|
@ -45,6 +45,9 @@ type Shape interface {
|
|||
|
||||
GetBox() *geo.Box
|
||||
GetInnerBox() *geo.Box
|
||||
// cloud shape has different innerBoxes depending on content's aspect ratio
|
||||
GetInnerBoxForContent(width, height float64) *geo.Box
|
||||
SetInnerBoxAspectRatio(aspectRatio float64)
|
||||
|
||||
// placing a rectangle of the given size and padding inside the shape, return the position relative to the shape's TopLeft
|
||||
GetInsidePlacement(width, height, paddingX, paddingY float64) geo.Point
|
||||
|
|
@ -88,6 +91,15 @@ func (s baseShape) GetInnerBox() *geo.Box {
|
|||
return s.Box
|
||||
}
|
||||
|
||||
// only cloud shape needs this right now
|
||||
func (s baseShape) GetInnerBoxForContent(width, height float64) *geo.Box {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (s baseShape) SetInnerBoxAspectRatio(aspectRatio float64) {
|
||||
// only used for cloud
|
||||
}
|
||||
|
||||
func (s baseShape) GetInsidePlacement(_, _, paddingX, paddingY float64) geo.Point {
|
||||
innerTL := (*s.FullShape).GetInnerBox().TopLeft
|
||||
return *geo.NewPoint(innerTL.X+paddingX/2, innerTL.Y+paddingY/2)
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@ const CLOUD_SQUARE_INNER_HEIGHT = 0.663
|
|||
|
||||
type shapeCloud struct {
|
||||
*baseShape
|
||||
innerBoxAspectRatio *float64
|
||||
}
|
||||
|
||||
func NewCloud(box *geo.Box) Shape {
|
||||
|
|
@ -38,17 +39,26 @@ func NewCloud(box *geo.Box) Shape {
|
|||
Type: CLOUD_TYPE,
|
||||
Box: box,
|
||||
},
|
||||
innerBoxAspectRatio: go2.Pointer(0.),
|
||||
}
|
||||
shape.FullShape = go2.Pointer(Shape(shape))
|
||||
return shape
|
||||
}
|
||||
|
||||
// TODO this isn't always accurate since the content aspect ratio might be different from the final shape's https://github.com/terrastruct/d2/issues/1735
|
||||
func (s shapeCloud) GetInnerBox() *geo.Box {
|
||||
width := s.Box.Width
|
||||
height := s.Box.Height
|
||||
if s.innerBoxAspectRatio != nil && *s.innerBoxAspectRatio != 0. {
|
||||
return s.GetInnerBoxForContent(*s.innerBoxAspectRatio, 1)
|
||||
} else {
|
||||
return s.GetInnerBoxForContent(s.Box.Width, s.Box.Height)
|
||||
}
|
||||
}
|
||||
|
||||
// we need this since the content's aspect ratio determines which placement is used
|
||||
func (s shapeCloud) GetInnerBoxForContent(width, height float64) *geo.Box {
|
||||
insideTL := s.GetInsidePlacement(width, height, 0, 0)
|
||||
aspectRatio := width / height
|
||||
// aspect ratio and position are computed with given dimensions, but final box size is determined by shape size
|
||||
width, height = s.Box.Width, s.Box.Height
|
||||
if aspectRatio > CLOUD_WIDE_ASPECT_BOUNDARY {
|
||||
width *= CLOUD_WIDE_INNER_WIDTH
|
||||
height *= CLOUD_WIDE_INNER_HEIGHT
|
||||
|
|
@ -62,6 +72,11 @@ func (s shapeCloud) GetInnerBox() *geo.Box {
|
|||
return geo.NewBox(&insideTL, width, height)
|
||||
}
|
||||
|
||||
func (s shapeCloud) SetInnerBoxAspectRatio(aspectRatio float64) {
|
||||
// only used for cloud
|
||||
*s.innerBoxAspectRatio = aspectRatio
|
||||
}
|
||||
|
||||
func (s shapeCloud) GetDimensionsToFit(width, height, paddingX, paddingY float64) (float64, float64) {
|
||||
width += paddingX
|
||||
height += paddingY
|
||||
|
|
|
|||