diff --git a/ci/release/changelogs/next.md b/ci/release/changelogs/next.md
index 1078069ca..4457be55c 100644
--- a/ci/release/changelogs/next.md
+++ b/ci/release/changelogs/next.md
@@ -2,9 +2,11 @@
- Tooltips can be set on shapes. See [https://d2lang.com/tour/tooltips](https://d2lang.com/tour/interactive). [#548](https://github.com/terrastruct/d2/pull/548)
- Links can be set on shapes. See [https://d2lang.com/tour/tooltips](https://d2lang.com/tour/interactive). [#548](https://github.com/terrastruct/d2/pull/548)
+- The `width` and `height` attributes are no longer restricted to images and can be applied to non-container shapes. [#498](https://github.com/terrastruct/d2/pull/498)
#### Improvements 🧹
#### Bugfixes ⛑️
- Restricts where `near` key constant values can be used, with good error messages, instead of erroring (e.g. setting `near: top-center` on a container would cause bad layouts or error). [#538](https://github.com/terrastruct/d2/pull/538)
+- Fixes rendering classes and tables with empty headers. [#498](https://github.com/terrastruct/d2/pull/498)
diff --git a/d2compiler/compile.go b/d2compiler/compile.go
index 86e6e63d3..2e4d75c3b 100644
--- a/d2compiler/compile.go
+++ b/d2compiler/compile.go
@@ -797,15 +797,18 @@ func (c *compiler) validateKey(obj *d2graph.Object, m *d2ast.Map, mk *d2ast.Key)
return
}
- if reserved == "" && obj.Attributes.Shape.Value == d2target.ShapeImage {
- c.errorf(mk.Range.Start, mk.Range.End, "image shapes cannot have children.")
- }
+ switch strings.ToLower(obj.Attributes.Shape.Value) {
+ case d2target.ShapeImage:
+ if reserved == "" {
+ c.errorf(mk.Range.Start, mk.Range.End, "image shapes cannot have children.")
+ }
+ case d2target.ShapeCircle, d2target.ShapeSquare:
+ checkEqual := (reserved == "width" && obj.Attributes.Height != nil) ||
+ (reserved == "height" && obj.Attributes.Width != nil)
- if reserved == "width" && obj.Attributes.Shape.Value != d2target.ShapeImage {
- c.errorf(mk.Range.Start, mk.Range.End, "width is only applicable to image shapes.")
- }
- if reserved == "height" && obj.Attributes.Shape.Value != d2target.ShapeImage {
- c.errorf(mk.Range.Start, mk.Range.End, "height is only applicable to image shapes.")
+ if checkEqual && obj.Attributes.Width.Value != obj.Attributes.Height.Value {
+ c.errorf(mk.Range.Start, mk.Range.End, fmt.Sprintf("width and height must be equal for %s shapes", obj.Attributes.Shape.Value))
+ }
}
in := d2target.IsShape(obj.Attributes.Shape.Value)
@@ -830,6 +833,14 @@ func (c *compiler) validateKey(obj *d2graph.Object, m *d2ast.Map, mk *d2ast.Key)
return
}
+ switch strings.ToLower(obj.Attributes.Shape.Value) {
+ case d2target.ShapeSQLTable, d2target.ShapeClass:
+ default:
+ if len(obj.Children) > 0 && (reserved == "width" || reserved == "height") {
+ c.errorf(mk.Range.Start, mk.Range.End, fmt.Sprintf("%s cannot be used on container: %s", reserved, obj.AbsID()))
+ }
+ }
+
if len(mk.Edges) > 0 {
return
}
diff --git a/d2compiler/compile_test.go b/d2compiler/compile_test.go
index cf7283649..52a2e3149 100644
--- a/d2compiler/compile_test.go
+++ b/d2compiler/compile_test.go
@@ -95,8 +95,119 @@ x: {
height: 230
}
`,
- expErr: `d2/testdata/d2compiler/TestCompile/dimensions_on_nonimage.d2:3:2: width is only applicable to image shapes.
-d2/testdata/d2compiler/TestCompile/dimensions_on_nonimage.d2:4:2: height is only applicable to image shapes.
+ assertions: func(t *testing.T, g *d2graph.Graph) {
+ if len(g.Objects) != 1 {
+ t.Fatalf("expected 1 objects: %#v", g.Objects)
+ }
+ if g.Objects[0].ID != "hey" {
+ t.Fatalf("expected g.Objects[0].ID to be 'hey': %#v", g.Objects[0])
+ }
+ if g.Objects[0].Attributes.Shape.Value != d2target.ShapeHexagon {
+ t.Fatalf("expected g.Objects[0].Attributes.Shape.Value to be hexagon: %#v", g.Objects[0].Attributes.Shape.Value)
+ }
+ if g.Objects[0].Attributes.Width.Value != "200" {
+ t.Fatalf("expected g.Objects[0].Attributes.Width.Value to be 200: %#v", g.Objects[0].Attributes.Width.Value)
+ }
+ if g.Objects[0].Attributes.Height.Value != "230" {
+ t.Fatalf("expected g.Objects[0].Attributes.Height.Value to be 230: %#v", g.Objects[0].Attributes.Height.Value)
+ }
+ },
+ },
+ {
+ name: "equal_dimensions_on_circle",
+
+ text: `hey: "" {
+ shape: circle
+ width: 200
+ height: 230
+}
+`,
+ expErr: `d2/testdata/d2compiler/TestCompile/equal_dimensions_on_circle.d2:3:2: width and height must be equal for circle shapes
+d2/testdata/d2compiler/TestCompile/equal_dimensions_on_circle.d2:4:2: width and height must be equal for circle shapes
+`,
+ },
+ {
+ name: "single_dimension_on_circle",
+
+ text: `hey: "" {
+ shape: circle
+ height: 230
+}
+`,
+ assertions: func(t *testing.T, g *d2graph.Graph) {
+ if len(g.Objects) != 1 {
+ t.Fatalf("expected 1 objects: %#v", g.Objects)
+ }
+ if g.Objects[0].ID != "hey" {
+ t.Fatalf("expected ID to be 'hey': %#v", g.Objects[0])
+ }
+ if g.Objects[0].Attributes.Shape.Value != d2target.ShapeCircle {
+ t.Fatalf("expected Attributes.Shape.Value to be circle: %#v", g.Objects[0].Attributes.Shape.Value)
+ }
+ if g.Objects[0].Attributes.Width != nil {
+ t.Fatalf("expected Attributes.Width to be nil: %#v", g.Objects[0].Attributes.Width)
+ }
+ if g.Objects[0].Attributes.Height == nil {
+ t.Fatalf("Attributes.Height is nil")
+ }
+ },
+ },
+ {
+ name: "no_dimensions_on_containers",
+
+ text: `
+containers: {
+ circle container: {
+ shape: circle
+ width: 512
+
+ diamond: {
+ shape: diamond
+ width: 128
+ height: 64
+ }
+ }
+ diamond container: {
+ shape: diamond
+ width: 512
+ height: 256
+
+ circle: {
+ shape: circle
+ width: 128
+ }
+ }
+ oval container: {
+ shape: oval
+ width: 512
+ height: 256
+
+ hexagon: {
+ shape: hexagon
+ width: 128
+ height: 64
+ }
+ }
+ hexagon container: {
+ shape: hexagon
+ width: 512
+ height: 256
+
+ oval: {
+ shape: oval
+ width: 128
+ height: 64
+ }
+ }
+}
+`,
+ expErr: `d2/testdata/d2compiler/TestCompile/no_dimensions_on_containers.d2:5:3: width cannot be used on container: containers.circle container
+d2/testdata/d2compiler/TestCompile/no_dimensions_on_containers.d2:15:3: width cannot be used on container: containers.diamond container
+d2/testdata/d2compiler/TestCompile/no_dimensions_on_containers.d2:16:3: height cannot be used on container: containers.diamond container
+d2/testdata/d2compiler/TestCompile/no_dimensions_on_containers.d2:25:3: width cannot be used on container: containers.oval container
+d2/testdata/d2compiler/TestCompile/no_dimensions_on_containers.d2:26:3: height cannot be used on container: containers.oval container
+d2/testdata/d2compiler/TestCompile/no_dimensions_on_containers.d2:36:3: width cannot be used on container: containers.hexagon container
+d2/testdata/d2compiler/TestCompile/no_dimensions_on_containers.d2:37:3: height cannot be used on container: containers.hexagon container
`,
},
{
diff --git a/d2graph/d2graph.go b/d2graph/d2graph.go
index 6ab44e7f1..7bc38cfa7 100644
--- a/d2graph/d2graph.go
+++ b/d2graph/d2graph.go
@@ -3,6 +3,7 @@ package d2graph
import (
"errors"
"fmt"
+ "math"
"net/url"
"strconv"
"strings"
@@ -21,6 +22,7 @@ import (
)
const INNER_LABEL_PADDING int = 5
+const DEFAULT_SHAPE_PADDING = 100.
// TODO: Refactor with a light abstract layer on top of AST implementing scenarios,
// variables, imports, substitutions and then a final set of structures representing
@@ -668,6 +670,162 @@ func (obj *Object) AppendReferences(ida []string, ref Reference, unresolvedObj *
}
}
+func (obj *Object) GetLabelSize(mtexts []*d2target.MText, ruler *textmeasure.Ruler, fontFamily *d2fonts.FontFamily) (*d2target.TextDimensions, error) {
+ shapeType := strings.ToLower(obj.Attributes.Shape.Value)
+
+ var dims *d2target.TextDimensions
+ switch shapeType {
+ case d2target.ShapeText:
+ if obj.Attributes.Language == "latex" {
+ width, height, err := d2latex.Measure(obj.Text().Text)
+ if err != nil {
+ return nil, err
+ }
+ dims = d2target.NewTextDimensions(width, height)
+ } else if obj.Attributes.Language != "" {
+ var err error
+ dims, err = getMarkdownDimensions(mtexts, ruler, obj.Text(), fontFamily)
+ if err != nil {
+ return nil, err
+ }
+ } else {
+ dims = GetTextDimensions(mtexts, ruler, obj.Text(), fontFamily)
+ }
+
+ case d2target.ShapeClass:
+ dims = GetTextDimensions(mtexts, ruler, obj.Text(), go2.Pointer(d2fonts.SourceCodePro))
+
+ default:
+ dims = GetTextDimensions(mtexts, ruler, obj.Text(), fontFamily)
+ }
+
+ if shapeType == d2target.ShapeSQLTable && obj.Attributes.Label.Value == "" {
+ // measure with placeholder text to determine height
+ placeholder := *obj.Text()
+ placeholder.Text = "Table"
+ dims = GetTextDimensions(mtexts, ruler, &placeholder, fontFamily)
+ }
+
+ if dims == nil {
+ if shapeType == d2target.ShapeImage {
+ dims = d2target.NewTextDimensions(0, 0)
+ } else {
+ return nil, fmt.Errorf("dimensions for object label %#v not found", obj.Text())
+ }
+ }
+
+ return dims, nil
+}
+
+func (obj *Object) GetDefaultSize(mtexts []*d2target.MText, ruler *textmeasure.Ruler, fontFamily *d2fonts.FontFamily, labelDims d2target.TextDimensions) (*d2target.TextDimensions, error) {
+ dims := d2target.TextDimensions{}
+
+ switch strings.ToLower(obj.Attributes.Shape.Value) {
+ default:
+ return d2target.NewTextDimensions(labelDims.Width, labelDims.Height), nil
+
+ case d2target.ShapeImage:
+ return d2target.NewTextDimensions(128, 128), nil
+
+ case d2target.ShapeClass:
+ maxWidth := labelDims.Width
+
+ for _, f := range obj.Class.Fields {
+ fdims := GetTextDimensions(mtexts, ruler, f.Text(), go2.Pointer(d2fonts.SourceCodePro))
+ if fdims == nil {
+ return nil, fmt.Errorf("dimensions for class field %#v not found", f.Text())
+ }
+ lineWidth := fdims.Width
+ if maxWidth < lineWidth {
+ maxWidth = lineWidth
+ }
+ }
+ for _, m := range obj.Class.Methods {
+ mdims := GetTextDimensions(mtexts, ruler, m.Text(), go2.Pointer(d2fonts.SourceCodePro))
+ if mdims == nil {
+ return nil, fmt.Errorf("dimensions for class method %#v not found", m.Text())
+ }
+ lineWidth := mdims.Width
+ if maxWidth < lineWidth {
+ maxWidth = lineWidth
+ }
+ }
+ dims.Width = maxWidth
+
+ // All rows should be the same height
+ var anyRowText *d2target.MText
+ if len(obj.Class.Fields) > 0 {
+ anyRowText = obj.Class.Fields[0].Text()
+ } else if len(obj.Class.Methods) > 0 {
+ anyRowText = obj.Class.Methods[0].Text()
+ }
+ if anyRowText != nil {
+ // 10px of padding top and bottom so text doesn't look squished
+ rowHeight := GetTextDimensions(mtexts, ruler, anyRowText, go2.Pointer(d2fonts.SourceCodePro)).Height + 20
+ dims.Height = rowHeight * (len(obj.Class.Fields) + len(obj.Class.Methods) + 2)
+ } else {
+ dims.Height = labelDims.Height
+ }
+
+ case d2target.ShapeSQLTable:
+ maxNameWidth := 0
+ maxTypeWidth := 0
+ constraintWidth := 0
+
+ for i := range obj.SQLTable.Columns {
+ // Note: we want to set dimensions of actual column not the for loop copy of the struct
+ c := &obj.SQLTable.Columns[i]
+ ctexts := c.Texts()
+
+ nameDims := GetTextDimensions(mtexts, ruler, ctexts[0], fontFamily)
+ if nameDims == nil {
+ return nil, fmt.Errorf("dimensions for sql_table name %#v not found", ctexts[0].Text)
+ }
+ c.Name.LabelWidth = nameDims.Width
+ c.Name.LabelHeight = nameDims.Height
+ if maxNameWidth < nameDims.Width {
+ maxNameWidth = nameDims.Width
+ }
+
+ typeDims := GetTextDimensions(mtexts, ruler, ctexts[1], fontFamily)
+ if typeDims == nil {
+ return nil, fmt.Errorf("dimensions for sql_table type %#v not found", ctexts[1].Text)
+ }
+ c.Type.LabelWidth = typeDims.Width
+ c.Type.LabelHeight = typeDims.Height
+ if maxTypeWidth < typeDims.Width {
+ maxTypeWidth = typeDims.Width
+ }
+
+ if c.Constraint != "" {
+ // covers UNQ constraint with padding
+ constraintWidth = 60
+ }
+ }
+
+ // The rows get padded a little due to header font being larger than row font
+ dims.Height = labelDims.Height * (len(obj.SQLTable.Columns) + 1)
+ dims.Width = d2target.NamePadding + maxNameWidth + d2target.TypePadding + maxTypeWidth + d2target.TypePadding + constraintWidth
+ }
+
+ return &dims, nil
+}
+
+func (obj *Object) GetPadding() (x, y float64) {
+ switch strings.ToLower(obj.Attributes.Shape.Value) {
+ case d2target.ShapeImage,
+ d2target.ShapeSQLTable,
+ d2target.ShapeText,
+ d2target.ShapeCode:
+ return 0., 0.
+ case d2target.ShapeClass:
+ // TODO fix class row width measurements (see SQL table)
+ return 100., 0.
+ default:
+ return DEFAULT_SHAPE_PADDING, DEFAULT_SHAPE_PADDING
+ }
+}
+
type Edge struct {
Index int `json:"index"`
@@ -898,166 +1056,66 @@ func appendTextDedup(texts []*d2target.MText, t *d2target.MText) []*d2target.MTe
func (g *Graph) SetDimensions(mtexts []*d2target.MText, ruler *textmeasure.Ruler, fontFamily *d2fonts.FontFamily) error {
for _, obj := range g.Objects {
obj.Box = &geo.Box{}
- // TODO fix edge cases for unnamed class etc
- // Image shapes can set their own widths/heights
- if obj.Attributes.Label.Value == "" && obj.Attributes.Shape.Value != d2target.ShapeImage {
- obj.Width = 100
- obj.Height = 100
- continue
+
+ var desiredWidth int
+ var desiredHeight int
+ if obj.Attributes.Width != nil {
+ desiredWidth, _ = strconv.Atoi(obj.Attributes.Width.Value)
+ }
+ if obj.Attributes.Height != nil {
+ desiredHeight, _ = strconv.Atoi(obj.Attributes.Height.Value)
+ }
+ shapeType := strings.ToLower(obj.Attributes.Shape.Value)
+
+ labelDims, err := obj.GetLabelSize(mtexts, ruler, fontFamily)
+ if err != nil {
+ return err
}
- var dims *d2target.TextDimensions
- var innerLabelPadding = INNER_LABEL_PADDING
- if obj.Attributes.Shape.Value == d2target.ShapeText {
- if obj.Attributes.Language == "latex" {
- width, height, err := d2latex.Measure(obj.Text().Text)
- if err != nil {
- return err
- }
- dims = d2target.NewTextDimensions(width, height)
- } else if obj.Attributes.Language != "" {
- var err error
- dims, err = getMarkdownDimensions(mtexts, ruler, obj.Text(), fontFamily)
- if err != nil {
- return err
- }
- } else {
- dims = GetTextDimensions(mtexts, ruler, obj.Text(), fontFamily)
- }
- innerLabelPadding = 0
- } else if obj.Attributes.Shape.Value == d2target.ShapeClass {
- dims = GetTextDimensions(mtexts, ruler, obj.Text(), go2.Pointer(d2fonts.SourceCodePro))
- } else {
- dims = GetTextDimensions(mtexts, ruler, obj.Text(), fontFamily)
- }
- if dims == nil {
- if obj.Attributes.Shape.Value == d2target.ShapeImage {
- dims = d2target.NewTextDimensions(0, 0)
- } else {
- return fmt.Errorf("dimensions for object label %#v not found", obj.Text())
- }
- }
-
- switch obj.Attributes.Shape.Value {
+ switch shapeType {
case d2target.ShapeText, d2target.ShapeClass, d2target.ShapeSQLTable, d2target.ShapeCode:
// no labels
default:
if obj.Attributes.Label.Value != "" {
- obj.LabelWidth = go2.Pointer(dims.Width)
- obj.LabelHeight = go2.Pointer(dims.Height)
+ obj.LabelWidth = go2.Pointer(labelDims.Width)
+ obj.LabelHeight = go2.Pointer(labelDims.Height)
}
}
- dims.Width += innerLabelPadding
- dims.Height += innerLabelPadding
- obj.LabelDimensions = *dims
- obj.Width = float64(dims.Width)
- obj.Height = float64(dims.Height)
+ if shapeType != d2target.ShapeText && obj.Attributes.Label.Value != "" {
+ labelDims.Width += INNER_LABEL_PADDING
+ labelDims.Height += INNER_LABEL_PADDING
+ }
+ obj.LabelDimensions = *labelDims
- switch strings.ToLower(obj.Attributes.Shape.Value) {
- default:
- obj.Width += 100
- obj.Height += 100
+ defaultDims, err := obj.GetDefaultSize(mtexts, ruler, fontFamily, *labelDims)
+ if err != nil {
+ return err
+ }
- case d2target.ShapeImage:
- if obj.Attributes.Width != nil {
- w, _ := strconv.Atoi(obj.Attributes.Width.Value)
- obj.Width = float64(w)
- } else {
- obj.Width = 128
- }
- if obj.Attributes.Height != nil {
- h, _ := strconv.Atoi(obj.Attributes.Height.Value)
- obj.Height = float64(h)
- } else {
- obj.Height = 128
- }
+ obj.Width = float64(go2.Max(defaultDims.Width, desiredWidth))
+ obj.Height = float64(go2.Max(defaultDims.Height, desiredHeight))
+ paddingX, paddingY := obj.GetPadding()
+
+ switch shapeType {
case d2target.ShapeSquare, d2target.ShapeCircle:
- sideLength := go2.Max(obj.Width, obj.Height)
- obj.Width = sideLength + 100
- obj.Height = sideLength + 100
-
- case d2target.ShapeClass:
- maxWidth := dims.Width
-
- for _, f := range obj.Class.Fields {
- fdims := GetTextDimensions(mtexts, ruler, f.Text(), go2.Pointer(d2fonts.SourceCodePro))
- if fdims == nil {
- return fmt.Errorf("dimensions for class field %#v not found", f.Text())
- }
- lineWidth := fdims.Width
- if maxWidth < lineWidth {
- maxWidth = lineWidth
- }
- }
- for _, m := range obj.Class.Methods {
- mdims := GetTextDimensions(mtexts, ruler, m.Text(), go2.Pointer(d2fonts.SourceCodePro))
- if mdims == nil {
- return fmt.Errorf("dimensions for class method %#v not found", m.Text())
- }
- lineWidth := mdims.Width
- if maxWidth < lineWidth {
- maxWidth = lineWidth
- }
+ if desiredWidth != 0 || desiredHeight != 0 {
+ paddingX = 0.
+ paddingY = 0.
}
- // All rows should be the same height
- var anyRowText *d2target.MText
- if len(obj.Class.Fields) > 0 {
- anyRowText = obj.Class.Fields[0].Text()
- } else if len(obj.Class.Methods) > 0 {
- anyRowText = obj.Class.Methods[0].Text()
+ sideLength := math.Max(obj.Width+paddingX, obj.Height+paddingY)
+ obj.Width = sideLength
+ obj.Height = sideLength
+
+ default:
+ if desiredWidth == 0 {
+ obj.Width += float64(paddingX)
}
- if anyRowText != nil {
- // 10px of padding top and bottom so text doesn't look squished
- rowHeight := GetTextDimensions(mtexts, ruler, anyRowText, go2.Pointer(d2fonts.SourceCodePro)).Height + 20
- obj.Height = float64(rowHeight * (len(obj.Class.Fields) + len(obj.Class.Methods) + 2))
+ if desiredHeight == 0 {
+ obj.Height += float64(paddingY)
}
- // Leave room for padding
- obj.Width = float64(maxWidth + 100)
-
- case d2target.ShapeSQLTable:
- maxNameWidth := 0
- maxTypeWidth := 0
- constraintWidth := 0
-
- for i := range obj.SQLTable.Columns {
- // Note: we want to set dimensions of actual column not the for loop copy of the struct
- c := &obj.SQLTable.Columns[i]
- ctexts := c.Texts()
-
- nameDims := GetTextDimensions(mtexts, ruler, ctexts[0], fontFamily)
- if nameDims == nil {
- return fmt.Errorf("dimensions for sql_table name %#v not found", ctexts[0].Text)
- }
- c.Name.LabelWidth = nameDims.Width
- c.Name.LabelHeight = nameDims.Height
- if maxNameWidth < nameDims.Width {
- maxNameWidth = nameDims.Width
- }
-
- typeDims := GetTextDimensions(mtexts, ruler, ctexts[1], fontFamily)
- if typeDims == nil {
- return fmt.Errorf("dimensions for sql_table type %#v not found", ctexts[1].Text)
- }
- c.Type.LabelWidth = typeDims.Width
- c.Type.LabelHeight = typeDims.Height
- if maxTypeWidth < typeDims.Width {
- maxTypeWidth = typeDims.Width
- }
-
- if c.Constraint != "" {
- // covers UNQ constraint with padding
- constraintWidth = 60
- }
- }
-
- // The rows get padded a little due to header font being larger than row font
- obj.Height = float64(dims.Height * (len(obj.SQLTable.Columns) + 1))
- obj.Width = float64(d2target.NamePadding + maxNameWidth + d2target.TypePadding + maxTypeWidth + d2target.TypePadding + constraintWidth)
-
- case d2target.ShapeText, d2target.ShapeCode:
}
}
for _, edge := range g.Edges {
diff --git a/e2etests/regression_test.go b/e2etests/regression_test.go
index d3fe777b6..f823b03c2 100644
--- a/e2etests/regression_test.go
+++ b/e2etests/regression_test.go
@@ -215,6 +215,39 @@ m6_desc: |md
inserted here
|
m6_desc -> queue.M6
+`,
+ },
+ {
+ name: "unnamed_class_table_code",
+ script: `
+
+class -> users -> code
+
+class: "" {
+ shape: class
+ -num: int
+ -timeout: int
+ -pid
+
+ +getStatus(): Enum
+ +getJobs(): "Job[]"
+ +setTimeout(seconds int)
+}
+
+users: "" {
+ shape: sql_table
+ id: int
+ name: string
+ email: string
+ password: string
+ last_login: datetime
+}
+
+code: |go
+ a := 5
+ b := a + 7
+ fmt.Printf("%d", b)
+|
`,
},
}
diff --git a/e2etests/stable_test.go b/e2etests/stable_test.go
index e43d84921..6590d295e 100644
--- a/e2etests/stable_test.go
+++ b/e2etests/stable_test.go
@@ -1638,6 +1638,90 @@ x -> y
script: `x: { link: https://d2lang.com }
y: { link: https://terrastruct.com; tooltip: Gee, I feel kind of LIGHT in the head now,\nknowing I can't make my satellite dish PAYMENTS! }
x -> y
+`,
+ },
+ {
+ name: "unnamed_only_width",
+ script: `
+
+class -> users -> code -> package -> no width
+
+class: "" {
+ shape: class
+ -num: int
+ -timeout: int
+ -pid
+
+ +getStatus(): Enum
+ +getJobs(): "Job[]"
+ +setTimeout(seconds int)
+}
+
+users: "" {
+ shape: sql_table
+ id: int
+ name: string
+ email: string
+ password: string
+ last_login: datetime
+}
+
+code: |go
+ a := 5
+ b := a + 7
+ fmt.Printf("%d", b)
+|
+
+package: "" { shape: package }
+no width: ""
+
+
+class.width: 512
+users.width: 512
+code.width: 512
+package.width: 512
+`,
+ },
+ {
+ name: "unnamed_only_height",
+ script: `
+
+class -> users -> code -> package -> no height
+
+class: "" {
+ shape: class
+ -num: int
+ -timeout: int
+ -pid
+
+ +getStatus(): Enum
+ +getJobs(): "Job[]"
+ +setTimeout(seconds int)
+}
+
+users: "" {
+ shape: sql_table
+ id: int
+ name: string
+ email: string
+ password: string
+ last_login: datetime
+}
+
+code: |go
+ a := 5
+ b := a + 7
+ fmt.Printf("%d", b)
+|
+
+package: "" { shape: package }
+no height: ""
+
+
+class.height: 512
+users.height: 512
+code.height: 512
+package.height: 512
`,
},
}
diff --git a/e2etests/testdata/regression/unnamed_class_table_code/dagre/board.exp.json b/e2etests/testdata/regression/unnamed_class_table_code/dagre/board.exp.json
new file mode 100644
index 000000000..2d10adc2e
--- /dev/null
+++ b/e2etests/testdata/regression/unnamed_class_table_code/dagre/board.exp.json
@@ -0,0 +1,400 @@
+{
+ "name": "",
+ "fontFamily": "SourceSansPro",
+ "shapes": [
+ {
+ "id": "class",
+ "type": "class",
+ "pos": {
+ "x": 0,
+ "y": 0
+ },
+ "width": 422,
+ "height": 368,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "#0A0F25",
+ "stroke": "#FFFFFF",
+ "shadow": false,
+ "3d": false,
+ "multiple": false,
+ "tooltip": "",
+ "link": "",
+ "icon": null,
+ "iconPosition": "",
+ "blend": false,
+ "fields": [
+ {
+ "name": "num",
+ "type": "int",
+ "visibility": "private"
+ },
+ {
+ "name": "timeout",
+ "type": "int",
+ "visibility": "private"
+ },
+ {
+ "name": "pid",
+ "type": "",
+ "visibility": "private"
+ }
+ ],
+ "methods": [
+ {
+ "name": "getStatus()",
+ "return": "Enum",
+ "visibility": "public"
+ },
+ {
+ "name": "getJobs()",
+ "return": "Job[]",
+ "visibility": "public"
+ },
+ {
+ "name": "setTimeout(seconds int)",
+ "return": "void",
+ "visibility": "public"
+ }
+ ],
+ "columns": null,
+ "label": "",
+ "fontSize": 20,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#0A0F25",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 0,
+ "labelHeight": 0,
+ "zIndex": 0,
+ "level": 1,
+ "primaryAccentColor": "#0D32B2",
+ "secondaryAccentColor": "#4A6FF3",
+ "neutralAccentColor": "#676C7E"
+ },
+ {
+ "id": "users",
+ "type": "sql_table",
+ "pos": {
+ "x": 107,
+ "y": 468
+ },
+ "width": 208,
+ "height": 186,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "#0A0F25",
+ "stroke": "#FFFFFF",
+ "shadow": false,
+ "3d": false,
+ "multiple": false,
+ "tooltip": "",
+ "link": "",
+ "icon": null,
+ "iconPosition": "",
+ "blend": false,
+ "fields": null,
+ "methods": null,
+ "columns": [
+ {
+ "name": {
+ "label": "id",
+ "fontSize": 0,
+ "fontFamily": "",
+ "language": "",
+ "color": "",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 15,
+ "labelHeight": 26
+ },
+ "type": {
+ "label": "int",
+ "fontSize": 0,
+ "fontFamily": "",
+ "language": "",
+ "color": "",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 23,
+ "labelHeight": 26
+ },
+ "constraint": "",
+ "reference": ""
+ },
+ {
+ "name": {
+ "label": "name",
+ "fontSize": 0,
+ "fontFamily": "",
+ "language": "",
+ "color": "",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 47,
+ "labelHeight": 26
+ },
+ "type": {
+ "label": "string",
+ "fontSize": 0,
+ "fontFamily": "",
+ "language": "",
+ "color": "",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 48,
+ "labelHeight": 26
+ },
+ "constraint": "",
+ "reference": ""
+ },
+ {
+ "name": {
+ "label": "email",
+ "fontSize": 0,
+ "fontFamily": "",
+ "language": "",
+ "color": "",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 47,
+ "labelHeight": 26
+ },
+ "type": {
+ "label": "string",
+ "fontSize": 0,
+ "fontFamily": "",
+ "language": "",
+ "color": "",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 48,
+ "labelHeight": 26
+ },
+ "constraint": "",
+ "reference": ""
+ },
+ {
+ "name": {
+ "label": "password",
+ "fontSize": 0,
+ "fontFamily": "",
+ "language": "",
+ "color": "",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 80,
+ "labelHeight": 26
+ },
+ "type": {
+ "label": "string",
+ "fontSize": 0,
+ "fontFamily": "",
+ "language": "",
+ "color": "",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 48,
+ "labelHeight": 26
+ },
+ "constraint": "",
+ "reference": ""
+ },
+ {
+ "name": {
+ "label": "last_login",
+ "fontSize": 0,
+ "fontFamily": "",
+ "language": "",
+ "color": "",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 81,
+ "labelHeight": 26
+ },
+ "type": {
+ "label": "datetime",
+ "fontSize": 0,
+ "fontFamily": "",
+ "language": "",
+ "color": "",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 77,
+ "labelHeight": 26
+ },
+ "constraint": "",
+ "reference": ""
+ }
+ ],
+ "label": "",
+ "fontSize": 20,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#0A0F25",
+ "italic": false,
+ "bold": true,
+ "underline": false,
+ "labelWidth": 59,
+ "labelHeight": 31,
+ "zIndex": 0,
+ "level": 1,
+ "primaryAccentColor": "#0D32B2",
+ "secondaryAccentColor": "#4A6FF3",
+ "neutralAccentColor": "#676C7E"
+ },
+ {
+ "id": "code",
+ "type": "code",
+ "pos": {
+ "x": 113,
+ "y": 754
+ },
+ "width": 196,
+ "height": 70,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "#FFFFFF",
+ "stroke": "#0A0F25",
+ "shadow": false,
+ "3d": false,
+ "multiple": false,
+ "tooltip": "",
+ "link": "",
+ "icon": null,
+ "iconPosition": "",
+ "blend": false,
+ "fields": null,
+ "methods": null,
+ "columns": null,
+ "label": "a := 5\nb := a + 7\nfmt.Printf(\"%d\", b)",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "golang",
+ "color": "#0A0F25",
+ "italic": false,
+ "bold": true,
+ "underline": false,
+ "labelWidth": 196,
+ "labelHeight": 70,
+ "zIndex": 0,
+ "level": 1
+ }
+ ],
+ "connections": [
+ {
+ "id": "(class -> users)[0]",
+ "src": "class",
+ "srcArrow": "none",
+ "srcLabel": "",
+ "dst": "users",
+ "dstArrow": "triangle",
+ "dstLabel": "",
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "stroke": "#0D32B2",
+ "label": "",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#676C7E",
+ "italic": true,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 0,
+ "labelHeight": 0,
+ "labelPosition": "",
+ "labelPercentage": 0,
+ "route": [
+ {
+ "x": 211,
+ "y": 368
+ },
+ {
+ "x": 211,
+ "y": 408
+ },
+ {
+ "x": 211,
+ "y": 428
+ },
+ {
+ "x": 211,
+ "y": 468
+ }
+ ],
+ "isCurve": true,
+ "animated": false,
+ "tooltip": "",
+ "icon": null,
+ "zIndex": 0
+ },
+ {
+ "id": "(users -> code)[0]",
+ "src": "users",
+ "srcArrow": "none",
+ "srcLabel": "",
+ "dst": "code",
+ "dstArrow": "triangle",
+ "dstLabel": "",
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "stroke": "#0D32B2",
+ "label": "",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#676C7E",
+ "italic": true,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 0,
+ "labelHeight": 0,
+ "labelPosition": "",
+ "labelPercentage": 0,
+ "route": [
+ {
+ "x": 211,
+ "y": 654
+ },
+ {
+ "x": 211,
+ "y": 694
+ },
+ {
+ "x": 211,
+ "y": 714
+ },
+ {
+ "x": 211,
+ "y": 754
+ }
+ ],
+ "isCurve": true,
+ "animated": false,
+ "tooltip": "",
+ "icon": null,
+ "zIndex": 0
+ }
+ ]
+}
diff --git a/e2etests/testdata/regression/unnamed_class_table_code/dagre/sketch.exp.svg b/e2etests/testdata/regression/unnamed_class_table_code/dagre/sketch.exp.svg
new file mode 100644
index 000000000..2dc724baf
--- /dev/null
+++ b/e2etests/testdata/regression/unnamed_class_table_code/dagre/sketch.exp.svg
@@ -0,0 +1,62 @@
+
+
\ No newline at end of file
diff --git a/e2etests/testdata/regression/unnamed_class_table_code/elk/board.exp.json b/e2etests/testdata/regression/unnamed_class_table_code/elk/board.exp.json
new file mode 100644
index 000000000..0a375e8ae
--- /dev/null
+++ b/e2etests/testdata/regression/unnamed_class_table_code/elk/board.exp.json
@@ -0,0 +1,382 @@
+{
+ "name": "",
+ "fontFamily": "SourceSansPro",
+ "shapes": [
+ {
+ "id": "class",
+ "type": "class",
+ "pos": {
+ "x": 12,
+ "y": 12
+ },
+ "width": 422,
+ "height": 368,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "#0A0F25",
+ "stroke": "#FFFFFF",
+ "shadow": false,
+ "3d": false,
+ "multiple": false,
+ "tooltip": "",
+ "link": "",
+ "icon": null,
+ "iconPosition": "",
+ "blend": false,
+ "fields": [
+ {
+ "name": "num",
+ "type": "int",
+ "visibility": "private"
+ },
+ {
+ "name": "timeout",
+ "type": "int",
+ "visibility": "private"
+ },
+ {
+ "name": "pid",
+ "type": "",
+ "visibility": "private"
+ }
+ ],
+ "methods": [
+ {
+ "name": "getStatus()",
+ "return": "Enum",
+ "visibility": "public"
+ },
+ {
+ "name": "getJobs()",
+ "return": "Job[]",
+ "visibility": "public"
+ },
+ {
+ "name": "setTimeout(seconds int)",
+ "return": "void",
+ "visibility": "public"
+ }
+ ],
+ "columns": null,
+ "label": "",
+ "fontSize": 20,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#0A0F25",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 0,
+ "labelHeight": 0,
+ "zIndex": 0,
+ "level": 1,
+ "primaryAccentColor": "#0D32B2",
+ "secondaryAccentColor": "#4A6FF3",
+ "neutralAccentColor": "#676C7E"
+ },
+ {
+ "id": "users",
+ "type": "sql_table",
+ "pos": {
+ "x": 119,
+ "y": 480
+ },
+ "width": 208,
+ "height": 186,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "#0A0F25",
+ "stroke": "#FFFFFF",
+ "shadow": false,
+ "3d": false,
+ "multiple": false,
+ "tooltip": "",
+ "link": "",
+ "icon": null,
+ "iconPosition": "",
+ "blend": false,
+ "fields": null,
+ "methods": null,
+ "columns": [
+ {
+ "name": {
+ "label": "id",
+ "fontSize": 0,
+ "fontFamily": "",
+ "language": "",
+ "color": "",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 15,
+ "labelHeight": 26
+ },
+ "type": {
+ "label": "int",
+ "fontSize": 0,
+ "fontFamily": "",
+ "language": "",
+ "color": "",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 23,
+ "labelHeight": 26
+ },
+ "constraint": "",
+ "reference": ""
+ },
+ {
+ "name": {
+ "label": "name",
+ "fontSize": 0,
+ "fontFamily": "",
+ "language": "",
+ "color": "",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 47,
+ "labelHeight": 26
+ },
+ "type": {
+ "label": "string",
+ "fontSize": 0,
+ "fontFamily": "",
+ "language": "",
+ "color": "",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 48,
+ "labelHeight": 26
+ },
+ "constraint": "",
+ "reference": ""
+ },
+ {
+ "name": {
+ "label": "email",
+ "fontSize": 0,
+ "fontFamily": "",
+ "language": "",
+ "color": "",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 47,
+ "labelHeight": 26
+ },
+ "type": {
+ "label": "string",
+ "fontSize": 0,
+ "fontFamily": "",
+ "language": "",
+ "color": "",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 48,
+ "labelHeight": 26
+ },
+ "constraint": "",
+ "reference": ""
+ },
+ {
+ "name": {
+ "label": "password",
+ "fontSize": 0,
+ "fontFamily": "",
+ "language": "",
+ "color": "",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 80,
+ "labelHeight": 26
+ },
+ "type": {
+ "label": "string",
+ "fontSize": 0,
+ "fontFamily": "",
+ "language": "",
+ "color": "",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 48,
+ "labelHeight": 26
+ },
+ "constraint": "",
+ "reference": ""
+ },
+ {
+ "name": {
+ "label": "last_login",
+ "fontSize": 0,
+ "fontFamily": "",
+ "language": "",
+ "color": "",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 81,
+ "labelHeight": 26
+ },
+ "type": {
+ "label": "datetime",
+ "fontSize": 0,
+ "fontFamily": "",
+ "language": "",
+ "color": "",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 77,
+ "labelHeight": 26
+ },
+ "constraint": "",
+ "reference": ""
+ }
+ ],
+ "label": "",
+ "fontSize": 20,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#0A0F25",
+ "italic": false,
+ "bold": true,
+ "underline": false,
+ "labelWidth": 59,
+ "labelHeight": 31,
+ "zIndex": 0,
+ "level": 1,
+ "primaryAccentColor": "#0D32B2",
+ "secondaryAccentColor": "#4A6FF3",
+ "neutralAccentColor": "#676C7E"
+ },
+ {
+ "id": "code",
+ "type": "code",
+ "pos": {
+ "x": 125,
+ "y": 766
+ },
+ "width": 196,
+ "height": 70,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "#FFFFFF",
+ "stroke": "#0A0F25",
+ "shadow": false,
+ "3d": false,
+ "multiple": false,
+ "tooltip": "",
+ "link": "",
+ "icon": null,
+ "iconPosition": "",
+ "blend": false,
+ "fields": null,
+ "methods": null,
+ "columns": null,
+ "label": "a := 5\nb := a + 7\nfmt.Printf(\"%d\", b)",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "golang",
+ "color": "#0A0F25",
+ "italic": false,
+ "bold": true,
+ "underline": false,
+ "labelWidth": 196,
+ "labelHeight": 70,
+ "zIndex": 0,
+ "level": 1
+ }
+ ],
+ "connections": [
+ {
+ "id": "(class -> users)[0]",
+ "src": "class",
+ "srcArrow": "none",
+ "srcLabel": "",
+ "dst": "users",
+ "dstArrow": "triangle",
+ "dstLabel": "",
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "stroke": "#0D32B2",
+ "label": "",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#676C7E",
+ "italic": true,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 0,
+ "labelHeight": 0,
+ "labelPosition": "",
+ "labelPercentage": 0,
+ "route": [
+ {
+ "x": 223,
+ "y": 380
+ },
+ {
+ "x": 223,
+ "y": 480
+ }
+ ],
+ "animated": false,
+ "tooltip": "",
+ "icon": null,
+ "zIndex": 0
+ },
+ {
+ "id": "(users -> code)[0]",
+ "src": "users",
+ "srcArrow": "none",
+ "srcLabel": "",
+ "dst": "code",
+ "dstArrow": "triangle",
+ "dstLabel": "",
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "stroke": "#0D32B2",
+ "label": "",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#676C7E",
+ "italic": true,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 0,
+ "labelHeight": 0,
+ "labelPosition": "",
+ "labelPercentage": 0,
+ "route": [
+ {
+ "x": 223,
+ "y": 666
+ },
+ {
+ "x": 223,
+ "y": 766
+ }
+ ],
+ "animated": false,
+ "tooltip": "",
+ "icon": null,
+ "zIndex": 0
+ }
+ ]
+}
diff --git a/e2etests/testdata/regression/unnamed_class_table_code/elk/sketch.exp.svg b/e2etests/testdata/regression/unnamed_class_table_code/elk/sketch.exp.svg
new file mode 100644
index 000000000..5e8d36e19
--- /dev/null
+++ b/e2etests/testdata/regression/unnamed_class_table_code/elk/sketch.exp.svg
@@ -0,0 +1,62 @@
+
+
\ No newline at end of file
diff --git a/e2etests/testdata/stable/unnamed_only_height/dagre/board.exp.json b/e2etests/testdata/stable/unnamed_only_height/dagre/board.exp.json
new file mode 100644
index 000000000..2a222b8b0
--- /dev/null
+++ b/e2etests/testdata/stable/unnamed_only_height/dagre/board.exp.json
@@ -0,0 +1,574 @@
+{
+ "name": "",
+ "fontFamily": "SourceSansPro",
+ "shapes": [
+ {
+ "id": "class",
+ "type": "class",
+ "pos": {
+ "x": 0,
+ "y": 0
+ },
+ "width": 422,
+ "height": 512,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "#0A0F25",
+ "stroke": "#FFFFFF",
+ "shadow": false,
+ "3d": false,
+ "multiple": false,
+ "tooltip": "",
+ "link": "",
+ "icon": null,
+ "iconPosition": "",
+ "blend": false,
+ "fields": [
+ {
+ "name": "num",
+ "type": "int",
+ "visibility": "private"
+ },
+ {
+ "name": "timeout",
+ "type": "int",
+ "visibility": "private"
+ },
+ {
+ "name": "pid",
+ "type": "",
+ "visibility": "private"
+ }
+ ],
+ "methods": [
+ {
+ "name": "getStatus()",
+ "return": "Enum",
+ "visibility": "public"
+ },
+ {
+ "name": "getJobs()",
+ "return": "Job[]",
+ "visibility": "public"
+ },
+ {
+ "name": "setTimeout(seconds int)",
+ "return": "void",
+ "visibility": "public"
+ }
+ ],
+ "columns": null,
+ "label": "",
+ "fontSize": 20,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#0A0F25",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 0,
+ "labelHeight": 0,
+ "zIndex": 0,
+ "level": 1,
+ "primaryAccentColor": "#0D32B2",
+ "secondaryAccentColor": "#4A6FF3",
+ "neutralAccentColor": "#676C7E"
+ },
+ {
+ "id": "users",
+ "type": "sql_table",
+ "pos": {
+ "x": 107,
+ "y": 612
+ },
+ "width": 208,
+ "height": 512,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "#0A0F25",
+ "stroke": "#FFFFFF",
+ "shadow": false,
+ "3d": false,
+ "multiple": false,
+ "tooltip": "",
+ "link": "",
+ "icon": null,
+ "iconPosition": "",
+ "blend": false,
+ "fields": null,
+ "methods": null,
+ "columns": [
+ {
+ "name": {
+ "label": "id",
+ "fontSize": 0,
+ "fontFamily": "",
+ "language": "",
+ "color": "",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 15,
+ "labelHeight": 26
+ },
+ "type": {
+ "label": "int",
+ "fontSize": 0,
+ "fontFamily": "",
+ "language": "",
+ "color": "",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 23,
+ "labelHeight": 26
+ },
+ "constraint": "",
+ "reference": ""
+ },
+ {
+ "name": {
+ "label": "name",
+ "fontSize": 0,
+ "fontFamily": "",
+ "language": "",
+ "color": "",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 47,
+ "labelHeight": 26
+ },
+ "type": {
+ "label": "string",
+ "fontSize": 0,
+ "fontFamily": "",
+ "language": "",
+ "color": "",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 48,
+ "labelHeight": 26
+ },
+ "constraint": "",
+ "reference": ""
+ },
+ {
+ "name": {
+ "label": "email",
+ "fontSize": 0,
+ "fontFamily": "",
+ "language": "",
+ "color": "",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 47,
+ "labelHeight": 26
+ },
+ "type": {
+ "label": "string",
+ "fontSize": 0,
+ "fontFamily": "",
+ "language": "",
+ "color": "",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 48,
+ "labelHeight": 26
+ },
+ "constraint": "",
+ "reference": ""
+ },
+ {
+ "name": {
+ "label": "password",
+ "fontSize": 0,
+ "fontFamily": "",
+ "language": "",
+ "color": "",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 80,
+ "labelHeight": 26
+ },
+ "type": {
+ "label": "string",
+ "fontSize": 0,
+ "fontFamily": "",
+ "language": "",
+ "color": "",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 48,
+ "labelHeight": 26
+ },
+ "constraint": "",
+ "reference": ""
+ },
+ {
+ "name": {
+ "label": "last_login",
+ "fontSize": 0,
+ "fontFamily": "",
+ "language": "",
+ "color": "",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 81,
+ "labelHeight": 26
+ },
+ "type": {
+ "label": "datetime",
+ "fontSize": 0,
+ "fontFamily": "",
+ "language": "",
+ "color": "",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 77,
+ "labelHeight": 26
+ },
+ "constraint": "",
+ "reference": ""
+ }
+ ],
+ "label": "",
+ "fontSize": 20,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#0A0F25",
+ "italic": false,
+ "bold": true,
+ "underline": false,
+ "labelWidth": 59,
+ "labelHeight": 31,
+ "zIndex": 0,
+ "level": 1,
+ "primaryAccentColor": "#0D32B2",
+ "secondaryAccentColor": "#4A6FF3",
+ "neutralAccentColor": "#676C7E"
+ },
+ {
+ "id": "code",
+ "type": "code",
+ "pos": {
+ "x": 113,
+ "y": 1224
+ },
+ "width": 196,
+ "height": 512,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "#FFFFFF",
+ "stroke": "#0A0F25",
+ "shadow": false,
+ "3d": false,
+ "multiple": false,
+ "tooltip": "",
+ "link": "",
+ "icon": null,
+ "iconPosition": "",
+ "blend": false,
+ "fields": null,
+ "methods": null,
+ "columns": null,
+ "label": "a := 5\nb := a + 7\nfmt.Printf(\"%d\", b)",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "golang",
+ "color": "#0A0F25",
+ "italic": false,
+ "bold": true,
+ "underline": false,
+ "labelWidth": 196,
+ "labelHeight": 70,
+ "zIndex": 0,
+ "level": 1
+ },
+ {
+ "id": "package",
+ "type": "package",
+ "pos": {
+ "x": 161,
+ "y": 1836
+ },
+ "width": 100,
+ "height": 512,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "#EDF0FD",
+ "stroke": "#0D32B2",
+ "shadow": false,
+ "3d": false,
+ "multiple": false,
+ "tooltip": "",
+ "link": "",
+ "icon": null,
+ "iconPosition": "",
+ "blend": false,
+ "fields": null,
+ "methods": null,
+ "columns": null,
+ "label": "",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#0A0F25",
+ "italic": false,
+ "bold": true,
+ "underline": false,
+ "labelWidth": 0,
+ "labelHeight": 0,
+ "zIndex": 0,
+ "level": 1
+ },
+ {
+ "id": "no height",
+ "type": "",
+ "pos": {
+ "x": 161,
+ "y": 2448
+ },
+ "width": 100,
+ "height": 100,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "#F7F8FE",
+ "stroke": "#0D32B2",
+ "shadow": false,
+ "3d": false,
+ "multiple": false,
+ "tooltip": "",
+ "link": "",
+ "icon": null,
+ "iconPosition": "",
+ "blend": false,
+ "fields": null,
+ "methods": null,
+ "columns": null,
+ "label": "",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#0A0F25",
+ "italic": false,
+ "bold": true,
+ "underline": false,
+ "labelWidth": 0,
+ "labelHeight": 0,
+ "zIndex": 0,
+ "level": 1
+ }
+ ],
+ "connections": [
+ {
+ "id": "(class -> users)[0]",
+ "src": "class",
+ "srcArrow": "none",
+ "srcLabel": "",
+ "dst": "users",
+ "dstArrow": "triangle",
+ "dstLabel": "",
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "stroke": "#0D32B2",
+ "label": "",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#676C7E",
+ "italic": true,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 0,
+ "labelHeight": 0,
+ "labelPosition": "",
+ "labelPercentage": 0,
+ "route": [
+ {
+ "x": 211,
+ "y": 512
+ },
+ {
+ "x": 211,
+ "y": 552
+ },
+ {
+ "x": 211,
+ "y": 572
+ },
+ {
+ "x": 211,
+ "y": 612
+ }
+ ],
+ "isCurve": true,
+ "animated": false,
+ "tooltip": "",
+ "icon": null,
+ "zIndex": 0
+ },
+ {
+ "id": "(users -> code)[0]",
+ "src": "users",
+ "srcArrow": "none",
+ "srcLabel": "",
+ "dst": "code",
+ "dstArrow": "triangle",
+ "dstLabel": "",
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "stroke": "#0D32B2",
+ "label": "",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#676C7E",
+ "italic": true,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 0,
+ "labelHeight": 0,
+ "labelPosition": "",
+ "labelPercentage": 0,
+ "route": [
+ {
+ "x": 211,
+ "y": 1124
+ },
+ {
+ "x": 211,
+ "y": 1164
+ },
+ {
+ "x": 211,
+ "y": 1184
+ },
+ {
+ "x": 211,
+ "y": 1224
+ }
+ ],
+ "isCurve": true,
+ "animated": false,
+ "tooltip": "",
+ "icon": null,
+ "zIndex": 0
+ },
+ {
+ "id": "(code -> package)[0]",
+ "src": "code",
+ "srcArrow": "none",
+ "srcLabel": "",
+ "dst": "package",
+ "dstArrow": "triangle",
+ "dstLabel": "",
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "stroke": "#0D32B2",
+ "label": "",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#676C7E",
+ "italic": true,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 0,
+ "labelHeight": 0,
+ "labelPosition": "",
+ "labelPercentage": 0,
+ "route": [
+ {
+ "x": 211,
+ "y": 1736
+ },
+ {
+ "x": 211,
+ "y": 1776
+ },
+ {
+ "x": 211,
+ "y": 1796
+ },
+ {
+ "x": 211,
+ "y": 1836
+ }
+ ],
+ "isCurve": true,
+ "animated": false,
+ "tooltip": "",
+ "icon": null,
+ "zIndex": 0
+ },
+ {
+ "id": "(package -> no height)[0]",
+ "src": "package",
+ "srcArrow": "none",
+ "srcLabel": "",
+ "dst": "no height",
+ "dstArrow": "triangle",
+ "dstLabel": "",
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "stroke": "#0D32B2",
+ "label": "",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#676C7E",
+ "italic": true,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 0,
+ "labelHeight": 0,
+ "labelPosition": "",
+ "labelPercentage": 0,
+ "route": [
+ {
+ "x": 211,
+ "y": 2348
+ },
+ {
+ "x": 211,
+ "y": 2388
+ },
+ {
+ "x": 211,
+ "y": 2408
+ },
+ {
+ "x": 211,
+ "y": 2448
+ }
+ ],
+ "isCurve": true,
+ "animated": false,
+ "tooltip": "",
+ "icon": null,
+ "zIndex": 0
+ }
+ ]
+}
diff --git a/e2etests/testdata/stable/unnamed_only_height/dagre/sketch.exp.svg b/e2etests/testdata/stable/unnamed_only_height/dagre/sketch.exp.svg
new file mode 100644
index 000000000..b94c63869
--- /dev/null
+++ b/e2etests/testdata/stable/unnamed_only_height/dagre/sketch.exp.svg
@@ -0,0 +1,62 @@
+
+
\ No newline at end of file
diff --git a/e2etests/testdata/stable/unnamed_only_height/elk/board.exp.json b/e2etests/testdata/stable/unnamed_only_height/elk/board.exp.json
new file mode 100644
index 000000000..1505d6b80
--- /dev/null
+++ b/e2etests/testdata/stable/unnamed_only_height/elk/board.exp.json
@@ -0,0 +1,538 @@
+{
+ "name": "",
+ "fontFamily": "SourceSansPro",
+ "shapes": [
+ {
+ "id": "class",
+ "type": "class",
+ "pos": {
+ "x": 12,
+ "y": 12
+ },
+ "width": 422,
+ "height": 512,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "#0A0F25",
+ "stroke": "#FFFFFF",
+ "shadow": false,
+ "3d": false,
+ "multiple": false,
+ "tooltip": "",
+ "link": "",
+ "icon": null,
+ "iconPosition": "",
+ "blend": false,
+ "fields": [
+ {
+ "name": "num",
+ "type": "int",
+ "visibility": "private"
+ },
+ {
+ "name": "timeout",
+ "type": "int",
+ "visibility": "private"
+ },
+ {
+ "name": "pid",
+ "type": "",
+ "visibility": "private"
+ }
+ ],
+ "methods": [
+ {
+ "name": "getStatus()",
+ "return": "Enum",
+ "visibility": "public"
+ },
+ {
+ "name": "getJobs()",
+ "return": "Job[]",
+ "visibility": "public"
+ },
+ {
+ "name": "setTimeout(seconds int)",
+ "return": "void",
+ "visibility": "public"
+ }
+ ],
+ "columns": null,
+ "label": "",
+ "fontSize": 20,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#0A0F25",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 0,
+ "labelHeight": 0,
+ "zIndex": 0,
+ "level": 1,
+ "primaryAccentColor": "#0D32B2",
+ "secondaryAccentColor": "#4A6FF3",
+ "neutralAccentColor": "#676C7E"
+ },
+ {
+ "id": "users",
+ "type": "sql_table",
+ "pos": {
+ "x": 119,
+ "y": 624
+ },
+ "width": 208,
+ "height": 512,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "#0A0F25",
+ "stroke": "#FFFFFF",
+ "shadow": false,
+ "3d": false,
+ "multiple": false,
+ "tooltip": "",
+ "link": "",
+ "icon": null,
+ "iconPosition": "",
+ "blend": false,
+ "fields": null,
+ "methods": null,
+ "columns": [
+ {
+ "name": {
+ "label": "id",
+ "fontSize": 0,
+ "fontFamily": "",
+ "language": "",
+ "color": "",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 15,
+ "labelHeight": 26
+ },
+ "type": {
+ "label": "int",
+ "fontSize": 0,
+ "fontFamily": "",
+ "language": "",
+ "color": "",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 23,
+ "labelHeight": 26
+ },
+ "constraint": "",
+ "reference": ""
+ },
+ {
+ "name": {
+ "label": "name",
+ "fontSize": 0,
+ "fontFamily": "",
+ "language": "",
+ "color": "",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 47,
+ "labelHeight": 26
+ },
+ "type": {
+ "label": "string",
+ "fontSize": 0,
+ "fontFamily": "",
+ "language": "",
+ "color": "",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 48,
+ "labelHeight": 26
+ },
+ "constraint": "",
+ "reference": ""
+ },
+ {
+ "name": {
+ "label": "email",
+ "fontSize": 0,
+ "fontFamily": "",
+ "language": "",
+ "color": "",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 47,
+ "labelHeight": 26
+ },
+ "type": {
+ "label": "string",
+ "fontSize": 0,
+ "fontFamily": "",
+ "language": "",
+ "color": "",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 48,
+ "labelHeight": 26
+ },
+ "constraint": "",
+ "reference": ""
+ },
+ {
+ "name": {
+ "label": "password",
+ "fontSize": 0,
+ "fontFamily": "",
+ "language": "",
+ "color": "",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 80,
+ "labelHeight": 26
+ },
+ "type": {
+ "label": "string",
+ "fontSize": 0,
+ "fontFamily": "",
+ "language": "",
+ "color": "",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 48,
+ "labelHeight": 26
+ },
+ "constraint": "",
+ "reference": ""
+ },
+ {
+ "name": {
+ "label": "last_login",
+ "fontSize": 0,
+ "fontFamily": "",
+ "language": "",
+ "color": "",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 81,
+ "labelHeight": 26
+ },
+ "type": {
+ "label": "datetime",
+ "fontSize": 0,
+ "fontFamily": "",
+ "language": "",
+ "color": "",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 77,
+ "labelHeight": 26
+ },
+ "constraint": "",
+ "reference": ""
+ }
+ ],
+ "label": "",
+ "fontSize": 20,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#0A0F25",
+ "italic": false,
+ "bold": true,
+ "underline": false,
+ "labelWidth": 59,
+ "labelHeight": 31,
+ "zIndex": 0,
+ "level": 1,
+ "primaryAccentColor": "#0D32B2",
+ "secondaryAccentColor": "#4A6FF3",
+ "neutralAccentColor": "#676C7E"
+ },
+ {
+ "id": "code",
+ "type": "code",
+ "pos": {
+ "x": 125,
+ "y": 1236
+ },
+ "width": 196,
+ "height": 512,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "#FFFFFF",
+ "stroke": "#0A0F25",
+ "shadow": false,
+ "3d": false,
+ "multiple": false,
+ "tooltip": "",
+ "link": "",
+ "icon": null,
+ "iconPosition": "",
+ "blend": false,
+ "fields": null,
+ "methods": null,
+ "columns": null,
+ "label": "a := 5\nb := a + 7\nfmt.Printf(\"%d\", b)",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "golang",
+ "color": "#0A0F25",
+ "italic": false,
+ "bold": true,
+ "underline": false,
+ "labelWidth": 196,
+ "labelHeight": 70,
+ "zIndex": 0,
+ "level": 1
+ },
+ {
+ "id": "package",
+ "type": "package",
+ "pos": {
+ "x": 173,
+ "y": 1848
+ },
+ "width": 100,
+ "height": 512,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "#EDF0FD",
+ "stroke": "#0D32B2",
+ "shadow": false,
+ "3d": false,
+ "multiple": false,
+ "tooltip": "",
+ "link": "",
+ "icon": null,
+ "iconPosition": "",
+ "blend": false,
+ "fields": null,
+ "methods": null,
+ "columns": null,
+ "label": "",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#0A0F25",
+ "italic": false,
+ "bold": true,
+ "underline": false,
+ "labelWidth": 0,
+ "labelHeight": 0,
+ "zIndex": 0,
+ "level": 1
+ },
+ {
+ "id": "no height",
+ "type": "",
+ "pos": {
+ "x": 173,
+ "y": 2460
+ },
+ "width": 100,
+ "height": 100,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "#F7F8FE",
+ "stroke": "#0D32B2",
+ "shadow": false,
+ "3d": false,
+ "multiple": false,
+ "tooltip": "",
+ "link": "",
+ "icon": null,
+ "iconPosition": "",
+ "blend": false,
+ "fields": null,
+ "methods": null,
+ "columns": null,
+ "label": "",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#0A0F25",
+ "italic": false,
+ "bold": true,
+ "underline": false,
+ "labelWidth": 0,
+ "labelHeight": 0,
+ "zIndex": 0,
+ "level": 1
+ }
+ ],
+ "connections": [
+ {
+ "id": "(class -> users)[0]",
+ "src": "class",
+ "srcArrow": "none",
+ "srcLabel": "",
+ "dst": "users",
+ "dstArrow": "triangle",
+ "dstLabel": "",
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "stroke": "#0D32B2",
+ "label": "",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#676C7E",
+ "italic": true,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 0,
+ "labelHeight": 0,
+ "labelPosition": "",
+ "labelPercentage": 0,
+ "route": [
+ {
+ "x": 223,
+ "y": 524
+ },
+ {
+ "x": 223,
+ "y": 624
+ }
+ ],
+ "animated": false,
+ "tooltip": "",
+ "icon": null,
+ "zIndex": 0
+ },
+ {
+ "id": "(users -> code)[0]",
+ "src": "users",
+ "srcArrow": "none",
+ "srcLabel": "",
+ "dst": "code",
+ "dstArrow": "triangle",
+ "dstLabel": "",
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "stroke": "#0D32B2",
+ "label": "",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#676C7E",
+ "italic": true,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 0,
+ "labelHeight": 0,
+ "labelPosition": "",
+ "labelPercentage": 0,
+ "route": [
+ {
+ "x": 223,
+ "y": 1136
+ },
+ {
+ "x": 223,
+ "y": 1236
+ }
+ ],
+ "animated": false,
+ "tooltip": "",
+ "icon": null,
+ "zIndex": 0
+ },
+ {
+ "id": "(code -> package)[0]",
+ "src": "code",
+ "srcArrow": "none",
+ "srcLabel": "",
+ "dst": "package",
+ "dstArrow": "triangle",
+ "dstLabel": "",
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "stroke": "#0D32B2",
+ "label": "",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#676C7E",
+ "italic": true,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 0,
+ "labelHeight": 0,
+ "labelPosition": "",
+ "labelPercentage": 0,
+ "route": [
+ {
+ "x": 223,
+ "y": 1748
+ },
+ {
+ "x": 223,
+ "y": 1848
+ }
+ ],
+ "animated": false,
+ "tooltip": "",
+ "icon": null,
+ "zIndex": 0
+ },
+ {
+ "id": "(package -> no height)[0]",
+ "src": "package",
+ "srcArrow": "none",
+ "srcLabel": "",
+ "dst": "no height",
+ "dstArrow": "triangle",
+ "dstLabel": "",
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "stroke": "#0D32B2",
+ "label": "",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#676C7E",
+ "italic": true,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 0,
+ "labelHeight": 0,
+ "labelPosition": "",
+ "labelPercentage": 0,
+ "route": [
+ {
+ "x": 223,
+ "y": 2360
+ },
+ {
+ "x": 223,
+ "y": 2460
+ }
+ ],
+ "animated": false,
+ "tooltip": "",
+ "icon": null,
+ "zIndex": 0
+ }
+ ]
+}
diff --git a/e2etests/testdata/stable/unnamed_only_height/elk/sketch.exp.svg b/e2etests/testdata/stable/unnamed_only_height/elk/sketch.exp.svg
new file mode 100644
index 000000000..b9c8d3109
--- /dev/null
+++ b/e2etests/testdata/stable/unnamed_only_height/elk/sketch.exp.svg
@@ -0,0 +1,62 @@
+
+
\ No newline at end of file
diff --git a/e2etests/testdata/stable/unnamed_only_width/dagre/board.exp.json b/e2etests/testdata/stable/unnamed_only_width/dagre/board.exp.json
new file mode 100644
index 000000000..01bac4015
--- /dev/null
+++ b/e2etests/testdata/stable/unnamed_only_width/dagre/board.exp.json
@@ -0,0 +1,574 @@
+{
+ "name": "",
+ "fontFamily": "SourceSansPro",
+ "shapes": [
+ {
+ "id": "class",
+ "type": "class",
+ "pos": {
+ "x": 0,
+ "y": 0
+ },
+ "width": 512,
+ "height": 368,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "#0A0F25",
+ "stroke": "#FFFFFF",
+ "shadow": false,
+ "3d": false,
+ "multiple": false,
+ "tooltip": "",
+ "link": "",
+ "icon": null,
+ "iconPosition": "",
+ "blend": false,
+ "fields": [
+ {
+ "name": "num",
+ "type": "int",
+ "visibility": "private"
+ },
+ {
+ "name": "timeout",
+ "type": "int",
+ "visibility": "private"
+ },
+ {
+ "name": "pid",
+ "type": "",
+ "visibility": "private"
+ }
+ ],
+ "methods": [
+ {
+ "name": "getStatus()",
+ "return": "Enum",
+ "visibility": "public"
+ },
+ {
+ "name": "getJobs()",
+ "return": "Job[]",
+ "visibility": "public"
+ },
+ {
+ "name": "setTimeout(seconds int)",
+ "return": "void",
+ "visibility": "public"
+ }
+ ],
+ "columns": null,
+ "label": "",
+ "fontSize": 20,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#0A0F25",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 0,
+ "labelHeight": 0,
+ "zIndex": 0,
+ "level": 1,
+ "primaryAccentColor": "#0D32B2",
+ "secondaryAccentColor": "#4A6FF3",
+ "neutralAccentColor": "#676C7E"
+ },
+ {
+ "id": "users",
+ "type": "sql_table",
+ "pos": {
+ "x": 0,
+ "y": 468
+ },
+ "width": 512,
+ "height": 186,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "#0A0F25",
+ "stroke": "#FFFFFF",
+ "shadow": false,
+ "3d": false,
+ "multiple": false,
+ "tooltip": "",
+ "link": "",
+ "icon": null,
+ "iconPosition": "",
+ "blend": false,
+ "fields": null,
+ "methods": null,
+ "columns": [
+ {
+ "name": {
+ "label": "id",
+ "fontSize": 0,
+ "fontFamily": "",
+ "language": "",
+ "color": "",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 15,
+ "labelHeight": 26
+ },
+ "type": {
+ "label": "int",
+ "fontSize": 0,
+ "fontFamily": "",
+ "language": "",
+ "color": "",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 23,
+ "labelHeight": 26
+ },
+ "constraint": "",
+ "reference": ""
+ },
+ {
+ "name": {
+ "label": "name",
+ "fontSize": 0,
+ "fontFamily": "",
+ "language": "",
+ "color": "",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 47,
+ "labelHeight": 26
+ },
+ "type": {
+ "label": "string",
+ "fontSize": 0,
+ "fontFamily": "",
+ "language": "",
+ "color": "",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 48,
+ "labelHeight": 26
+ },
+ "constraint": "",
+ "reference": ""
+ },
+ {
+ "name": {
+ "label": "email",
+ "fontSize": 0,
+ "fontFamily": "",
+ "language": "",
+ "color": "",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 47,
+ "labelHeight": 26
+ },
+ "type": {
+ "label": "string",
+ "fontSize": 0,
+ "fontFamily": "",
+ "language": "",
+ "color": "",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 48,
+ "labelHeight": 26
+ },
+ "constraint": "",
+ "reference": ""
+ },
+ {
+ "name": {
+ "label": "password",
+ "fontSize": 0,
+ "fontFamily": "",
+ "language": "",
+ "color": "",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 80,
+ "labelHeight": 26
+ },
+ "type": {
+ "label": "string",
+ "fontSize": 0,
+ "fontFamily": "",
+ "language": "",
+ "color": "",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 48,
+ "labelHeight": 26
+ },
+ "constraint": "",
+ "reference": ""
+ },
+ {
+ "name": {
+ "label": "last_login",
+ "fontSize": 0,
+ "fontFamily": "",
+ "language": "",
+ "color": "",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 81,
+ "labelHeight": 26
+ },
+ "type": {
+ "label": "datetime",
+ "fontSize": 0,
+ "fontFamily": "",
+ "language": "",
+ "color": "",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 77,
+ "labelHeight": 26
+ },
+ "constraint": "",
+ "reference": ""
+ }
+ ],
+ "label": "",
+ "fontSize": 20,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#0A0F25",
+ "italic": false,
+ "bold": true,
+ "underline": false,
+ "labelWidth": 59,
+ "labelHeight": 31,
+ "zIndex": 0,
+ "level": 1,
+ "primaryAccentColor": "#0D32B2",
+ "secondaryAccentColor": "#4A6FF3",
+ "neutralAccentColor": "#676C7E"
+ },
+ {
+ "id": "code",
+ "type": "code",
+ "pos": {
+ "x": 0,
+ "y": 754
+ },
+ "width": 512,
+ "height": 70,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "#FFFFFF",
+ "stroke": "#0A0F25",
+ "shadow": false,
+ "3d": false,
+ "multiple": false,
+ "tooltip": "",
+ "link": "",
+ "icon": null,
+ "iconPosition": "",
+ "blend": false,
+ "fields": null,
+ "methods": null,
+ "columns": null,
+ "label": "a := 5\nb := a + 7\nfmt.Printf(\"%d\", b)",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "golang",
+ "color": "#0A0F25",
+ "italic": false,
+ "bold": true,
+ "underline": false,
+ "labelWidth": 196,
+ "labelHeight": 70,
+ "zIndex": 0,
+ "level": 1
+ },
+ {
+ "id": "package",
+ "type": "package",
+ "pos": {
+ "x": 0,
+ "y": 924
+ },
+ "width": 512,
+ "height": 100,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "#EDF0FD",
+ "stroke": "#0D32B2",
+ "shadow": false,
+ "3d": false,
+ "multiple": false,
+ "tooltip": "",
+ "link": "",
+ "icon": null,
+ "iconPosition": "",
+ "blend": false,
+ "fields": null,
+ "methods": null,
+ "columns": null,
+ "label": "",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#0A0F25",
+ "italic": false,
+ "bold": true,
+ "underline": false,
+ "labelWidth": 0,
+ "labelHeight": 0,
+ "zIndex": 0,
+ "level": 1
+ },
+ {
+ "id": "no width",
+ "type": "",
+ "pos": {
+ "x": 206,
+ "y": 1124
+ },
+ "width": 100,
+ "height": 100,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "#F7F8FE",
+ "stroke": "#0D32B2",
+ "shadow": false,
+ "3d": false,
+ "multiple": false,
+ "tooltip": "",
+ "link": "",
+ "icon": null,
+ "iconPosition": "",
+ "blend": false,
+ "fields": null,
+ "methods": null,
+ "columns": null,
+ "label": "",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#0A0F25",
+ "italic": false,
+ "bold": true,
+ "underline": false,
+ "labelWidth": 0,
+ "labelHeight": 0,
+ "zIndex": 0,
+ "level": 1
+ }
+ ],
+ "connections": [
+ {
+ "id": "(class -> users)[0]",
+ "src": "class",
+ "srcArrow": "none",
+ "srcLabel": "",
+ "dst": "users",
+ "dstArrow": "triangle",
+ "dstLabel": "",
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "stroke": "#0D32B2",
+ "label": "",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#676C7E",
+ "italic": true,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 0,
+ "labelHeight": 0,
+ "labelPosition": "",
+ "labelPercentage": 0,
+ "route": [
+ {
+ "x": 256,
+ "y": 368
+ },
+ {
+ "x": 256,
+ "y": 408
+ },
+ {
+ "x": 256,
+ "y": 428
+ },
+ {
+ "x": 256,
+ "y": 468
+ }
+ ],
+ "isCurve": true,
+ "animated": false,
+ "tooltip": "",
+ "icon": null,
+ "zIndex": 0
+ },
+ {
+ "id": "(users -> code)[0]",
+ "src": "users",
+ "srcArrow": "none",
+ "srcLabel": "",
+ "dst": "code",
+ "dstArrow": "triangle",
+ "dstLabel": "",
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "stroke": "#0D32B2",
+ "label": "",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#676C7E",
+ "italic": true,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 0,
+ "labelHeight": 0,
+ "labelPosition": "",
+ "labelPercentage": 0,
+ "route": [
+ {
+ "x": 256,
+ "y": 654
+ },
+ {
+ "x": 256,
+ "y": 694
+ },
+ {
+ "x": 256,
+ "y": 714
+ },
+ {
+ "x": 256,
+ "y": 754
+ }
+ ],
+ "isCurve": true,
+ "animated": false,
+ "tooltip": "",
+ "icon": null,
+ "zIndex": 0
+ },
+ {
+ "id": "(code -> package)[0]",
+ "src": "code",
+ "srcArrow": "none",
+ "srcLabel": "",
+ "dst": "package",
+ "dstArrow": "triangle",
+ "dstLabel": "",
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "stroke": "#0D32B2",
+ "label": "",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#676C7E",
+ "italic": true,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 0,
+ "labelHeight": 0,
+ "labelPosition": "",
+ "labelPercentage": 0,
+ "route": [
+ {
+ "x": 256,
+ "y": 824
+ },
+ {
+ "x": 256,
+ "y": 864
+ },
+ {
+ "x": 256,
+ "y": 890.8
+ },
+ {
+ "x": 256,
+ "y": 958
+ }
+ ],
+ "isCurve": true,
+ "animated": false,
+ "tooltip": "",
+ "icon": null,
+ "zIndex": 0
+ },
+ {
+ "id": "(package -> no width)[0]",
+ "src": "package",
+ "srcArrow": "none",
+ "srcLabel": "",
+ "dst": "no width",
+ "dstArrow": "triangle",
+ "dstLabel": "",
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "stroke": "#0D32B2",
+ "label": "",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#676C7E",
+ "italic": true,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 0,
+ "labelHeight": 0,
+ "labelPosition": "",
+ "labelPercentage": 0,
+ "route": [
+ {
+ "x": 256,
+ "y": 1024
+ },
+ {
+ "x": 256,
+ "y": 1064
+ },
+ {
+ "x": 256,
+ "y": 1084
+ },
+ {
+ "x": 256,
+ "y": 1124
+ }
+ ],
+ "isCurve": true,
+ "animated": false,
+ "tooltip": "",
+ "icon": null,
+ "zIndex": 0
+ }
+ ]
+}
diff --git a/e2etests/testdata/stable/unnamed_only_width/dagre/sketch.exp.svg b/e2etests/testdata/stable/unnamed_only_width/dagre/sketch.exp.svg
new file mode 100644
index 000000000..86ddafb1b
--- /dev/null
+++ b/e2etests/testdata/stable/unnamed_only_width/dagre/sketch.exp.svg
@@ -0,0 +1,62 @@
+
+
\ No newline at end of file
diff --git a/e2etests/testdata/stable/unnamed_only_width/elk/board.exp.json b/e2etests/testdata/stable/unnamed_only_width/elk/board.exp.json
new file mode 100644
index 000000000..6db26d5e7
--- /dev/null
+++ b/e2etests/testdata/stable/unnamed_only_width/elk/board.exp.json
@@ -0,0 +1,538 @@
+{
+ "name": "",
+ "fontFamily": "SourceSansPro",
+ "shapes": [
+ {
+ "id": "class",
+ "type": "class",
+ "pos": {
+ "x": 12,
+ "y": 12
+ },
+ "width": 512,
+ "height": 368,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "#0A0F25",
+ "stroke": "#FFFFFF",
+ "shadow": false,
+ "3d": false,
+ "multiple": false,
+ "tooltip": "",
+ "link": "",
+ "icon": null,
+ "iconPosition": "",
+ "blend": false,
+ "fields": [
+ {
+ "name": "num",
+ "type": "int",
+ "visibility": "private"
+ },
+ {
+ "name": "timeout",
+ "type": "int",
+ "visibility": "private"
+ },
+ {
+ "name": "pid",
+ "type": "",
+ "visibility": "private"
+ }
+ ],
+ "methods": [
+ {
+ "name": "getStatus()",
+ "return": "Enum",
+ "visibility": "public"
+ },
+ {
+ "name": "getJobs()",
+ "return": "Job[]",
+ "visibility": "public"
+ },
+ {
+ "name": "setTimeout(seconds int)",
+ "return": "void",
+ "visibility": "public"
+ }
+ ],
+ "columns": null,
+ "label": "",
+ "fontSize": 20,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#0A0F25",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 0,
+ "labelHeight": 0,
+ "zIndex": 0,
+ "level": 1,
+ "primaryAccentColor": "#0D32B2",
+ "secondaryAccentColor": "#4A6FF3",
+ "neutralAccentColor": "#676C7E"
+ },
+ {
+ "id": "users",
+ "type": "sql_table",
+ "pos": {
+ "x": 12,
+ "y": 480
+ },
+ "width": 512,
+ "height": 186,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "#0A0F25",
+ "stroke": "#FFFFFF",
+ "shadow": false,
+ "3d": false,
+ "multiple": false,
+ "tooltip": "",
+ "link": "",
+ "icon": null,
+ "iconPosition": "",
+ "blend": false,
+ "fields": null,
+ "methods": null,
+ "columns": [
+ {
+ "name": {
+ "label": "id",
+ "fontSize": 0,
+ "fontFamily": "",
+ "language": "",
+ "color": "",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 15,
+ "labelHeight": 26
+ },
+ "type": {
+ "label": "int",
+ "fontSize": 0,
+ "fontFamily": "",
+ "language": "",
+ "color": "",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 23,
+ "labelHeight": 26
+ },
+ "constraint": "",
+ "reference": ""
+ },
+ {
+ "name": {
+ "label": "name",
+ "fontSize": 0,
+ "fontFamily": "",
+ "language": "",
+ "color": "",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 47,
+ "labelHeight": 26
+ },
+ "type": {
+ "label": "string",
+ "fontSize": 0,
+ "fontFamily": "",
+ "language": "",
+ "color": "",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 48,
+ "labelHeight": 26
+ },
+ "constraint": "",
+ "reference": ""
+ },
+ {
+ "name": {
+ "label": "email",
+ "fontSize": 0,
+ "fontFamily": "",
+ "language": "",
+ "color": "",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 47,
+ "labelHeight": 26
+ },
+ "type": {
+ "label": "string",
+ "fontSize": 0,
+ "fontFamily": "",
+ "language": "",
+ "color": "",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 48,
+ "labelHeight": 26
+ },
+ "constraint": "",
+ "reference": ""
+ },
+ {
+ "name": {
+ "label": "password",
+ "fontSize": 0,
+ "fontFamily": "",
+ "language": "",
+ "color": "",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 80,
+ "labelHeight": 26
+ },
+ "type": {
+ "label": "string",
+ "fontSize": 0,
+ "fontFamily": "",
+ "language": "",
+ "color": "",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 48,
+ "labelHeight": 26
+ },
+ "constraint": "",
+ "reference": ""
+ },
+ {
+ "name": {
+ "label": "last_login",
+ "fontSize": 0,
+ "fontFamily": "",
+ "language": "",
+ "color": "",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 81,
+ "labelHeight": 26
+ },
+ "type": {
+ "label": "datetime",
+ "fontSize": 0,
+ "fontFamily": "",
+ "language": "",
+ "color": "",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 77,
+ "labelHeight": 26
+ },
+ "constraint": "",
+ "reference": ""
+ }
+ ],
+ "label": "",
+ "fontSize": 20,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#0A0F25",
+ "italic": false,
+ "bold": true,
+ "underline": false,
+ "labelWidth": 59,
+ "labelHeight": 31,
+ "zIndex": 0,
+ "level": 1,
+ "primaryAccentColor": "#0D32B2",
+ "secondaryAccentColor": "#4A6FF3",
+ "neutralAccentColor": "#676C7E"
+ },
+ {
+ "id": "code",
+ "type": "code",
+ "pos": {
+ "x": 12,
+ "y": 766
+ },
+ "width": 512,
+ "height": 70,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "#FFFFFF",
+ "stroke": "#0A0F25",
+ "shadow": false,
+ "3d": false,
+ "multiple": false,
+ "tooltip": "",
+ "link": "",
+ "icon": null,
+ "iconPosition": "",
+ "blend": false,
+ "fields": null,
+ "methods": null,
+ "columns": null,
+ "label": "a := 5\nb := a + 7\nfmt.Printf(\"%d\", b)",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "golang",
+ "color": "#0A0F25",
+ "italic": false,
+ "bold": true,
+ "underline": false,
+ "labelWidth": 196,
+ "labelHeight": 70,
+ "zIndex": 0,
+ "level": 1
+ },
+ {
+ "id": "package",
+ "type": "package",
+ "pos": {
+ "x": 12,
+ "y": 936
+ },
+ "width": 512,
+ "height": 100,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "#EDF0FD",
+ "stroke": "#0D32B2",
+ "shadow": false,
+ "3d": false,
+ "multiple": false,
+ "tooltip": "",
+ "link": "",
+ "icon": null,
+ "iconPosition": "",
+ "blend": false,
+ "fields": null,
+ "methods": null,
+ "columns": null,
+ "label": "",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#0A0F25",
+ "italic": false,
+ "bold": true,
+ "underline": false,
+ "labelWidth": 0,
+ "labelHeight": 0,
+ "zIndex": 0,
+ "level": 1
+ },
+ {
+ "id": "no width",
+ "type": "",
+ "pos": {
+ "x": 218,
+ "y": 1136
+ },
+ "width": 100,
+ "height": 100,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "#F7F8FE",
+ "stroke": "#0D32B2",
+ "shadow": false,
+ "3d": false,
+ "multiple": false,
+ "tooltip": "",
+ "link": "",
+ "icon": null,
+ "iconPosition": "",
+ "blend": false,
+ "fields": null,
+ "methods": null,
+ "columns": null,
+ "label": "",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#0A0F25",
+ "italic": false,
+ "bold": true,
+ "underline": false,
+ "labelWidth": 0,
+ "labelHeight": 0,
+ "zIndex": 0,
+ "level": 1
+ }
+ ],
+ "connections": [
+ {
+ "id": "(class -> users)[0]",
+ "src": "class",
+ "srcArrow": "none",
+ "srcLabel": "",
+ "dst": "users",
+ "dstArrow": "triangle",
+ "dstLabel": "",
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "stroke": "#0D32B2",
+ "label": "",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#676C7E",
+ "italic": true,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 0,
+ "labelHeight": 0,
+ "labelPosition": "",
+ "labelPercentage": 0,
+ "route": [
+ {
+ "x": 268,
+ "y": 380
+ },
+ {
+ "x": 268,
+ "y": 480
+ }
+ ],
+ "animated": false,
+ "tooltip": "",
+ "icon": null,
+ "zIndex": 0
+ },
+ {
+ "id": "(users -> code)[0]",
+ "src": "users",
+ "srcArrow": "none",
+ "srcLabel": "",
+ "dst": "code",
+ "dstArrow": "triangle",
+ "dstLabel": "",
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "stroke": "#0D32B2",
+ "label": "",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#676C7E",
+ "italic": true,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 0,
+ "labelHeight": 0,
+ "labelPosition": "",
+ "labelPercentage": 0,
+ "route": [
+ {
+ "x": 268,
+ "y": 666
+ },
+ {
+ "x": 268,
+ "y": 766
+ }
+ ],
+ "animated": false,
+ "tooltip": "",
+ "icon": null,
+ "zIndex": 0
+ },
+ {
+ "id": "(code -> package)[0]",
+ "src": "code",
+ "srcArrow": "none",
+ "srcLabel": "",
+ "dst": "package",
+ "dstArrow": "triangle",
+ "dstLabel": "",
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "stroke": "#0D32B2",
+ "label": "",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#676C7E",
+ "italic": true,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 0,
+ "labelHeight": 0,
+ "labelPosition": "",
+ "labelPercentage": 0,
+ "route": [
+ {
+ "x": 268,
+ "y": 836
+ },
+ {
+ "x": 268,
+ "y": 970
+ }
+ ],
+ "animated": false,
+ "tooltip": "",
+ "icon": null,
+ "zIndex": 0
+ },
+ {
+ "id": "(package -> no width)[0]",
+ "src": "package",
+ "srcArrow": "none",
+ "srcLabel": "",
+ "dst": "no width",
+ "dstArrow": "triangle",
+ "dstLabel": "",
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "stroke": "#0D32B2",
+ "label": "",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#676C7E",
+ "italic": true,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 0,
+ "labelHeight": 0,
+ "labelPosition": "",
+ "labelPercentage": 0,
+ "route": [
+ {
+ "x": 268,
+ "y": 1036
+ },
+ {
+ "x": 268,
+ "y": 1136
+ }
+ ],
+ "animated": false,
+ "tooltip": "",
+ "icon": null,
+ "zIndex": 0
+ }
+ ]
+}
diff --git a/e2etests/testdata/stable/unnamed_only_width/elk/sketch.exp.svg b/e2etests/testdata/stable/unnamed_only_width/elk/sketch.exp.svg
new file mode 100644
index 000000000..b61d80937
--- /dev/null
+++ b/e2etests/testdata/stable/unnamed_only_width/elk/sketch.exp.svg
@@ -0,0 +1,62 @@
+
+
\ No newline at end of file
diff --git a/e2etests/testdata/todo/shape_set_width_height/dagre/board.exp.json b/e2etests/testdata/todo/shape_set_width_height/dagre/board.exp.json
new file mode 100644
index 000000000..b48e2bb4a
--- /dev/null
+++ b/e2etests/testdata/todo/shape_set_width_height/dagre/board.exp.json
@@ -0,0 +1,1175 @@
+{
+ "name": "",
+ "fontFamily": "SourceSansPro",
+ "shapes": [
+ {
+ "id": "containers",
+ "type": "",
+ "pos": {
+ "x": 0,
+ "y": 0
+ },
+ "width": 1112,
+ "height": 456,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "#E3E9FD",
+ "stroke": "#0D32B2",
+ "shadow": false,
+ "3d": false,
+ "multiple": false,
+ "tooltip": "",
+ "link": "",
+ "icon": null,
+ "iconPosition": "",
+ "blend": false,
+ "fields": null,
+ "methods": null,
+ "columns": null,
+ "label": "containers",
+ "fontSize": 28,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#0A0F25",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 128,
+ "labelHeight": 41,
+ "labelPosition": "INSIDE_TOP_CENTER",
+ "zIndex": 0,
+ "level": 1
+ },
+ {
+ "id": "containers.circle container",
+ "type": "oval",
+ "pos": {
+ "x": 40,
+ "y": 50
+ },
+ "width": 228,
+ "height": 356,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "#EDF0FD",
+ "stroke": "#0D32B2",
+ "shadow": false,
+ "3d": false,
+ "multiple": false,
+ "tooltip": "",
+ "link": "",
+ "icon": null,
+ "iconPosition": "",
+ "blend": false,
+ "fields": null,
+ "methods": null,
+ "columns": null,
+ "label": "circle container",
+ "fontSize": 24,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#0A0F25",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 161,
+ "labelHeight": 36,
+ "labelPosition": "INSIDE_TOP_CENTER",
+ "zIndex": 0,
+ "level": 2
+ },
+ {
+ "id": "containers.circle container.diamond",
+ "type": "diamond",
+ "pos": {
+ "x": 90,
+ "y": 196
+ },
+ "width": 128,
+ "height": 64,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "#CFD2DD",
+ "stroke": "#0D32B2",
+ "shadow": false,
+ "3d": false,
+ "multiple": false,
+ "tooltip": "",
+ "link": "",
+ "icon": null,
+ "iconPosition": "",
+ "blend": false,
+ "fields": null,
+ "methods": null,
+ "columns": null,
+ "label": "diamond",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#0A0F25",
+ "italic": false,
+ "bold": true,
+ "underline": false,
+ "labelWidth": 68,
+ "labelHeight": 26,
+ "labelPosition": "INSIDE_MIDDLE_CENTER",
+ "zIndex": 0,
+ "level": 3
+ },
+ {
+ "id": "containers.diamond container",
+ "type": "diamond",
+ "pos": {
+ "x": 308,
+ "y": 50
+ },
+ "width": 228,
+ "height": 356,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "#CFD2DD",
+ "stroke": "#0D32B2",
+ "shadow": false,
+ "3d": false,
+ "multiple": false,
+ "tooltip": "",
+ "link": "",
+ "icon": null,
+ "iconPosition": "",
+ "blend": false,
+ "fields": null,
+ "methods": null,
+ "columns": null,
+ "label": "diamond container",
+ "fontSize": 24,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#0A0F25",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 197,
+ "labelHeight": 36,
+ "labelPosition": "INSIDE_TOP_CENTER",
+ "zIndex": 0,
+ "level": 2
+ },
+ {
+ "id": "containers.diamond container.circle",
+ "type": "oval",
+ "pos": {
+ "x": 358,
+ "y": 164
+ },
+ "width": 128,
+ "height": 128,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "#F7F8FE",
+ "stroke": "#0D32B2",
+ "shadow": false,
+ "3d": false,
+ "multiple": false,
+ "tooltip": "",
+ "link": "",
+ "icon": null,
+ "iconPosition": "",
+ "blend": false,
+ "fields": null,
+ "methods": null,
+ "columns": null,
+ "label": "circle",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#0A0F25",
+ "italic": false,
+ "bold": true,
+ "underline": false,
+ "labelWidth": 44,
+ "labelHeight": 26,
+ "labelPosition": "INSIDE_MIDDLE_CENTER",
+ "zIndex": 0,
+ "level": 3
+ },
+ {
+ "id": "containers.oval container",
+ "type": "oval",
+ "pos": {
+ "x": 576,
+ "y": 50
+ },
+ "width": 228,
+ "height": 356,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "#EDF0FD",
+ "stroke": "#0D32B2",
+ "shadow": false,
+ "3d": false,
+ "multiple": false,
+ "tooltip": "",
+ "link": "",
+ "icon": null,
+ "iconPosition": "",
+ "blend": false,
+ "fields": null,
+ "methods": null,
+ "columns": null,
+ "label": "oval container",
+ "fontSize": 24,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#0A0F25",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 149,
+ "labelHeight": 36,
+ "labelPosition": "INSIDE_TOP_CENTER",
+ "zIndex": 0,
+ "level": 2
+ },
+ {
+ "id": "containers.oval container.hexagon",
+ "type": "hexagon",
+ "pos": {
+ "x": 626,
+ "y": 196
+ },
+ "width": 128,
+ "height": 64,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "#DEE1EB",
+ "stroke": "#0D32B2",
+ "shadow": false,
+ "3d": false,
+ "multiple": false,
+ "tooltip": "",
+ "link": "",
+ "icon": null,
+ "iconPosition": "",
+ "blend": false,
+ "fields": null,
+ "methods": null,
+ "columns": null,
+ "label": "hexagon",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#0A0F25",
+ "italic": false,
+ "bold": true,
+ "underline": false,
+ "labelWidth": 65,
+ "labelHeight": 26,
+ "labelPosition": "INSIDE_MIDDLE_CENTER",
+ "zIndex": 0,
+ "level": 3
+ },
+ {
+ "id": "containers.hexagon container",
+ "type": "hexagon",
+ "pos": {
+ "x": 844,
+ "y": 50
+ },
+ "width": 228,
+ "height": 356,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "#DEE1EB",
+ "stroke": "#0D32B2",
+ "shadow": false,
+ "3d": false,
+ "multiple": false,
+ "tooltip": "",
+ "link": "",
+ "icon": null,
+ "iconPosition": "",
+ "blend": false,
+ "fields": null,
+ "methods": null,
+ "columns": null,
+ "label": "hexagon container",
+ "fontSize": 24,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#0A0F25",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 193,
+ "labelHeight": 36,
+ "labelPosition": "INSIDE_TOP_CENTER",
+ "zIndex": 0,
+ "level": 2
+ },
+ {
+ "id": "containers.hexagon container.oval",
+ "type": "oval",
+ "pos": {
+ "x": 894,
+ "y": 196
+ },
+ "width": 128,
+ "height": 64,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "#F7F8FE",
+ "stroke": "#0D32B2",
+ "shadow": false,
+ "3d": false,
+ "multiple": false,
+ "tooltip": "",
+ "link": "",
+ "icon": null,
+ "iconPosition": "",
+ "blend": false,
+ "fields": null,
+ "methods": null,
+ "columns": null,
+ "label": "oval",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#0A0F25",
+ "italic": false,
+ "bold": true,
+ "underline": false,
+ "labelWidth": 36,
+ "labelHeight": 26,
+ "labelPosition": "INSIDE_MIDDLE_CENTER",
+ "zIndex": 0,
+ "level": 3
+ },
+ {
+ "id": "cloud",
+ "type": "cloud",
+ "pos": {
+ "x": 1162,
+ "y": 100
+ },
+ "width": 512,
+ "height": 256,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "#FFFFFF",
+ "stroke": "#0D32B2",
+ "shadow": false,
+ "3d": false,
+ "multiple": false,
+ "tooltip": "",
+ "link": "",
+ "icon": null,
+ "iconPosition": "",
+ "blend": false,
+ "fields": null,
+ "methods": null,
+ "columns": null,
+ "label": "cloud",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#0A0F25",
+ "italic": false,
+ "bold": true,
+ "underline": false,
+ "labelWidth": 45,
+ "labelHeight": 26,
+ "labelPosition": "INSIDE_MIDDLE_CENTER",
+ "zIndex": 0,
+ "level": 1
+ },
+ {
+ "id": "tall cylinder",
+ "type": "cylinder",
+ "pos": {
+ "x": 1290,
+ "y": 1456
+ },
+ "width": 256,
+ "height": 512,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "#EDF0FD",
+ "stroke": "#0D32B2",
+ "shadow": false,
+ "3d": false,
+ "multiple": false,
+ "tooltip": "",
+ "link": "",
+ "icon": null,
+ "iconPosition": "",
+ "blend": false,
+ "fields": null,
+ "methods": null,
+ "columns": null,
+ "label": "tall cylinder",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#0A0F25",
+ "italic": false,
+ "bold": true,
+ "underline": false,
+ "labelWidth": 91,
+ "labelHeight": 26,
+ "labelPosition": "INSIDE_MIDDLE_CENTER",
+ "zIndex": 0,
+ "level": 1
+ },
+ {
+ "id": "users",
+ "type": "sql_table",
+ "pos": {
+ "x": 1018,
+ "y": 2068
+ },
+ "width": 800,
+ "height": 400,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "#0A0F25",
+ "stroke": "#FFFFFF",
+ "shadow": false,
+ "3d": false,
+ "multiple": false,
+ "tooltip": "",
+ "link": "",
+ "icon": null,
+ "iconPosition": "",
+ "blend": false,
+ "fields": null,
+ "methods": null,
+ "columns": [
+ {
+ "name": {
+ "label": "id",
+ "fontSize": 0,
+ "fontFamily": "",
+ "language": "",
+ "color": "",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 15,
+ "labelHeight": 26
+ },
+ "type": {
+ "label": "int",
+ "fontSize": 0,
+ "fontFamily": "",
+ "language": "",
+ "color": "",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 23,
+ "labelHeight": 26
+ },
+ "constraint": "",
+ "reference": ""
+ },
+ {
+ "name": {
+ "label": "name",
+ "fontSize": 0,
+ "fontFamily": "",
+ "language": "",
+ "color": "",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 47,
+ "labelHeight": 26
+ },
+ "type": {
+ "label": "string",
+ "fontSize": 0,
+ "fontFamily": "",
+ "language": "",
+ "color": "",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 48,
+ "labelHeight": 26
+ },
+ "constraint": "",
+ "reference": ""
+ },
+ {
+ "name": {
+ "label": "email",
+ "fontSize": 0,
+ "fontFamily": "",
+ "language": "",
+ "color": "",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 47,
+ "labelHeight": 26
+ },
+ "type": {
+ "label": "string",
+ "fontSize": 0,
+ "fontFamily": "",
+ "language": "",
+ "color": "",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 48,
+ "labelHeight": 26
+ },
+ "constraint": "",
+ "reference": ""
+ },
+ {
+ "name": {
+ "label": "password",
+ "fontSize": 0,
+ "fontFamily": "",
+ "language": "",
+ "color": "",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 80,
+ "labelHeight": 26
+ },
+ "type": {
+ "label": "string",
+ "fontSize": 0,
+ "fontFamily": "",
+ "language": "",
+ "color": "",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 48,
+ "labelHeight": 26
+ },
+ "constraint": "",
+ "reference": ""
+ },
+ {
+ "name": {
+ "label": "last_login",
+ "fontSize": 0,
+ "fontFamily": "",
+ "language": "",
+ "color": "",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 81,
+ "labelHeight": 26
+ },
+ "type": {
+ "label": "datetime",
+ "fontSize": 0,
+ "fontFamily": "",
+ "language": "",
+ "color": "",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 77,
+ "labelHeight": 26
+ },
+ "constraint": "",
+ "reference": ""
+ }
+ ],
+ "label": "users",
+ "fontSize": 20,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#0A0F25",
+ "italic": false,
+ "bold": true,
+ "underline": false,
+ "labelWidth": 61,
+ "labelHeight": 36,
+ "zIndex": 0,
+ "level": 1,
+ "primaryAccentColor": "#0D32B2",
+ "secondaryAccentColor": "#4A6FF3",
+ "neutralAccentColor": "#676C7E"
+ },
+ {
+ "id": "class",
+ "type": "class",
+ "pos": {
+ "x": 1018,
+ "y": 756
+ },
+ "width": 800,
+ "height": 400,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "#0A0F25",
+ "stroke": "#FFFFFF",
+ "shadow": false,
+ "3d": false,
+ "multiple": false,
+ "tooltip": "",
+ "link": "",
+ "icon": null,
+ "iconPosition": "",
+ "blend": false,
+ "fields": [
+ {
+ "name": "num",
+ "type": "int",
+ "visibility": "private"
+ },
+ {
+ "name": "timeout",
+ "type": "int",
+ "visibility": "private"
+ },
+ {
+ "name": "pid",
+ "type": "",
+ "visibility": "private"
+ }
+ ],
+ "methods": [
+ {
+ "name": "getStatus()",
+ "return": "Enum",
+ "visibility": "public"
+ },
+ {
+ "name": "getJobs()",
+ "return": "Job[]",
+ "visibility": "public"
+ },
+ {
+ "name": "setTimeout(seconds int)",
+ "return": "void",
+ "visibility": "public"
+ }
+ ],
+ "columns": null,
+ "label": "class",
+ "fontSize": 20,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#0A0F25",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 75,
+ "labelHeight": 36,
+ "zIndex": 0,
+ "level": 1,
+ "primaryAccentColor": "#0D32B2",
+ "secondaryAccentColor": "#4A6FF3",
+ "neutralAccentColor": "#676C7E"
+ },
+ {
+ "id": "text",
+ "type": "",
+ "pos": {
+ "x": 1878,
+ "y": 556
+ },
+ "width": 400,
+ "height": 800,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "#F7F8FE",
+ "stroke": "#0D32B2",
+ "shadow": false,
+ "3d": false,
+ "multiple": false,
+ "tooltip": "",
+ "link": "",
+ "icon": null,
+ "iconPosition": "",
+ "blend": false,
+ "fields": null,
+ "methods": null,
+ "columns": null,
+ "label": "markdown text expanded to 800x400",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#0A0F25",
+ "italic": false,
+ "bold": true,
+ "underline": false,
+ "labelWidth": 266,
+ "labelHeight": 26,
+ "labelPosition": "INSIDE_MIDDLE_CENTER",
+ "zIndex": 0,
+ "level": 1
+ },
+ {
+ "id": "code",
+ "type": "code",
+ "pos": {
+ "x": 1878,
+ "y": 1562
+ },
+ "width": 400,
+ "height": 300,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "#FFFFFF",
+ "stroke": "#0A0F25",
+ "shadow": false,
+ "3d": false,
+ "multiple": false,
+ "tooltip": "",
+ "link": "",
+ "icon": null,
+ "iconPosition": "",
+ "blend": false,
+ "fields": null,
+ "methods": null,
+ "columns": null,
+ "label": "a := 5\nb := a + 7\nfmt.Printf(\"%d\", b)",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "golang",
+ "color": "#0A0F25",
+ "italic": false,
+ "bold": true,
+ "underline": false,
+ "labelWidth": 196,
+ "labelHeight": 70,
+ "zIndex": 0,
+ "level": 1
+ },
+ {
+ "id": "small code",
+ "type": "code",
+ "pos": {
+ "x": 1980,
+ "y": 2233
+ },
+ "width": 196,
+ "height": 70,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "#FFFFFF",
+ "stroke": "#0A0F25",
+ "shadow": false,
+ "3d": false,
+ "multiple": false,
+ "tooltip": "",
+ "link": "",
+ "icon": null,
+ "iconPosition": "",
+ "blend": false,
+ "fields": null,
+ "methods": null,
+ "columns": null,
+ "label": "a := 5\nb := a + 7\nfmt.Printf(\"%d\", b)",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "golang",
+ "color": "#0A0F25",
+ "italic": false,
+ "bold": true,
+ "underline": false,
+ "labelWidth": 196,
+ "labelHeight": 70,
+ "zIndex": 0,
+ "level": 1
+ },
+ {
+ "id": "container",
+ "type": "",
+ "pos": {
+ "x": 1991,
+ "y": 165
+ },
+ "width": 174,
+ "height": 126,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "#F7F8FE",
+ "stroke": "#0D32B2",
+ "shadow": false,
+ "3d": false,
+ "multiple": false,
+ "tooltip": "",
+ "link": "",
+ "icon": null,
+ "iconPosition": "",
+ "blend": false,
+ "fields": null,
+ "methods": null,
+ "columns": null,
+ "label": "container",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#0A0F25",
+ "italic": false,
+ "bold": true,
+ "underline": false,
+ "labelWidth": 74,
+ "labelHeight": 26,
+ "labelPosition": "INSIDE_MIDDLE_CENTER",
+ "zIndex": 0,
+ "level": 1
+ }
+ ],
+ "connections": [
+ {
+ "id": "(cloud -> class)[0]",
+ "src": "cloud",
+ "srcArrow": "none",
+ "srcLabel": "",
+ "dst": "class",
+ "dstArrow": "triangle",
+ "dstLabel": "",
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "stroke": "#0D32B2",
+ "label": "",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#676C7E",
+ "italic": true,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 0,
+ "labelHeight": 0,
+ "labelPosition": "",
+ "labelPercentage": 0,
+ "route": [
+ {
+ "x": 1418,
+ "y": 356
+ },
+ {
+ "x": 1418,
+ "y": 396
+ },
+ {
+ "x": 1418,
+ "y": 416
+ },
+ {
+ "x": 1418,
+ "y": 431
+ },
+ {
+ "x": 1418,
+ "y": 446
+ },
+ {
+ "x": 1418,
+ "y": 556
+ },
+ {
+ "x": 1418,
+ "y": 756
+ }
+ ],
+ "isCurve": true,
+ "animated": false,
+ "tooltip": "",
+ "icon": null,
+ "zIndex": 0
+ },
+ {
+ "id": "(class -> tall cylinder)[0]",
+ "src": "class",
+ "srcArrow": "none",
+ "srcLabel": "",
+ "dst": "tall cylinder",
+ "dstArrow": "triangle",
+ "dstLabel": "",
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "stroke": "#0D32B2",
+ "label": "",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#676C7E",
+ "italic": true,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 0,
+ "labelHeight": 0,
+ "labelPosition": "",
+ "labelPercentage": 0,
+ "route": [
+ {
+ "x": 1418,
+ "y": 1156
+ },
+ {
+ "x": 1418,
+ "y": 1356
+ },
+ {
+ "x": 1418,
+ "y": 1416
+ },
+ {
+ "x": 1418,
+ "y": 1456
+ }
+ ],
+ "isCurve": true,
+ "animated": false,
+ "tooltip": "",
+ "icon": null,
+ "zIndex": 0
+ },
+ {
+ "id": "(tall cylinder -> users)[0]",
+ "src": "tall cylinder",
+ "srcArrow": "none",
+ "srcLabel": "",
+ "dst": "users",
+ "dstArrow": "triangle",
+ "dstLabel": "",
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "stroke": "#0D32B2",
+ "label": "",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#676C7E",
+ "italic": true,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 0,
+ "labelHeight": 0,
+ "labelPosition": "",
+ "labelPercentage": 0,
+ "route": [
+ {
+ "x": 1418,
+ "y": 1968
+ },
+ {
+ "x": 1418,
+ "y": 2008
+ },
+ {
+ "x": 1418,
+ "y": 2028
+ },
+ {
+ "x": 1418,
+ "y": 2068
+ }
+ ],
+ "isCurve": true,
+ "animated": false,
+ "tooltip": "",
+ "icon": null,
+ "zIndex": 0
+ },
+ {
+ "id": "(container -> text)[0]",
+ "src": "container",
+ "srcArrow": "none",
+ "srcLabel": "",
+ "dst": "text",
+ "dstArrow": "triangle",
+ "dstLabel": "",
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "stroke": "#0D32B2",
+ "label": "",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#676C7E",
+ "italic": true,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 0,
+ "labelHeight": 0,
+ "labelPosition": "",
+ "labelPercentage": 0,
+ "route": [
+ {
+ "x": 2078,
+ "y": 291
+ },
+ {
+ "x": 2078,
+ "y": 383
+ },
+ {
+ "x": 2078,
+ "y": 416
+ },
+ {
+ "x": 2078,
+ "y": 431
+ },
+ {
+ "x": 2078,
+ "y": 446
+ },
+ {
+ "x": 2078,
+ "y": 516
+ },
+ {
+ "x": 2078,
+ "y": 556
+ }
+ ],
+ "isCurve": true,
+ "animated": false,
+ "tooltip": "",
+ "icon": null,
+ "zIndex": 0
+ },
+ {
+ "id": "(text -> code)[0]",
+ "src": "text",
+ "srcArrow": "none",
+ "srcLabel": "",
+ "dst": "code",
+ "dstArrow": "triangle",
+ "dstLabel": "",
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "stroke": "#0D32B2",
+ "label": "",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#676C7E",
+ "italic": true,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 0,
+ "labelHeight": 0,
+ "labelPosition": "",
+ "labelPercentage": 0,
+ "route": [
+ {
+ "x": 2078,
+ "y": 1356
+ },
+ {
+ "x": 2078,
+ "y": 1396
+ },
+ {
+ "x": 2078,
+ "y": 1437.2
+ },
+ {
+ "x": 2078,
+ "y": 1562
+ }
+ ],
+ "isCurve": true,
+ "animated": false,
+ "tooltip": "",
+ "icon": null,
+ "zIndex": 0
+ },
+ {
+ "id": "(code -> small code)[0]",
+ "src": "code",
+ "srcArrow": "none",
+ "srcLabel": "",
+ "dst": "small code",
+ "dstArrow": "triangle",
+ "dstLabel": "",
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "stroke": "#0D32B2",
+ "label": "",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#676C7E",
+ "italic": true,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 0,
+ "labelHeight": 0,
+ "labelPosition": "",
+ "labelPercentage": 0,
+ "route": [
+ {
+ "x": 2078,
+ "y": 1862
+ },
+ {
+ "x": 2078,
+ "y": 1986.8
+ },
+ {
+ "x": 2078,
+ "y": 2061
+ },
+ {
+ "x": 2078,
+ "y": 2233
+ }
+ ],
+ "isCurve": true,
+ "animated": false,
+ "tooltip": "",
+ "icon": null,
+ "zIndex": 0
+ }
+ ]
+}
diff --git a/e2etests/testdata/todo/shape_set_width_height/dagre/sketch.exp.svg b/e2etests/testdata/todo/shape_set_width_height/dagre/sketch.exp.svg
new file mode 100644
index 000000000..c63fc847c
--- /dev/null
+++ b/e2etests/testdata/todo/shape_set_width_height/dagre/sketch.exp.svg
@@ -0,0 +1,71 @@
+
+
\ No newline at end of file
diff --git a/e2etests/testdata/todo/shape_set_width_height/elk/board.exp.json b/e2etests/testdata/todo/shape_set_width_height/elk/board.exp.json
new file mode 100644
index 000000000..61577b1dd
--- /dev/null
+++ b/e2etests/testdata/todo/shape_set_width_height/elk/board.exp.json
@@ -0,0 +1,1097 @@
+{
+ "name": "",
+ "fontFamily": "SourceSansPro",
+ "shapes": [
+ {
+ "id": "containers",
+ "type": "",
+ "pos": {
+ "x": 12,
+ "y": 12
+ },
+ "width": 1322,
+ "height": 428,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "#E3E9FD",
+ "stroke": "#0D32B2",
+ "shadow": false,
+ "3d": false,
+ "multiple": false,
+ "tooltip": "",
+ "link": "",
+ "icon": null,
+ "iconPosition": "",
+ "blend": false,
+ "fields": null,
+ "methods": null,
+ "columns": null,
+ "label": "containers",
+ "fontSize": 28,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#0A0F25",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 128,
+ "labelHeight": 41,
+ "labelPosition": "INSIDE_TOP_CENTER",
+ "zIndex": 0,
+ "level": 1
+ },
+ {
+ "id": "containers.circle container",
+ "type": "oval",
+ "pos": {
+ "x": 87,
+ "y": 119
+ },
+ "width": 278,
+ "height": 214,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "#EDF0FD",
+ "stroke": "#0D32B2",
+ "shadow": false,
+ "3d": false,
+ "multiple": false,
+ "tooltip": "",
+ "link": "",
+ "icon": null,
+ "iconPosition": "",
+ "blend": false,
+ "fields": null,
+ "methods": null,
+ "columns": null,
+ "label": "circle container",
+ "fontSize": 24,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#0A0F25",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 161,
+ "labelHeight": 36,
+ "labelPosition": "INSIDE_TOP_CENTER",
+ "zIndex": 0,
+ "level": 2
+ },
+ {
+ "id": "containers.circle container.diamond",
+ "type": "diamond",
+ "pos": {
+ "x": 162,
+ "y": 194
+ },
+ "width": 128,
+ "height": 64,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "#CFD2DD",
+ "stroke": "#0D32B2",
+ "shadow": false,
+ "3d": false,
+ "multiple": false,
+ "tooltip": "",
+ "link": "",
+ "icon": null,
+ "iconPosition": "",
+ "blend": false,
+ "fields": null,
+ "methods": null,
+ "columns": null,
+ "label": "diamond",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#0A0F25",
+ "italic": false,
+ "bold": true,
+ "underline": false,
+ "labelWidth": 68,
+ "labelHeight": 26,
+ "labelPosition": "INSIDE_MIDDLE_CENTER",
+ "zIndex": 0,
+ "level": 3
+ },
+ {
+ "id": "containers.diamond container",
+ "type": "diamond",
+ "pos": {
+ "x": 385,
+ "y": 87
+ },
+ "width": 278,
+ "height": 278,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "#CFD2DD",
+ "stroke": "#0D32B2",
+ "shadow": false,
+ "3d": false,
+ "multiple": false,
+ "tooltip": "",
+ "link": "",
+ "icon": null,
+ "iconPosition": "",
+ "blend": false,
+ "fields": null,
+ "methods": null,
+ "columns": null,
+ "label": "diamond container",
+ "fontSize": 24,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#0A0F25",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 197,
+ "labelHeight": 36,
+ "labelPosition": "INSIDE_TOP_CENTER",
+ "zIndex": 0,
+ "level": 2
+ },
+ {
+ "id": "containers.diamond container.circle",
+ "type": "oval",
+ "pos": {
+ "x": 460,
+ "y": 162
+ },
+ "width": 128,
+ "height": 128,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "#F7F8FE",
+ "stroke": "#0D32B2",
+ "shadow": false,
+ "3d": false,
+ "multiple": false,
+ "tooltip": "",
+ "link": "",
+ "icon": null,
+ "iconPosition": "",
+ "blend": false,
+ "fields": null,
+ "methods": null,
+ "columns": null,
+ "label": "circle",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#0A0F25",
+ "italic": false,
+ "bold": true,
+ "underline": false,
+ "labelWidth": 44,
+ "labelHeight": 26,
+ "labelPosition": "INSIDE_MIDDLE_CENTER",
+ "zIndex": 0,
+ "level": 3
+ },
+ {
+ "id": "containers.oval container",
+ "type": "oval",
+ "pos": {
+ "x": 683,
+ "y": 119
+ },
+ "width": 278,
+ "height": 214,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "#EDF0FD",
+ "stroke": "#0D32B2",
+ "shadow": false,
+ "3d": false,
+ "multiple": false,
+ "tooltip": "",
+ "link": "",
+ "icon": null,
+ "iconPosition": "",
+ "blend": false,
+ "fields": null,
+ "methods": null,
+ "columns": null,
+ "label": "oval container",
+ "fontSize": 24,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#0A0F25",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 149,
+ "labelHeight": 36,
+ "labelPosition": "INSIDE_TOP_CENTER",
+ "zIndex": 0,
+ "level": 2
+ },
+ {
+ "id": "containers.oval container.hexagon",
+ "type": "hexagon",
+ "pos": {
+ "x": 758,
+ "y": 194
+ },
+ "width": 128,
+ "height": 64,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "#DEE1EB",
+ "stroke": "#0D32B2",
+ "shadow": false,
+ "3d": false,
+ "multiple": false,
+ "tooltip": "",
+ "link": "",
+ "icon": null,
+ "iconPosition": "",
+ "blend": false,
+ "fields": null,
+ "methods": null,
+ "columns": null,
+ "label": "hexagon",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#0A0F25",
+ "italic": false,
+ "bold": true,
+ "underline": false,
+ "labelWidth": 65,
+ "labelHeight": 26,
+ "labelPosition": "INSIDE_MIDDLE_CENTER",
+ "zIndex": 0,
+ "level": 3
+ },
+ {
+ "id": "containers.hexagon container",
+ "type": "hexagon",
+ "pos": {
+ "x": 981,
+ "y": 119
+ },
+ "width": 278,
+ "height": 214,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "#DEE1EB",
+ "stroke": "#0D32B2",
+ "shadow": false,
+ "3d": false,
+ "multiple": false,
+ "tooltip": "",
+ "link": "",
+ "icon": null,
+ "iconPosition": "",
+ "blend": false,
+ "fields": null,
+ "methods": null,
+ "columns": null,
+ "label": "hexagon container",
+ "fontSize": 24,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#0A0F25",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 193,
+ "labelHeight": 36,
+ "labelPosition": "INSIDE_TOP_CENTER",
+ "zIndex": 0,
+ "level": 2
+ },
+ {
+ "id": "containers.hexagon container.oval",
+ "type": "oval",
+ "pos": {
+ "x": 1056,
+ "y": 194
+ },
+ "width": 128,
+ "height": 64,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "#F7F8FE",
+ "stroke": "#0D32B2",
+ "shadow": false,
+ "3d": false,
+ "multiple": false,
+ "tooltip": "",
+ "link": "",
+ "icon": null,
+ "iconPosition": "",
+ "blend": false,
+ "fields": null,
+ "methods": null,
+ "columns": null,
+ "label": "oval",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#0A0F25",
+ "italic": false,
+ "bold": true,
+ "underline": false,
+ "labelWidth": 36,
+ "labelHeight": 26,
+ "labelPosition": "INSIDE_MIDDLE_CENTER",
+ "zIndex": 0,
+ "level": 3
+ },
+ {
+ "id": "cloud",
+ "type": "cloud",
+ "pos": {
+ "x": 1354,
+ "y": 184
+ },
+ "width": 512,
+ "height": 256,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "#FFFFFF",
+ "stroke": "#0D32B2",
+ "shadow": false,
+ "3d": false,
+ "multiple": false,
+ "tooltip": "",
+ "link": "",
+ "icon": null,
+ "iconPosition": "",
+ "blend": false,
+ "fields": null,
+ "methods": null,
+ "columns": null,
+ "label": "cloud",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#0A0F25",
+ "italic": false,
+ "bold": true,
+ "underline": false,
+ "labelWidth": 45,
+ "labelHeight": 26,
+ "labelPosition": "INSIDE_MIDDLE_CENTER",
+ "zIndex": 0,
+ "level": 1
+ },
+ {
+ "id": "tall cylinder",
+ "type": "cylinder",
+ "pos": {
+ "x": 1482,
+ "y": 1440
+ },
+ "width": 256,
+ "height": 512,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "#EDF0FD",
+ "stroke": "#0D32B2",
+ "shadow": false,
+ "3d": false,
+ "multiple": false,
+ "tooltip": "",
+ "link": "",
+ "icon": null,
+ "iconPosition": "",
+ "blend": false,
+ "fields": null,
+ "methods": null,
+ "columns": null,
+ "label": "tall cylinder",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#0A0F25",
+ "italic": false,
+ "bold": true,
+ "underline": false,
+ "labelWidth": 91,
+ "labelHeight": 26,
+ "labelPosition": "INSIDE_MIDDLE_CENTER",
+ "zIndex": 0,
+ "level": 1
+ },
+ {
+ "id": "users",
+ "type": "sql_table",
+ "pos": {
+ "x": 1210,
+ "y": 2052
+ },
+ "width": 800,
+ "height": 400,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "#0A0F25",
+ "stroke": "#FFFFFF",
+ "shadow": false,
+ "3d": false,
+ "multiple": false,
+ "tooltip": "",
+ "link": "",
+ "icon": null,
+ "iconPosition": "",
+ "blend": false,
+ "fields": null,
+ "methods": null,
+ "columns": [
+ {
+ "name": {
+ "label": "id",
+ "fontSize": 0,
+ "fontFamily": "",
+ "language": "",
+ "color": "",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 15,
+ "labelHeight": 26
+ },
+ "type": {
+ "label": "int",
+ "fontSize": 0,
+ "fontFamily": "",
+ "language": "",
+ "color": "",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 23,
+ "labelHeight": 26
+ },
+ "constraint": "",
+ "reference": ""
+ },
+ {
+ "name": {
+ "label": "name",
+ "fontSize": 0,
+ "fontFamily": "",
+ "language": "",
+ "color": "",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 47,
+ "labelHeight": 26
+ },
+ "type": {
+ "label": "string",
+ "fontSize": 0,
+ "fontFamily": "",
+ "language": "",
+ "color": "",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 48,
+ "labelHeight": 26
+ },
+ "constraint": "",
+ "reference": ""
+ },
+ {
+ "name": {
+ "label": "email",
+ "fontSize": 0,
+ "fontFamily": "",
+ "language": "",
+ "color": "",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 47,
+ "labelHeight": 26
+ },
+ "type": {
+ "label": "string",
+ "fontSize": 0,
+ "fontFamily": "",
+ "language": "",
+ "color": "",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 48,
+ "labelHeight": 26
+ },
+ "constraint": "",
+ "reference": ""
+ },
+ {
+ "name": {
+ "label": "password",
+ "fontSize": 0,
+ "fontFamily": "",
+ "language": "",
+ "color": "",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 80,
+ "labelHeight": 26
+ },
+ "type": {
+ "label": "string",
+ "fontSize": 0,
+ "fontFamily": "",
+ "language": "",
+ "color": "",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 48,
+ "labelHeight": 26
+ },
+ "constraint": "",
+ "reference": ""
+ },
+ {
+ "name": {
+ "label": "last_login",
+ "fontSize": 0,
+ "fontFamily": "",
+ "language": "",
+ "color": "",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 81,
+ "labelHeight": 26
+ },
+ "type": {
+ "label": "datetime",
+ "fontSize": 0,
+ "fontFamily": "",
+ "language": "",
+ "color": "",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 77,
+ "labelHeight": 26
+ },
+ "constraint": "",
+ "reference": ""
+ }
+ ],
+ "label": "users",
+ "fontSize": 20,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#0A0F25",
+ "italic": false,
+ "bold": true,
+ "underline": false,
+ "labelWidth": 61,
+ "labelHeight": 36,
+ "zIndex": 0,
+ "level": 1,
+ "primaryAccentColor": "#0D32B2",
+ "secondaryAccentColor": "#4A6FF3",
+ "neutralAccentColor": "#676C7E"
+ },
+ {
+ "id": "class",
+ "type": "class",
+ "pos": {
+ "x": 1210,
+ "y": 740
+ },
+ "width": 800,
+ "height": 400,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "#0A0F25",
+ "stroke": "#FFFFFF",
+ "shadow": false,
+ "3d": false,
+ "multiple": false,
+ "tooltip": "",
+ "link": "",
+ "icon": null,
+ "iconPosition": "",
+ "blend": false,
+ "fields": [
+ {
+ "name": "num",
+ "type": "int",
+ "visibility": "private"
+ },
+ {
+ "name": "timeout",
+ "type": "int",
+ "visibility": "private"
+ },
+ {
+ "name": "pid",
+ "type": "",
+ "visibility": "private"
+ }
+ ],
+ "methods": [
+ {
+ "name": "getStatus()",
+ "return": "Enum",
+ "visibility": "public"
+ },
+ {
+ "name": "getJobs()",
+ "return": "Job[]",
+ "visibility": "public"
+ },
+ {
+ "name": "setTimeout(seconds int)",
+ "return": "void",
+ "visibility": "public"
+ }
+ ],
+ "columns": null,
+ "label": "class",
+ "fontSize": 20,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#0A0F25",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 75,
+ "labelHeight": 36,
+ "zIndex": 0,
+ "level": 1,
+ "primaryAccentColor": "#0D32B2",
+ "secondaryAccentColor": "#4A6FF3",
+ "neutralAccentColor": "#676C7E"
+ },
+ {
+ "id": "text",
+ "type": "",
+ "pos": {
+ "x": 2030,
+ "y": 540
+ },
+ "width": 400,
+ "height": 800,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "#F7F8FE",
+ "stroke": "#0D32B2",
+ "shadow": false,
+ "3d": false,
+ "multiple": false,
+ "tooltip": "",
+ "link": "",
+ "icon": null,
+ "iconPosition": "",
+ "blend": false,
+ "fields": null,
+ "methods": null,
+ "columns": null,
+ "label": "markdown text expanded to 800x400",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#0A0F25",
+ "italic": false,
+ "bold": true,
+ "underline": false,
+ "labelWidth": 266,
+ "labelHeight": 26,
+ "labelPosition": "INSIDE_MIDDLE_CENTER",
+ "zIndex": 0,
+ "level": 1
+ },
+ {
+ "id": "code",
+ "type": "code",
+ "pos": {
+ "x": 2030,
+ "y": 1546
+ },
+ "width": 400,
+ "height": 300,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "#FFFFFF",
+ "stroke": "#0A0F25",
+ "shadow": false,
+ "3d": false,
+ "multiple": false,
+ "tooltip": "",
+ "link": "",
+ "icon": null,
+ "iconPosition": "",
+ "blend": false,
+ "fields": null,
+ "methods": null,
+ "columns": null,
+ "label": "a := 5\nb := a + 7\nfmt.Printf(\"%d\", b)",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "golang",
+ "color": "#0A0F25",
+ "italic": false,
+ "bold": true,
+ "underline": false,
+ "labelWidth": 196,
+ "labelHeight": 70,
+ "zIndex": 0,
+ "level": 1
+ },
+ {
+ "id": "small code",
+ "type": "code",
+ "pos": {
+ "x": 2132,
+ "y": 2052
+ },
+ "width": 196,
+ "height": 70,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "#FFFFFF",
+ "stroke": "#0A0F25",
+ "shadow": false,
+ "3d": false,
+ "multiple": false,
+ "tooltip": "",
+ "link": "",
+ "icon": null,
+ "iconPosition": "",
+ "blend": false,
+ "fields": null,
+ "methods": null,
+ "columns": null,
+ "label": "a := 5\nb := a + 7\nfmt.Printf(\"%d\", b)",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "golang",
+ "color": "#0A0F25",
+ "italic": false,
+ "bold": true,
+ "underline": false,
+ "labelWidth": 196,
+ "labelHeight": 70,
+ "zIndex": 0,
+ "level": 1
+ },
+ {
+ "id": "container",
+ "type": "",
+ "pos": {
+ "x": 2143,
+ "y": 314
+ },
+ "width": 174,
+ "height": 126,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "#F7F8FE",
+ "stroke": "#0D32B2",
+ "shadow": false,
+ "3d": false,
+ "multiple": false,
+ "tooltip": "",
+ "link": "",
+ "icon": null,
+ "iconPosition": "",
+ "blend": false,
+ "fields": null,
+ "methods": null,
+ "columns": null,
+ "label": "container",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#0A0F25",
+ "italic": false,
+ "bold": true,
+ "underline": false,
+ "labelWidth": 74,
+ "labelHeight": 26,
+ "labelPosition": "INSIDE_MIDDLE_CENTER",
+ "zIndex": 0,
+ "level": 1
+ }
+ ],
+ "connections": [
+ {
+ "id": "(cloud -> class)[0]",
+ "src": "cloud",
+ "srcArrow": "none",
+ "srcLabel": "",
+ "dst": "class",
+ "dstArrow": "triangle",
+ "dstLabel": "",
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "stroke": "#0D32B2",
+ "label": "",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#676C7E",
+ "italic": true,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 0,
+ "labelHeight": 0,
+ "labelPosition": "",
+ "labelPercentage": 0,
+ "route": [
+ {
+ "x": 1610,
+ "y": 440
+ },
+ {
+ "x": 1610,
+ "y": 740
+ }
+ ],
+ "animated": false,
+ "tooltip": "",
+ "icon": null,
+ "zIndex": 0
+ },
+ {
+ "id": "(class -> tall cylinder)[0]",
+ "src": "class",
+ "srcArrow": "none",
+ "srcLabel": "",
+ "dst": "tall cylinder",
+ "dstArrow": "triangle",
+ "dstLabel": "",
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "stroke": "#0D32B2",
+ "label": "",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#676C7E",
+ "italic": true,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 0,
+ "labelHeight": 0,
+ "labelPosition": "",
+ "labelPercentage": 0,
+ "route": [
+ {
+ "x": 1610,
+ "y": 1140
+ },
+ {
+ "x": 1610,
+ "y": 1440
+ }
+ ],
+ "animated": false,
+ "tooltip": "",
+ "icon": null,
+ "zIndex": 0
+ },
+ {
+ "id": "(tall cylinder -> users)[0]",
+ "src": "tall cylinder",
+ "srcArrow": "none",
+ "srcLabel": "",
+ "dst": "users",
+ "dstArrow": "triangle",
+ "dstLabel": "",
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "stroke": "#0D32B2",
+ "label": "",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#676C7E",
+ "italic": true,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 0,
+ "labelHeight": 0,
+ "labelPosition": "",
+ "labelPercentage": 0,
+ "route": [
+ {
+ "x": 1610,
+ "y": 1952
+ },
+ {
+ "x": 1610,
+ "y": 2052
+ }
+ ],
+ "animated": false,
+ "tooltip": "",
+ "icon": null,
+ "zIndex": 0
+ },
+ {
+ "id": "(container -> text)[0]",
+ "src": "container",
+ "srcArrow": "none",
+ "srcLabel": "",
+ "dst": "text",
+ "dstArrow": "triangle",
+ "dstLabel": "",
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "stroke": "#0D32B2",
+ "label": "",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#676C7E",
+ "italic": true,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 0,
+ "labelHeight": 0,
+ "labelPosition": "",
+ "labelPercentage": 0,
+ "route": [
+ {
+ "x": 2230,
+ "y": 440
+ },
+ {
+ "x": 2230,
+ "y": 540
+ }
+ ],
+ "animated": false,
+ "tooltip": "",
+ "icon": null,
+ "zIndex": 0
+ },
+ {
+ "id": "(text -> code)[0]",
+ "src": "text",
+ "srcArrow": "none",
+ "srcLabel": "",
+ "dst": "code",
+ "dstArrow": "triangle",
+ "dstLabel": "",
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "stroke": "#0D32B2",
+ "label": "",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#676C7E",
+ "italic": true,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 0,
+ "labelHeight": 0,
+ "labelPosition": "",
+ "labelPercentage": 0,
+ "route": [
+ {
+ "x": 2230,
+ "y": 1340
+ },
+ {
+ "x": 2230,
+ "y": 1546
+ }
+ ],
+ "animated": false,
+ "tooltip": "",
+ "icon": null,
+ "zIndex": 0
+ },
+ {
+ "id": "(code -> small code)[0]",
+ "src": "code",
+ "srcArrow": "none",
+ "srcLabel": "",
+ "dst": "small code",
+ "dstArrow": "triangle",
+ "dstLabel": "",
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "stroke": "#0D32B2",
+ "label": "",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#676C7E",
+ "italic": true,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 0,
+ "labelHeight": 0,
+ "labelPosition": "",
+ "labelPercentage": 0,
+ "route": [
+ {
+ "x": 2230,
+ "y": 1846
+ },
+ {
+ "x": 2230,
+ "y": 2052
+ }
+ ],
+ "animated": false,
+ "tooltip": "",
+ "icon": null,
+ "zIndex": 0
+ }
+ ]
+}
diff --git a/e2etests/testdata/todo/shape_set_width_height/elk/sketch.exp.svg b/e2etests/testdata/todo/shape_set_width_height/elk/sketch.exp.svg
new file mode 100644
index 000000000..509a9bf1e
--- /dev/null
+++ b/e2etests/testdata/todo/shape_set_width_height/elk/sketch.exp.svg
@@ -0,0 +1,71 @@
+
+
\ No newline at end of file
diff --git a/e2etests/todo_test.go b/e2etests/todo_test.go
index defa87cd6..d70d98367 100644
--- a/e2etests/todo_test.go
+++ b/e2etests/todo_test.go
@@ -90,6 +90,115 @@ this is a message group: {
}
}`,
},
+ {
+ // dimensions set on containers are ignored
+ name: "shape_set_width_height",
+ script: `
+containers: {
+ circle container: {
+ shape: circle
+
+ diamond: {
+ shape: diamond
+ width: 128
+ height: 64
+ }
+ }
+ diamond container: {
+ shape: diamond
+
+ circle: {
+ shape: circle
+ width: 128
+ }
+ }
+ oval container: {
+ shape: oval
+
+ hexagon: {
+ shape: hexagon
+ width: 128
+ height: 64
+ }
+ }
+ hexagon container: {
+ shape: hexagon
+
+ oval: {
+ shape: oval
+ width: 128
+ height: 64
+ }
+ }
+}
+
+cloud: {
+ shape: cloud
+ width: 512
+ height: 256
+}
+tall cylinder: {
+ shape: cylinder
+ width: 256
+ height: 512
+}
+cloud -> class -> tall cylinder -> users
+
+users: {
+ shape: sql_table
+ id: int
+ name: string
+ email: string
+ password: string
+ last_login: datetime
+
+ width: 800
+ height: 400
+}
+
+class: {
+ shape: class
+ -num: int
+ -timeout: int
+ -pid
+
+ +getStatus(): Enum
+ +getJobs(): "Job[]"
+ +setTimeout(seconds int)
+
+ width: 800
+ height: 400
+}
+
+container -> text -> code -> small code
+
+text: {
+ label: |md
+ markdown text expanded to 800x400
+|
+ height: 800
+ width: 400
+}
+
+code: |go
+ a := 5
+ b := a + 7
+ fmt.Printf("%d", b)
+| {
+ width: 400
+ height: 300
+}
+
+small code: |go
+ a := 5
+ b := a + 7
+ fmt.Printf("%d", b)
+| {
+ width: 4
+ height: 3
+}
+`,
+ },
}
runa(t, tcs)
diff --git a/testdata/d2compiler/TestCompile/dimensions_on_nonimage.exp.json b/testdata/d2compiler/TestCompile/dimensions_on_nonimage.exp.json
index 405923ccf..d094c9039 100644
--- a/testdata/d2compiler/TestCompile/dimensions_on_nonimage.exp.json
+++ b/testdata/d2compiler/TestCompile/dimensions_on_nonimage.exp.json
@@ -1,16 +1,210 @@
{
- "graph": null,
- "err": {
- "ioerr": null,
- "errs": [
- {
- "range": "d2/testdata/d2compiler/TestCompile/dimensions_on_nonimage.d2,2:1:28-2:11:38",
- "errmsg": "d2/testdata/d2compiler/TestCompile/dimensions_on_nonimage.d2:3:2: width is only applicable to image shapes."
+ "graph": {
+ "ast": {
+ "range": "d2/testdata/d2compiler/TestCompile/dimensions_on_nonimage.d2,0:0:0-5:0:54",
+ "nodes": [
+ {
+ "map_key": {
+ "range": "d2/testdata/d2compiler/TestCompile/dimensions_on_nonimage.d2,0:0:0-4:1:53",
+ "key": {
+ "range": "d2/testdata/d2compiler/TestCompile/dimensions_on_nonimage.d2,0:0:0-0:3:3",
+ "path": [
+ {
+ "unquoted_string": {
+ "range": "d2/testdata/d2compiler/TestCompile/dimensions_on_nonimage.d2,0:0:0-0:3:3",
+ "value": [
+ {
+ "string": "hey",
+ "raw_string": "hey"
+ }
+ ]
+ }
+ }
+ ]
+ },
+ "primary": {
+ "double_quoted_string": {
+ "range": "d2/testdata/d2compiler/TestCompile/dimensions_on_nonimage.d2,0:5:5-0:7:7",
+ "value": null
+ }
+ },
+ "value": {
+ "map": {
+ "range": "d2/testdata/d2compiler/TestCompile/dimensions_on_nonimage.d2,0:8:8-4:0:52",
+ "nodes": [
+ {
+ "map_key": {
+ "range": "d2/testdata/d2compiler/TestCompile/dimensions_on_nonimage.d2,1:2:12-1:16:26",
+ "key": {
+ "range": "d2/testdata/d2compiler/TestCompile/dimensions_on_nonimage.d2,1:2:12-1:7:17",
+ "path": [
+ {
+ "unquoted_string": {
+ "range": "d2/testdata/d2compiler/TestCompile/dimensions_on_nonimage.d2,1:2:12-1:7:17",
+ "value": [
+ {
+ "string": "shape",
+ "raw_string": "shape"
+ }
+ ]
+ }
+ }
+ ]
+ },
+ "primary": {},
+ "value": {
+ "unquoted_string": {
+ "range": "d2/testdata/d2compiler/TestCompile/dimensions_on_nonimage.d2,1:9:19-1:16:26",
+ "value": [
+ {
+ "string": "hexagon",
+ "raw_string": "hexagon"
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "map_key": {
+ "range": "d2/testdata/d2compiler/TestCompile/dimensions_on_nonimage.d2,2:1:28-2:11:38",
+ "key": {
+ "range": "d2/testdata/d2compiler/TestCompile/dimensions_on_nonimage.d2,2:1:28-2:6:33",
+ "path": [
+ {
+ "unquoted_string": {
+ "range": "d2/testdata/d2compiler/TestCompile/dimensions_on_nonimage.d2,2:1:28-2:6:33",
+ "value": [
+ {
+ "string": "width",
+ "raw_string": "width"
+ }
+ ]
+ }
+ }
+ ]
+ },
+ "primary": {},
+ "value": {
+ "number": {
+ "range": "d2/testdata/d2compiler/TestCompile/dimensions_on_nonimage.d2,2:8:35-2:11:38",
+ "raw": "200",
+ "value": "200"
+ }
+ }
+ }
+ },
+ {
+ "map_key": {
+ "range": "d2/testdata/d2compiler/TestCompile/dimensions_on_nonimage.d2,3:1:40-3:12:51",
+ "key": {
+ "range": "d2/testdata/d2compiler/TestCompile/dimensions_on_nonimage.d2,3:1:40-3:7:46",
+ "path": [
+ {
+ "unquoted_string": {
+ "range": "d2/testdata/d2compiler/TestCompile/dimensions_on_nonimage.d2,3:1:40-3:7:46",
+ "value": [
+ {
+ "string": "height",
+ "raw_string": "height"
+ }
+ ]
+ }
+ }
+ ]
+ },
+ "primary": {},
+ "value": {
+ "number": {
+ "range": "d2/testdata/d2compiler/TestCompile/dimensions_on_nonimage.d2,3:9:48-3:12:51",
+ "raw": "230",
+ "value": "230"
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ }
+ ]
+ },
+ "root": {
+ "id": "",
+ "id_val": "",
+ "label_dimensions": {
+ "width": 0,
+ "height": 0
},
+ "attributes": {
+ "label": {
+ "value": ""
+ },
+ "style": {},
+ "near_key": null,
+ "shape": {
+ "value": ""
+ },
+ "direction": {
+ "value": ""
+ }
+ },
+ "zIndex": 0
+ },
+ "edges": null,
+ "objects": [
{
- "range": "d2/testdata/d2compiler/TestCompile/dimensions_on_nonimage.d2,3:1:40-3:12:51",
- "errmsg": "d2/testdata/d2compiler/TestCompile/dimensions_on_nonimage.d2:4:2: height is only applicable to image shapes."
+ "id": "hey",
+ "id_val": "hey",
+ "label_dimensions": {
+ "width": 0,
+ "height": 0
+ },
+ "references": [
+ {
+ "key": {
+ "range": "d2/testdata/d2compiler/TestCompile/dimensions_on_nonimage.d2,0:0:0-0:3:3",
+ "path": [
+ {
+ "unquoted_string": {
+ "range": "d2/testdata/d2compiler/TestCompile/dimensions_on_nonimage.d2,0:0:0-0:3:3",
+ "value": [
+ {
+ "string": "hey",
+ "raw_string": "hey"
+ }
+ ]
+ }
+ }
+ ]
+ },
+ "key_path_index": 0,
+ "map_key_edge_index": 0
+ }
+ ],
+ "attributes": {
+ "label": {
+ "value": ""
+ },
+ "style": {},
+ "width": {
+ "value": "200"
+ },
+ "height": {
+ "value": "230"
+ },
+ "near_key": null,
+ "shape": {
+ "value": "hexagon"
+ },
+ "direction": {
+ "value": ""
+ }
+ },
+ "zIndex": 0
}
]
- }
+ },
+ "err": null
}
diff --git a/testdata/d2compiler/TestCompile/equal_dimensions_on_circle.exp.json b/testdata/d2compiler/TestCompile/equal_dimensions_on_circle.exp.json
new file mode 100644
index 000000000..dd0a210f2
--- /dev/null
+++ b/testdata/d2compiler/TestCompile/equal_dimensions_on_circle.exp.json
@@ -0,0 +1,16 @@
+{
+ "graph": null,
+ "err": {
+ "ioerr": null,
+ "errs": [
+ {
+ "range": "d2/testdata/d2compiler/TestCompile/equal_dimensions_on_circle.d2,2:1:26-2:11:36",
+ "errmsg": "d2/testdata/d2compiler/TestCompile/equal_dimensions_on_circle.d2:3:2: width and height must be equal for circle shapes"
+ },
+ {
+ "range": "d2/testdata/d2compiler/TestCompile/equal_dimensions_on_circle.d2,3:1:38-3:12:49",
+ "errmsg": "d2/testdata/d2compiler/TestCompile/equal_dimensions_on_circle.d2:4:2: width and height must be equal for circle shapes"
+ }
+ ]
+ }
+}
diff --git a/testdata/d2compiler/TestCompile/no_dimensions_on_containers.exp.json b/testdata/d2compiler/TestCompile/no_dimensions_on_containers.exp.json
new file mode 100644
index 000000000..ec21bacd7
--- /dev/null
+++ b/testdata/d2compiler/TestCompile/no_dimensions_on_containers.exp.json
@@ -0,0 +1,36 @@
+{
+ "graph": null,
+ "err": {
+ "ioerr": null,
+ "errs": [
+ {
+ "range": "d2/testdata/d2compiler/TestCompile/no_dimensions_on_containers.d2,4:2:54-4:12:64",
+ "errmsg": "d2/testdata/d2compiler/TestCompile/no_dimensions_on_containers.d2:5:3: width cannot be used on container: containers.circle container"
+ },
+ {
+ "range": "d2/testdata/d2compiler/TestCompile/no_dimensions_on_containers.d2,14:2:173-14:12:183",
+ "errmsg": "d2/testdata/d2compiler/TestCompile/no_dimensions_on_containers.d2:15:3: width cannot be used on container: containers.diamond container"
+ },
+ {
+ "range": "d2/testdata/d2compiler/TestCompile/no_dimensions_on_containers.d2,15:2:186-15:13:197",
+ "errmsg": "d2/testdata/d2compiler/TestCompile/no_dimensions_on_containers.d2:16:3: height cannot be used on container: containers.diamond container"
+ },
+ {
+ "range": "d2/testdata/d2compiler/TestCompile/no_dimensions_on_containers.d2,24:2:284-24:12:294",
+ "errmsg": "d2/testdata/d2compiler/TestCompile/no_dimensions_on_containers.d2:25:3: width cannot be used on container: containers.oval container"
+ },
+ {
+ "range": "d2/testdata/d2compiler/TestCompile/no_dimensions_on_containers.d2,25:2:297-25:13:308",
+ "errmsg": "d2/testdata/d2compiler/TestCompile/no_dimensions_on_containers.d2:26:3: height cannot be used on container: containers.oval container"
+ },
+ {
+ "range": "d2/testdata/d2compiler/TestCompile/no_dimensions_on_containers.d2,35:2:417-35:12:427",
+ "errmsg": "d2/testdata/d2compiler/TestCompile/no_dimensions_on_containers.d2:36:3: width cannot be used on container: containers.hexagon container"
+ },
+ {
+ "range": "d2/testdata/d2compiler/TestCompile/no_dimensions_on_containers.d2,36:2:430-36:13:441",
+ "errmsg": "d2/testdata/d2compiler/TestCompile/no_dimensions_on_containers.d2:37:3: height cannot be used on container: containers.hexagon container"
+ }
+ ]
+ }
+}
diff --git a/testdata/d2compiler/TestCompile/single_dimension_on_circle.exp.json b/testdata/d2compiler/TestCompile/single_dimension_on_circle.exp.json
new file mode 100644
index 000000000..23a5ec0d3
--- /dev/null
+++ b/testdata/d2compiler/TestCompile/single_dimension_on_circle.exp.json
@@ -0,0 +1,178 @@
+{
+ "graph": {
+ "ast": {
+ "range": "d2/testdata/d2compiler/TestCompile/single_dimension_on_circle.d2,0:0:0-4:0:40",
+ "nodes": [
+ {
+ "map_key": {
+ "range": "d2/testdata/d2compiler/TestCompile/single_dimension_on_circle.d2,0:0:0-3:1:39",
+ "key": {
+ "range": "d2/testdata/d2compiler/TestCompile/single_dimension_on_circle.d2,0:0:0-0:3:3",
+ "path": [
+ {
+ "unquoted_string": {
+ "range": "d2/testdata/d2compiler/TestCompile/single_dimension_on_circle.d2,0:0:0-0:3:3",
+ "value": [
+ {
+ "string": "hey",
+ "raw_string": "hey"
+ }
+ ]
+ }
+ }
+ ]
+ },
+ "primary": {
+ "double_quoted_string": {
+ "range": "d2/testdata/d2compiler/TestCompile/single_dimension_on_circle.d2,0:5:5-0:7:7",
+ "value": null
+ }
+ },
+ "value": {
+ "map": {
+ "range": "d2/testdata/d2compiler/TestCompile/single_dimension_on_circle.d2,0:8:8-3:0:38",
+ "nodes": [
+ {
+ "map_key": {
+ "range": "d2/testdata/d2compiler/TestCompile/single_dimension_on_circle.d2,1:1:11-1:14:24",
+ "key": {
+ "range": "d2/testdata/d2compiler/TestCompile/single_dimension_on_circle.d2,1:1:11-1:6:16",
+ "path": [
+ {
+ "unquoted_string": {
+ "range": "d2/testdata/d2compiler/TestCompile/single_dimension_on_circle.d2,1:1:11-1:6:16",
+ "value": [
+ {
+ "string": "shape",
+ "raw_string": "shape"
+ }
+ ]
+ }
+ }
+ ]
+ },
+ "primary": {},
+ "value": {
+ "unquoted_string": {
+ "range": "d2/testdata/d2compiler/TestCompile/single_dimension_on_circle.d2,1:8:18-1:14:24",
+ "value": [
+ {
+ "string": "circle",
+ "raw_string": "circle"
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "map_key": {
+ "range": "d2/testdata/d2compiler/TestCompile/single_dimension_on_circle.d2,2:1:26-2:12:37",
+ "key": {
+ "range": "d2/testdata/d2compiler/TestCompile/single_dimension_on_circle.d2,2:1:26-2:7:32",
+ "path": [
+ {
+ "unquoted_string": {
+ "range": "d2/testdata/d2compiler/TestCompile/single_dimension_on_circle.d2,2:1:26-2:7:32",
+ "value": [
+ {
+ "string": "height",
+ "raw_string": "height"
+ }
+ ]
+ }
+ }
+ ]
+ },
+ "primary": {},
+ "value": {
+ "number": {
+ "range": "d2/testdata/d2compiler/TestCompile/single_dimension_on_circle.d2,2:9:34-2:12:37",
+ "raw": "230",
+ "value": "230"
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ }
+ ]
+ },
+ "root": {
+ "id": "",
+ "id_val": "",
+ "label_dimensions": {
+ "width": 0,
+ "height": 0
+ },
+ "attributes": {
+ "label": {
+ "value": ""
+ },
+ "style": {},
+ "near_key": null,
+ "shape": {
+ "value": ""
+ },
+ "direction": {
+ "value": ""
+ }
+ },
+ "zIndex": 0
+ },
+ "edges": null,
+ "objects": [
+ {
+ "id": "hey",
+ "id_val": "hey",
+ "label_dimensions": {
+ "width": 0,
+ "height": 0
+ },
+ "references": [
+ {
+ "key": {
+ "range": "d2/testdata/d2compiler/TestCompile/single_dimension_on_circle.d2,0:0:0-0:3:3",
+ "path": [
+ {
+ "unquoted_string": {
+ "range": "d2/testdata/d2compiler/TestCompile/single_dimension_on_circle.d2,0:0:0-0:3:3",
+ "value": [
+ {
+ "string": "hey",
+ "raw_string": "hey"
+ }
+ ]
+ }
+ }
+ ]
+ },
+ "key_path_index": 0,
+ "map_key_edge_index": 0
+ }
+ ],
+ "attributes": {
+ "label": {
+ "value": ""
+ },
+ "style": {},
+ "height": {
+ "value": "230"
+ },
+ "near_key": null,
+ "shape": {
+ "value": "circle"
+ },
+ "direction": {
+ "value": ""
+ }
+ },
+ "zIndex": 0
+ }
+ ]
+ },
+ "err": null
+}