Merge pull request #1198 from gavin-ts/refactor-attributes
refactor d2graph.Attributes
This commit is contained in:
commit
a78698610c
373 changed files with 7096 additions and 7028 deletions
|
|
@ -150,7 +150,7 @@ func (c *compiler) compileMap(obj *d2graph.Object, m *d2ir.Map) {
|
|||
c.compileField(obj, f)
|
||||
}
|
||||
|
||||
switch obj.Attributes.Shape.Value {
|
||||
switch obj.Shape.Value {
|
||||
case d2target.ShapeClass:
|
||||
c.compileClass(obj)
|
||||
case d2target.ShapeSQLTable:
|
||||
|
|
@ -191,25 +191,25 @@ func (c *compiler) compileField(obj *d2graph.Object, f *d2ir.Field) {
|
|||
}
|
||||
return
|
||||
} else if isReserved {
|
||||
c.compileReserved(obj.Attributes, f)
|
||||
c.compileReserved(&obj.Attributes, f)
|
||||
return
|
||||
} else if f.Name == "style" {
|
||||
if f.Map() == nil {
|
||||
return
|
||||
}
|
||||
c.compileStyle(obj.Attributes, f.Map())
|
||||
if obj.Attributes.Style.Animated != nil {
|
||||
c.errorf(obj.Attributes.Style.Animated.MapKey, `key "animated" can only be applied to edges`)
|
||||
c.compileStyle(&obj.Attributes, f.Map())
|
||||
if obj.Style.Animated != nil {
|
||||
c.errorf(obj.Style.Animated.MapKey, `key "animated" can only be applied to edges`)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
if obj.Parent != nil {
|
||||
if obj.Parent.Attributes.Shape.Value == d2target.ShapeSQLTable {
|
||||
if obj.Parent.Shape.Value == d2target.ShapeSQLTable {
|
||||
c.errorf(f.LastRef().AST(), "sql_table columns cannot have children")
|
||||
return
|
||||
}
|
||||
if obj.Parent.Attributes.Shape.Value == d2target.ShapeClass {
|
||||
if obj.Parent.Shape.Value == d2target.ShapeClass {
|
||||
c.errorf(f.LastRef().AST(), "class fields cannot have children")
|
||||
return
|
||||
}
|
||||
|
|
@ -217,14 +217,14 @@ func (c *compiler) compileField(obj *d2graph.Object, f *d2ir.Field) {
|
|||
|
||||
obj = obj.EnsureChild(d2graphIDA([]string{f.Name}))
|
||||
if f.Primary() != nil {
|
||||
c.compileLabel(obj.Attributes, f)
|
||||
c.compileLabel(&obj.Attributes, f)
|
||||
}
|
||||
if f.Map() != nil {
|
||||
c.compileMap(obj, f.Map())
|
||||
}
|
||||
|
||||
if obj.Attributes.Label.MapKey == nil {
|
||||
obj.Attributes.Label.MapKey = f.LastPrimaryKey()
|
||||
if obj.Label.MapKey == nil {
|
||||
obj.Label.MapKey = f.LastPrimaryKey()
|
||||
}
|
||||
for _, fr := range f.References {
|
||||
if fr.Primary() {
|
||||
|
|
@ -337,18 +337,18 @@ func (c *compiler) compileReserved(attrs *d2graph.Attributes, f *d2ir.Field) {
|
|||
c.errorf(scalar, "non-integer width %#v: %s", scalar.ScalarString(), err)
|
||||
return
|
||||
}
|
||||
attrs.Width = &d2graph.Scalar{}
|
||||
attrs.Width.Value = scalar.ScalarString()
|
||||
attrs.Width.MapKey = f.LastPrimaryKey()
|
||||
attrs.WidthAttr = &d2graph.Scalar{}
|
||||
attrs.WidthAttr.Value = scalar.ScalarString()
|
||||
attrs.WidthAttr.MapKey = f.LastPrimaryKey()
|
||||
case "height":
|
||||
_, err := strconv.Atoi(scalar.ScalarString())
|
||||
if err != nil {
|
||||
c.errorf(scalar, "non-integer height %#v: %s", scalar.ScalarString(), err)
|
||||
return
|
||||
}
|
||||
attrs.Height = &d2graph.Scalar{}
|
||||
attrs.Height.Value = scalar.ScalarString()
|
||||
attrs.Height.MapKey = f.LastPrimaryKey()
|
||||
attrs.HeightAttr = &d2graph.Scalar{}
|
||||
attrs.HeightAttr.Value = scalar.ScalarString()
|
||||
attrs.HeightAttr.MapKey = f.LastPrimaryKey()
|
||||
case "top":
|
||||
v, err := strconv.Atoi(scalar.ScalarString())
|
||||
if err != nil {
|
||||
|
|
@ -530,9 +530,9 @@ func compileStyleFieldInit(attrs *d2graph.Attributes, f *d2ir.Field) {
|
|||
case "filled":
|
||||
attrs.Style.Filled = &d2graph.Scalar{MapKey: f.LastPrimaryKey()}
|
||||
case "width":
|
||||
attrs.Width = &d2graph.Scalar{MapKey: f.LastPrimaryKey()}
|
||||
attrs.WidthAttr = &d2graph.Scalar{MapKey: f.LastPrimaryKey()}
|
||||
case "height":
|
||||
attrs.Height = &d2graph.Scalar{MapKey: f.LastPrimaryKey()}
|
||||
attrs.HeightAttr = &d2graph.Scalar{MapKey: f.LastPrimaryKey()}
|
||||
case "top":
|
||||
attrs.Top = &d2graph.Scalar{MapKey: f.LastPrimaryKey()}
|
||||
case "left":
|
||||
|
|
@ -552,13 +552,13 @@ func (c *compiler) compileEdge(obj *d2graph.Object, e *d2ir.Edge) {
|
|||
}
|
||||
|
||||
if e.Primary() != nil {
|
||||
c.compileLabel(edge.Attributes, e)
|
||||
c.compileLabel(&edge.Attributes, e)
|
||||
}
|
||||
if e.Map() != nil {
|
||||
c.compileEdgeMap(edge, e.Map())
|
||||
}
|
||||
|
||||
edge.Attributes.Label.MapKey = e.LastPrimaryKey()
|
||||
edge.Label.MapKey = e.LastPrimaryKey()
|
||||
for _, er := range e.References {
|
||||
scopeObjIDA := d2ir.BoardIDA(er.Context.ScopeMap)
|
||||
scopeObj := edge.Src.Graph.Root.EnsureChildIDVal(scopeObjIDA)
|
||||
|
|
@ -604,13 +604,13 @@ func (c *compiler) compileEdgeField(edge *d2graph.Edge, f *d2ir.Field) {
|
|||
}
|
||||
_, isReserved := d2graph.SimpleReservedKeywords[keyword]
|
||||
if isReserved {
|
||||
c.compileReserved(edge.Attributes, f)
|
||||
c.compileReserved(&edge.Attributes, f)
|
||||
return
|
||||
} else if f.Name == "style" {
|
||||
if f.Map() == nil {
|
||||
return
|
||||
}
|
||||
c.compileStyle(edge.Attributes, f.Map())
|
||||
c.compileStyle(&edge.Attributes, f.Map())
|
||||
return
|
||||
}
|
||||
|
||||
|
|
@ -686,7 +686,7 @@ func (c *compiler) compileClass(obj *d2graph.Object) {
|
|||
}
|
||||
|
||||
if !strings.Contains(f.IDVal, "(") {
|
||||
typ := f.Attributes.Label.Value
|
||||
typ := f.Label.Value
|
||||
if typ == f.IDVal {
|
||||
typ = ""
|
||||
}
|
||||
|
|
@ -698,7 +698,7 @@ func (c *compiler) compileClass(obj *d2graph.Object) {
|
|||
} else {
|
||||
// TODO: Not great, AST should easily allow specifying alternate primary field
|
||||
// as an explicit label should change the name.
|
||||
returnType := f.Attributes.Label.Value
|
||||
returnType := f.Label.Value
|
||||
if returnType == f.IDVal {
|
||||
returnType = "void"
|
||||
}
|
||||
|
|
@ -725,7 +725,7 @@ func (c *compiler) compileClass(obj *d2graph.Object) {
|
|||
func (c *compiler) compileSQLTable(obj *d2graph.Object) {
|
||||
obj.SQLTable = &d2target.SQLTable{}
|
||||
for _, col := range obj.ChildrenArray {
|
||||
typ := col.Attributes.Label.Value
|
||||
typ := col.Label.Value
|
||||
if typ == col.IDVal {
|
||||
// Not great, AST should easily allow specifying alternate primary field
|
||||
// as an explicit label should change the name.
|
||||
|
|
@ -735,8 +735,8 @@ func (c *compiler) compileSQLTable(obj *d2graph.Object) {
|
|||
Name: d2target.Text{Label: col.IDVal},
|
||||
Type: d2target.Text{Label: typ},
|
||||
}
|
||||
if col.Attributes.Constraint.Value != "" {
|
||||
d2Col.Constraint = col.Attributes.Constraint.Value
|
||||
if col.Constraint.Value != "" {
|
||||
d2Col.Constraint = col.Constraint.Value
|
||||
}
|
||||
obj.SQLTable.Columns = append(obj.SQLTable.Columns, d2Col)
|
||||
}
|
||||
|
|
@ -766,35 +766,35 @@ func (c *compiler) validateKey(obj *d2graph.Object, f *d2ir.Field) {
|
|||
keyword := strings.ToLower(f.Name)
|
||||
_, isReserved := d2graph.ReservedKeywords[keyword]
|
||||
if isReserved {
|
||||
switch obj.Attributes.Shape.Value {
|
||||
switch obj.Shape.Value {
|
||||
case d2target.ShapeCircle, d2target.ShapeSquare:
|
||||
checkEqual := (keyword == "width" && obj.Attributes.Height != nil) || (keyword == "height" && obj.Attributes.Width != nil)
|
||||
if checkEqual && obj.Attributes.Width.Value != obj.Attributes.Height.Value {
|
||||
c.errorf(f.LastPrimaryKey(), "width and height must be equal for %s shapes", obj.Attributes.Shape.Value)
|
||||
checkEqual := (keyword == "width" && obj.HeightAttr != nil) || (keyword == "height" && obj.WidthAttr != nil)
|
||||
if checkEqual && obj.WidthAttr.Value != obj.HeightAttr.Value {
|
||||
c.errorf(f.LastPrimaryKey(), "width and height must be equal for %s shapes", obj.Shape.Value)
|
||||
}
|
||||
}
|
||||
|
||||
switch f.Name {
|
||||
case "style":
|
||||
if obj.Attributes.Style.ThreeDee != nil {
|
||||
if !strings.EqualFold(obj.Attributes.Shape.Value, d2target.ShapeSquare) && !strings.EqualFold(obj.Attributes.Shape.Value, d2target.ShapeRectangle) && !strings.EqualFold(obj.Attributes.Shape.Value, d2target.ShapeHexagon) {
|
||||
c.errorf(obj.Attributes.Style.ThreeDee.MapKey, `key "3d" can only be applied to squares, rectangles, and hexagons`)
|
||||
if obj.Style.ThreeDee != nil {
|
||||
if !strings.EqualFold(obj.Shape.Value, d2target.ShapeSquare) && !strings.EqualFold(obj.Shape.Value, d2target.ShapeRectangle) && !strings.EqualFold(obj.Shape.Value, d2target.ShapeHexagon) {
|
||||
c.errorf(obj.Style.ThreeDee.MapKey, `key "3d" can only be applied to squares, rectangles, and hexagons`)
|
||||
}
|
||||
}
|
||||
if obj.Attributes.Style.DoubleBorder != nil {
|
||||
if obj.Attributes.Shape.Value != "" && obj.Attributes.Shape.Value != d2target.ShapeSquare && obj.Attributes.Shape.Value != d2target.ShapeRectangle && obj.Attributes.Shape.Value != d2target.ShapeCircle && obj.Attributes.Shape.Value != d2target.ShapeOval {
|
||||
c.errorf(obj.Attributes.Style.DoubleBorder.MapKey, `key "double-border" can only be applied to squares, rectangles, circles, ovals`)
|
||||
if obj.Style.DoubleBorder != nil {
|
||||
if obj.Shape.Value != "" && obj.Shape.Value != d2target.ShapeSquare && obj.Shape.Value != d2target.ShapeRectangle && obj.Shape.Value != d2target.ShapeCircle && obj.Shape.Value != d2target.ShapeOval {
|
||||
c.errorf(obj.Style.DoubleBorder.MapKey, `key "double-border" can only be applied to squares, rectangles, circles, ovals`)
|
||||
}
|
||||
}
|
||||
case "shape":
|
||||
if obj.Attributes.Shape.Value == d2target.ShapeImage && obj.Attributes.Icon == nil {
|
||||
if obj.Shape.Value == d2target.ShapeImage && obj.Icon == nil {
|
||||
c.errorf(f.LastPrimaryKey(), `image shape must include an "icon" field`)
|
||||
}
|
||||
|
||||
in := d2target.IsShape(obj.Attributes.Shape.Value)
|
||||
_, arrowheadIn := d2target.Arrowheads[obj.Attributes.Shape.Value]
|
||||
in := d2target.IsShape(obj.Shape.Value)
|
||||
_, arrowheadIn := d2target.Arrowheads[obj.Shape.Value]
|
||||
if !in && arrowheadIn {
|
||||
c.errorf(f.LastPrimaryKey(), fmt.Sprintf(`invalid shape, can only set "%s" for arrowheads`, obj.Attributes.Shape.Value))
|
||||
c.errorf(f.LastPrimaryKey(), fmt.Sprintf(`invalid shape, can only set "%s" for arrowheads`, obj.Shape.Value))
|
||||
}
|
||||
case "grid-rows", "grid-columns", "grid-gap", "vertical-gap", "horizontal-gap":
|
||||
for _, child := range obj.ChildrenArray {
|
||||
|
|
@ -807,7 +807,7 @@ func (c *compiler) validateKey(obj *d2graph.Object, f *d2ir.Field) {
|
|||
return
|
||||
}
|
||||
|
||||
if obj.Attributes.Shape.Value == d2target.ShapeImage {
|
||||
if obj.Shape.Value == d2target.ShapeImage {
|
||||
c.errorf(f.LastRef().AST(), "image shapes cannot have children.")
|
||||
return
|
||||
}
|
||||
|
|
@ -820,9 +820,9 @@ func (c *compiler) validateKey(obj *d2graph.Object, f *d2ir.Field) {
|
|||
|
||||
func (c *compiler) validateNear(g *d2graph.Graph) {
|
||||
for _, obj := range g.Objects {
|
||||
if obj.Attributes.NearKey != nil {
|
||||
nearObj, isKey := g.Root.HasChild(d2graph.Key(obj.Attributes.NearKey))
|
||||
_, isConst := d2graph.NearConstants[d2graph.Key(obj.Attributes.NearKey)[0]]
|
||||
if obj.NearKey != nil {
|
||||
nearObj, isKey := g.Root.HasChild(d2graph.Key(obj.NearKey))
|
||||
_, isConst := d2graph.NearConstants[d2graph.Key(obj.NearKey)[0]]
|
||||
if isKey {
|
||||
// Doesn't make sense to set near to an ancestor or descendant
|
||||
nearIsAncestor := false
|
||||
|
|
@ -833,7 +833,7 @@ func (c *compiler) validateNear(g *d2graph.Graph) {
|
|||
}
|
||||
}
|
||||
if nearIsAncestor {
|
||||
c.errorf(obj.Attributes.NearKey, "near keys cannot be set to an ancestor")
|
||||
c.errorf(obj.NearKey, "near keys cannot be set to an ancestor")
|
||||
continue
|
||||
}
|
||||
nearIsDescendant := false
|
||||
|
|
@ -844,27 +844,27 @@ func (c *compiler) validateNear(g *d2graph.Graph) {
|
|||
}
|
||||
}
|
||||
if nearIsDescendant {
|
||||
c.errorf(obj.Attributes.NearKey, "near keys cannot be set to an descendant")
|
||||
c.errorf(obj.NearKey, "near keys cannot be set to an descendant")
|
||||
continue
|
||||
}
|
||||
if nearObj.OuterSequenceDiagram() != nil {
|
||||
c.errorf(obj.Attributes.NearKey, "near keys cannot be set to an object within sequence diagrams")
|
||||
c.errorf(obj.NearKey, "near keys cannot be set to an object within sequence diagrams")
|
||||
continue
|
||||
}
|
||||
if nearObj.Attributes.NearKey != nil {
|
||||
_, nearObjNearIsConst := d2graph.NearConstants[d2graph.Key(nearObj.Attributes.NearKey)[0]]
|
||||
if nearObj.NearKey != nil {
|
||||
_, nearObjNearIsConst := d2graph.NearConstants[d2graph.Key(nearObj.NearKey)[0]]
|
||||
if nearObjNearIsConst {
|
||||
c.errorf(obj.Attributes.NearKey, "near keys cannot be set to an object with a constant near key")
|
||||
c.errorf(obj.NearKey, "near keys cannot be set to an object with a constant near key")
|
||||
continue
|
||||
}
|
||||
}
|
||||
} else if isConst {
|
||||
if obj.Parent != g.Root {
|
||||
c.errorf(obj.Attributes.NearKey, "constant near keys can only be set on root level shapes")
|
||||
c.errorf(obj.NearKey, "constant near keys can only be set on root level shapes")
|
||||
continue
|
||||
}
|
||||
} else {
|
||||
c.errorf(obj.Attributes.NearKey, "near key %#v must be the absolute path to a shape or one of the following constants: %s", d2format.Format(obj.Attributes.NearKey), strings.Join(d2graph.NearConstantsArray, ", "))
|
||||
c.errorf(obj.NearKey, "near key %#v must be the absolute path to a shape or one of the following constants: %s", d2format.Format(obj.NearKey), strings.Join(d2graph.NearConstantsArray, ", "))
|
||||
continue
|
||||
}
|
||||
}
|
||||
|
|
@ -877,10 +877,10 @@ func (c *compiler) validateNear(g *d2graph.Graph) {
|
|||
var isSrcNearConst, isDstNearConst bool
|
||||
|
||||
if srcNearContainer != nil {
|
||||
_, isSrcNearConst = d2graph.NearConstants[d2graph.Key(srcNearContainer.Attributes.NearKey)[0]]
|
||||
_, isSrcNearConst = d2graph.NearConstants[d2graph.Key(srcNearContainer.NearKey)[0]]
|
||||
}
|
||||
if dstNearContainer != nil {
|
||||
_, isDstNearConst = d2graph.NearConstants[d2graph.Key(dstNearContainer.Attributes.NearKey)[0]]
|
||||
_, isDstNearConst = d2graph.NearConstants[d2graph.Key(dstNearContainer.NearKey)[0]]
|
||||
}
|
||||
|
||||
if (isSrcNearConst || isDstNearConst) && srcNearContainer != dstNearContainer {
|
||||
|
|
@ -905,11 +905,11 @@ func (c *compiler) validateEdges(g *d2graph.Graph) {
|
|||
|
||||
func (c *compiler) validateBoardLinks(g *d2graph.Graph) {
|
||||
for _, obj := range g.Objects {
|
||||
if obj.Attributes.Link == nil {
|
||||
if obj.Link == nil {
|
||||
continue
|
||||
}
|
||||
|
||||
linkKey, err := d2parser.ParseKey(obj.Attributes.Link.Value)
|
||||
linkKey, err := d2parser.ParseKey(obj.Link.Value)
|
||||
if err != nil {
|
||||
continue
|
||||
}
|
||||
|
|
@ -919,7 +919,7 @@ func (c *compiler) validateBoardLinks(g *d2graph.Graph) {
|
|||
}
|
||||
|
||||
if !hasBoard(g.RootBoard(), linkKey.IDA()) {
|
||||
c.errorf(obj.Attributes.Link.MapKey, "linked board not found")
|
||||
c.errorf(obj.Link.MapKey, "linked board not found")
|
||||
continue
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,8 +43,8 @@ x: {
|
|||
t.Fatalf("expected g.Objects[0].ID to be x: %#v", g.Objects[0])
|
||||
}
|
||||
|
||||
if g.Objects[0].Attributes.Shape.Value != d2target.ShapeCircle {
|
||||
t.Fatalf("expected g.Objects[0].Attributes.Shape.Value to be circle: %#v", g.Objects[0].Attributes.Shape.Value)
|
||||
if g.Objects[0].Shape.Value != d2target.ShapeCircle {
|
||||
t.Fatalf("expected g.Objects[0].Shape.Value to be circle: %#v", g.Objects[0].Shape.Value)
|
||||
}
|
||||
|
||||
},
|
||||
|
|
@ -65,8 +65,8 @@ x: {
|
|||
t.Fatalf("expected g.Objects[0].ID to be x: %#v", g.Objects[0])
|
||||
}
|
||||
|
||||
if g.Objects[0].Attributes.Style.Opacity.Value != "0.4" {
|
||||
t.Fatalf("expected g.Objects[0].Attributes.Style.Opacity.Value to be 0.4: %#v", g.Objects[0].Attributes.Style.Opacity.Value)
|
||||
if g.Objects[0].Style.Opacity.Value != "0.4" {
|
||||
t.Fatalf("expected g.Objects[0].Style.Opacity.Value to be 0.4: %#v", g.Objects[0].Style.Opacity.Value)
|
||||
}
|
||||
|
||||
},
|
||||
|
|
@ -102,14 +102,14 @@ x: {
|
|||
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].Shape.Value != d2target.ShapeHexagon {
|
||||
t.Fatalf("expected g.Objects[0].Shape.Value to be hexagon: %#v", g.Objects[0].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].WidthAttr.Value != "200" {
|
||||
t.Fatalf("expected g.Objects[0].Width.Value to be 200: %#v", g.Objects[0].WidthAttr.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)
|
||||
if g.Objects[0].HeightAttr.Value != "230" {
|
||||
t.Fatalf("expected g.Objects[0].Height.Value to be 230: %#v", g.Objects[0].HeightAttr.Value)
|
||||
}
|
||||
},
|
||||
},
|
||||
|
|
@ -121,7 +121,7 @@ x: {
|
|||
}
|
||||
`,
|
||||
assertions: func(t *testing.T, g *d2graph.Graph) {
|
||||
tassert.Equal(t, "200", g.Objects[0].Attributes.Top.Value)
|
||||
tassert.Equal(t, "200", g.Objects[0].Top.Value)
|
||||
},
|
||||
},
|
||||
{
|
||||
|
|
@ -160,13 +160,13 @@ d2/testdata/d2compiler/TestCompile/equal_dimensions_on_circle.d2:4:2: width and
|
|||
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].Shape.Value != d2target.ShapeCircle {
|
||||
t.Fatalf("expected Attributes.Shape.Value to be circle: %#v", g.Objects[0].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].WidthAttr != nil {
|
||||
t.Fatalf("expected Attributes.Width to be nil: %#v", g.Objects[0].WidthAttr)
|
||||
}
|
||||
if g.Objects[0].Attributes.Height == nil {
|
||||
if g.Objects[0].HeightAttr == nil {
|
||||
t.Fatalf("Attributes.Height is nil")
|
||||
}
|
||||
},
|
||||
|
|
@ -237,7 +237,7 @@ containers: {
|
|||
}
|
||||
`,
|
||||
assertions: func(t *testing.T, g *d2graph.Graph) {
|
||||
if g.Objects[0].Attributes.Icon == nil {
|
||||
if g.Objects[0].Icon == nil {
|
||||
t.Fatal("Attribute icon is nil")
|
||||
}
|
||||
},
|
||||
|
|
@ -326,7 +326,7 @@ containers: {
|
|||
if len(g.Objects) != 1 {
|
||||
t.Fatalf("expected 1 objects: %#v", g.Objects)
|
||||
}
|
||||
if g.Objects[0].Attributes.Style.StrokeWidth.Value != "0" {
|
||||
if g.Objects[0].Style.StrokeWidth.Value != "0" {
|
||||
t.Fatalf("unexpected")
|
||||
}
|
||||
},
|
||||
|
|
@ -442,8 +442,8 @@ y: "But it's real. And if it's real it can be affected ... we may not be able"
|
|||
if len(g.Root.ChildrenArray) != 2 {
|
||||
t.Fatalf("expected 2 objects at the root: %#v", len(g.Root.ChildrenArray))
|
||||
}
|
||||
if g.Objects[1].Attributes.Label.Value != "But it's real. And if it's real it can be affected ... we may not be able" {
|
||||
t.Fatalf("expected g.Objects[1].Label.Value to be last value: %#v", g.Objects[1].Attributes.Label.Value)
|
||||
if g.Objects[1].Label.Value != "But it's real. And if it's real it can be affected ... we may not be able" {
|
||||
t.Fatalf("expected g.Objects[1].Label.Value to be last value: %#v", g.Objects[1].Label.Value)
|
||||
}
|
||||
},
|
||||
},
|
||||
|
|
@ -470,8 +470,8 @@ x: {
|
|||
if len(g.Root.ChildrenArray) != 2 {
|
||||
t.Fatalf("expected 2 objects at the root: %#v", len(g.Root.ChildrenArray))
|
||||
}
|
||||
if g.Objects[0].Attributes.Label.Value != "All we are given is possibilities -- to make ourselves one thing or another." {
|
||||
t.Fatalf("expected g.Objects[0].Label.Value to be last value: %#v", g.Objects[0].Attributes.Label.Value)
|
||||
if g.Objects[0].Label.Value != "All we are given is possibilities -- to make ourselves one thing or another." {
|
||||
t.Fatalf("expected g.Objects[0].Label.Value to be last value: %#v", g.Objects[0].Label.Value)
|
||||
}
|
||||
},
|
||||
},
|
||||
|
|
@ -626,11 +626,11 @@ x: {
|
|||
if g.Edges[1].Dst.ID != "b" {
|
||||
t.Fatalf("expected g.Edges[1].Dst.ID to be b: %#v", g.Edges[1])
|
||||
}
|
||||
if g.Edges[0].Attributes.Label.Value != "Can you imagine how life could be improved if we could do away with" {
|
||||
t.Fatalf("unexpected g.Edges[0].Label: %#v", g.Edges[0].Attributes.Label)
|
||||
if g.Edges[0].Label.Value != "Can you imagine how life could be improved if we could do away with" {
|
||||
t.Fatalf("unexpected g.Edges[0].Label: %#v", g.Edges[0].Label)
|
||||
}
|
||||
if g.Edges[1].Attributes.Label.Value != "Well, it's garish, ugly, and derelicts have used it for a toilet." {
|
||||
t.Fatalf("unexpected g.Edges[1].Label: %#v", g.Edges[1].Attributes.Label)
|
||||
if g.Edges[1].Label.Value != "Well, it's garish, ugly, and derelicts have used it for a toilet." {
|
||||
t.Fatalf("unexpected g.Edges[1].Label: %#v", g.Edges[1].Label)
|
||||
}
|
||||
},
|
||||
},
|
||||
|
|
@ -656,8 +656,8 @@ x: {
|
|||
if g.Edges[0].Dst.ID != "b" {
|
||||
t.Fatalf("expected g.Edges[0].Dst.ID to be b: %#v", g.Edges[0])
|
||||
}
|
||||
if g.Edges[0].Attributes.Label.Value != "Well, it's garish, ugly, and derelicts have used it for a toilet." {
|
||||
t.Fatalf("unexpected g.Edges[0].Label: %#v", g.Edges[0].Attributes.Label)
|
||||
if g.Edges[0].Label.Value != "Well, it's garish, ugly, and derelicts have used it for a toilet." {
|
||||
t.Fatalf("unexpected g.Edges[0].Label: %#v", g.Edges[0].Label)
|
||||
}
|
||||
},
|
||||
},
|
||||
|
|
@ -756,11 +756,11 @@ x -> y -> z: "The kids will love our inflatable slides"
|
|||
t.Fatalf("expected g.Edges[1].Dst.ID to be y: %#v", g.Edges[1])
|
||||
}
|
||||
|
||||
if g.Edges[0].Attributes.Label.Value != "The kids will love our inflatable slides" {
|
||||
t.Fatalf("unexpected g.Edges[0].Attributes.Label: %#v", g.Edges[0].Attributes.Label.Value)
|
||||
if g.Edges[0].Label.Value != "The kids will love our inflatable slides" {
|
||||
t.Fatalf("unexpected g.Edges[0].Label: %#v", g.Edges[0].Label.Value)
|
||||
}
|
||||
if g.Edges[1].Attributes.Label.Value != "The kids will love our inflatable slides" {
|
||||
t.Fatalf("unexpected g.Edges[1].Attributes.Label: %#v", g.Edges[1].Attributes.Label.Value)
|
||||
if g.Edges[1].Label.Value != "The kids will love our inflatable slides" {
|
||||
t.Fatalf("unexpected g.Edges[1].Label: %#v", g.Edges[1].Label.Value)
|
||||
}
|
||||
},
|
||||
},
|
||||
|
|
@ -797,8 +797,8 @@ x -> y: one
|
|||
if !g.Edges[0].DstArrow {
|
||||
t.Fatalf("expected g.Edges[0].DstArrow to be true: %#v", g.Edges[0].DstArrow)
|
||||
}
|
||||
if g.Edges[0].Attributes.Label.Value != "two" {
|
||||
t.Fatalf("expected g.Edges[0].Attributes.Label to be two: %#v", g.Edges[0].Attributes.Label)
|
||||
if g.Edges[0].Label.Value != "two" {
|
||||
t.Fatalf("expected g.Edges[0].Label to be two: %#v", g.Edges[0].Label)
|
||||
}
|
||||
},
|
||||
},
|
||||
|
|
@ -840,8 +840,8 @@ b: {
|
|||
if !g.Edges[0].DstArrow {
|
||||
t.Fatalf("expected g.Edges[0].DstArrow to be true: %#v", g.Edges[0].DstArrow)
|
||||
}
|
||||
if g.Edges[0].Attributes.Label.Value != "two" {
|
||||
t.Fatalf("expected g.Edges[0].Attributes.Label to be two: %#v", g.Edges[0].Attributes.Label)
|
||||
if g.Edges[0].Label.Value != "two" {
|
||||
t.Fatalf("expected g.Edges[0].Label to be two: %#v", g.Edges[0].Label)
|
||||
}
|
||||
},
|
||||
},
|
||||
|
|
@ -883,8 +883,8 @@ b.(x -> y)[0]: two
|
|||
if !g.Edges[0].DstArrow {
|
||||
t.Fatalf("expected g.Edges[0].DstArrow to be true: %#v", g.Edges[0].DstArrow)
|
||||
}
|
||||
if g.Edges[0].Attributes.Label.Value != "two" {
|
||||
t.Fatalf("expected g.Edges[0].Attributes.Label to be two: %#v", g.Edges[0].Attributes.Label)
|
||||
if g.Edges[0].Label.Value != "two" {
|
||||
t.Fatalf("expected g.Edges[0].Label to be two: %#v", g.Edges[0].Label)
|
||||
}
|
||||
},
|
||||
},
|
||||
|
|
@ -936,8 +936,8 @@ x -> y: {
|
|||
if g.Edges[0].Dst.ID != "y" {
|
||||
t.Fatalf("expected g.Edges[0].Dst.ID to be y: %#v", g.Edges[0])
|
||||
}
|
||||
if g.Edges[0].Attributes.Label.Value != "Space: the final frontier. These are the voyages of the starship Enterprise." {
|
||||
t.Fatalf("unexpected g.Edges[0].Attributes.Label.Value : %#v", g.Edges[0].Attributes.Label.Value)
|
||||
if g.Edges[0].Label.Value != "Space: the final frontier. These are the voyages of the starship Enterprise." {
|
||||
t.Fatalf("unexpected g.Edges[0].Label.Value : %#v", g.Edges[0].Label.Value)
|
||||
}
|
||||
},
|
||||
},
|
||||
|
|
@ -950,8 +950,8 @@ x -> y: {
|
|||
if len(g.Edges) != 1 {
|
||||
t.Fatalf("expected 1 edge: %#v", g.Edges)
|
||||
}
|
||||
if g.Edges[0].Attributes.Label.Value != "asdf" {
|
||||
t.Fatalf("unexpected g.Edges[0].Attributes.Label.Value : %#v", g.Edges[0].Attributes.Label.Value)
|
||||
if g.Edges[0].Label.Value != "asdf" {
|
||||
t.Fatalf("unexpected g.Edges[0].Label.Value : %#v", g.Edges[0].Label.Value)
|
||||
}
|
||||
},
|
||||
},
|
||||
|
|
@ -972,7 +972,7 @@ x -> y: {
|
|||
t.Fatalf("expected 2 objects: %#v", g.Objects)
|
||||
}
|
||||
assert.String(t, "diamond", g.Edges[0].SrcArrowhead.Shape.Value)
|
||||
assert.String(t, "", g.Edges[0].Attributes.Shape.Value)
|
||||
assert.String(t, "", g.Edges[0].Shape.Value)
|
||||
// Make sure the DSL didn't change. this is a regression test where it did
|
||||
exp := `x -> y: {
|
||||
source-arrowhead: {
|
||||
|
|
@ -1025,9 +1025,9 @@ x -> y: {
|
|||
assert.String(t, "Reisner's Rule of Conceptual Inertia", g.Edges[0].SrcArrowhead.Label.Value)
|
||||
assert.String(t, "QOTD", g.Edges[0].DstArrowhead.Label.Value)
|
||||
assert.String(t, "true", g.Edges[0].DstArrowhead.Style.Filled.Value)
|
||||
assert.String(t, "", g.Edges[0].Attributes.Shape.Value)
|
||||
assert.String(t, "", g.Edges[0].Attributes.Label.Value)
|
||||
assert.JSON(t, nil, g.Edges[0].Attributes.Style.Filled)
|
||||
assert.String(t, "", g.Edges[0].Shape.Value)
|
||||
assert.String(t, "", g.Edges[0].Label.Value)
|
||||
assert.JSON(t, nil, g.Edges[0].Style.Filled)
|
||||
},
|
||||
},
|
||||
{
|
||||
|
|
@ -1044,7 +1044,7 @@ x -> y: {
|
|||
t.Fatalf("expected 2 objects: %#v", g.Objects)
|
||||
}
|
||||
assert.String(t, "diamond", g.Edges[0].SrcArrowhead.Shape.Value)
|
||||
assert.String(t, "", g.Edges[0].Attributes.Shape.Value)
|
||||
assert.String(t, "", g.Edges[0].Shape.Value)
|
||||
},
|
||||
},
|
||||
{
|
||||
|
|
@ -1061,7 +1061,7 @@ x -> y: {
|
|||
t.Fatalf("expected 2 objects: %#v", g.Objects)
|
||||
}
|
||||
assert.String(t, "triangle", g.Edges[0].SrcArrowhead.Shape.Value)
|
||||
assert.String(t, "", g.Edges[0].Attributes.Shape.Value)
|
||||
assert.String(t, "", g.Edges[0].Shape.Value)
|
||||
},
|
||||
},
|
||||
{
|
||||
|
|
@ -1087,7 +1087,7 @@ x -> y: {
|
|||
t.Fatalf("expected 2 objects: %#v", g.Objects)
|
||||
}
|
||||
assert.String(t, "yo", g.Edges[0].SrcArrowhead.Label.Value)
|
||||
assert.String(t, "", g.Edges[0].Attributes.Label.Value)
|
||||
assert.String(t, "", g.Edges[0].Label.Value)
|
||||
},
|
||||
},
|
||||
{
|
||||
|
|
@ -1106,7 +1106,7 @@ x -> y: {
|
|||
t.Fatalf("expected 2 objects: %#v", g.Objects)
|
||||
}
|
||||
assert.String(t, "diamond", g.Edges[0].SrcArrowhead.Shape.Value)
|
||||
assert.String(t, "", g.Edges[0].Attributes.Shape.Value)
|
||||
assert.String(t, "", g.Edges[0].Shape.Value)
|
||||
},
|
||||
},
|
||||
{
|
||||
|
|
@ -1128,7 +1128,7 @@ x -> y: {
|
|||
}
|
||||
assert.String(t, "diamond", g.Edges[0].SrcArrowhead.Shape.Value)
|
||||
assert.String(t, "diamond", g.Edges[0].DstArrowhead.Shape.Value)
|
||||
assert.String(t, "", g.Edges[0].Attributes.Shape.Value)
|
||||
assert.String(t, "", g.Edges[0].Shape.Value)
|
||||
},
|
||||
},
|
||||
{
|
||||
|
|
@ -1143,8 +1143,8 @@ x -> y: {
|
|||
if len(g.Edges) != 1 {
|
||||
t.Fatalf("expected 1 edge: %#v", g.Edges)
|
||||
}
|
||||
if g.Edges[0].Attributes.Style.Animated.Value != "true" {
|
||||
t.Fatalf("Edges[0].Attributes.Style.Animated.Value: %#v", g.Edges[0].Attributes.Style.Animated.Value)
|
||||
if g.Edges[0].Style.Animated.Value != "true" {
|
||||
t.Fatalf("Edges[0].Style.Animated.Value: %#v", g.Edges[0].Style.Animated.Value)
|
||||
}
|
||||
},
|
||||
},
|
||||
|
|
@ -1201,11 +1201,11 @@ x -> y -> z: {
|
|||
if len(g.Edges) != 2 {
|
||||
t.Fatalf("expected 2 edge: %#v", g.Edges)
|
||||
}
|
||||
if g.Edges[0].Attributes.Label.Value != "Space: the final frontier. These are the voyages of the starship Enterprise." {
|
||||
t.Fatalf("unexpected g.Edges[0].Attributes.Label.Value : %#v", g.Edges[0].Attributes.Label.Value)
|
||||
if g.Edges[0].Label.Value != "Space: the final frontier. These are the voyages of the starship Enterprise." {
|
||||
t.Fatalf("unexpected g.Edges[0].Label.Value : %#v", g.Edges[0].Label.Value)
|
||||
}
|
||||
if g.Edges[1].Attributes.Label.Value != "Space: the final frontier. These are the voyages of the starship Enterprise." {
|
||||
t.Fatalf("unexpected g.Edges[0].Attributes.Label.Value : %#v", g.Edges[1].Attributes.Label.Value)
|
||||
if g.Edges[1].Label.Value != "Space: the final frontier. These are the voyages of the starship Enterprise." {
|
||||
t.Fatalf("unexpected g.Edges[0].Label.Value : %#v", g.Edges[1].Label.Value)
|
||||
}
|
||||
},
|
||||
},
|
||||
|
|
@ -1226,8 +1226,8 @@ x -> y
|
|||
if len(g.Edges) != 1 {
|
||||
t.Fatalf("expected 1 edge: %#v", g.Edges)
|
||||
}
|
||||
if g.Edges[0].Attributes.Label.Value != "Space: the final frontier. These are the voyages of the starship Enterprise." {
|
||||
t.Fatalf("unexpected g.Edges[0].Attributes.Label.Value : %#v", g.Edges[0].Attributes.Label.Value)
|
||||
if g.Edges[0].Label.Value != "Space: the final frontier. These are the voyages of the starship Enterprise." {
|
||||
t.Fatalf("unexpected g.Edges[0].Label.Value : %#v", g.Edges[0].Label.Value)
|
||||
}
|
||||
},
|
||||
},
|
||||
|
|
@ -1249,8 +1249,8 @@ x -> y: {
|
|||
if len(g.Edges) != 1 {
|
||||
t.Fatalf("expected 1 edge: %#v", g.Edges)
|
||||
}
|
||||
if g.Edges[0].Attributes.Style.Opacity.Value != "0.4" {
|
||||
t.Fatalf("unexpected g.Edges[0].Attributes.Style.Opacity.Value: %#v", g.Edges[0].Attributes.Style.Opacity.Value)
|
||||
if g.Edges[0].Style.Opacity.Value != "0.4" {
|
||||
t.Fatalf("unexpected g.Edges[0].Style.Opacity.Value: %#v", g.Edges[0].Style.Opacity.Value)
|
||||
}
|
||||
},
|
||||
},
|
||||
|
|
@ -1270,11 +1270,11 @@ x -> y: {
|
|||
if len(g.Edges) != 1 {
|
||||
t.Fatalf("expected 1 edge: %#v", g.Edges)
|
||||
}
|
||||
if g.Edges[0].Attributes.Style.Opacity.Value != "0.4" {
|
||||
t.Fatalf("unexpected g.Edges[0].Attributes.Style.Opacity.Value: %#v", g.Edges[0].Attributes.Style.Opacity.Value)
|
||||
if g.Edges[0].Style.Opacity.Value != "0.4" {
|
||||
t.Fatalf("unexpected g.Edges[0].Style.Opacity.Value: %#v", g.Edges[0].Style.Opacity.Value)
|
||||
}
|
||||
if g.Edges[0].Attributes.Label.Value != "" {
|
||||
t.Fatalf("unexpected g.Edges[0].Attributes.Label.Value : %#v", g.Edges[0].Attributes.Label.Value)
|
||||
if g.Edges[0].Label.Value != "" {
|
||||
t.Fatalf("unexpected g.Edges[0].Label.Value : %#v", g.Edges[0].Label.Value)
|
||||
}
|
||||
},
|
||||
},
|
||||
|
|
@ -1293,11 +1293,11 @@ x -> y
|
|||
if len(g.Edges) != 1 {
|
||||
t.Fatalf("expected 1 edge: %#v", g.Edges)
|
||||
}
|
||||
if g.Edges[0].Attributes.Style.Opacity.Value != "0.4" {
|
||||
t.Fatalf("unexpected g.Edges[0].Attributes.Style.Opacity.Value: %#v", g.Edges[0].Attributes.Style.Opacity.Value)
|
||||
if g.Edges[0].Style.Opacity.Value != "0.4" {
|
||||
t.Fatalf("unexpected g.Edges[0].Style.Opacity.Value: %#v", g.Edges[0].Style.Opacity.Value)
|
||||
}
|
||||
if g.Edges[0].Attributes.Label.Value != "" {
|
||||
t.Fatalf("unexpected g.Edges[0].Attributes.Label.Value : %#v", g.Edges[0].Attributes.Label.Value)
|
||||
if g.Edges[0].Label.Value != "" {
|
||||
t.Fatalf("unexpected g.Edges[0].Label.Value : %#v", g.Edges[0].Label.Value)
|
||||
}
|
||||
},
|
||||
},
|
||||
|
|
@ -1317,11 +1317,11 @@ x -> y
|
|||
if len(g.Edges) != 1 {
|
||||
t.Fatalf("expected 1 edge: %#v", g.Edges)
|
||||
}
|
||||
if g.Edges[0].Attributes.Style.Opacity.Value != "0.4" {
|
||||
t.Fatalf("unexpected g.Edges[0].Attributes.Style.Opacity.Value: %#v", g.Edges[0].Attributes.Style.Opacity.Value)
|
||||
if g.Edges[0].Style.Opacity.Value != "0.4" {
|
||||
t.Fatalf("unexpected g.Edges[0].Style.Opacity.Value: %#v", g.Edges[0].Style.Opacity.Value)
|
||||
}
|
||||
if g.Edges[0].Attributes.Label.Value != "" {
|
||||
t.Fatalf("unexpected g.Edges[0].Attributes.Label.Value : %#v", g.Edges[0].Attributes.Label.Value)
|
||||
if g.Edges[0].Label.Value != "" {
|
||||
t.Fatalf("unexpected g.Edges[0].Label.Value : %#v", g.Edges[0].Label.Value)
|
||||
}
|
||||
},
|
||||
},
|
||||
|
|
@ -1342,11 +1342,11 @@ x.(a -> b)[0].style.opacity: 0.4
|
|||
if len(g.Edges) != 1 {
|
||||
t.Fatalf("expected 1 edge: %#v", g.Edges)
|
||||
}
|
||||
if g.Edges[0].Attributes.Style.Opacity.Value != "0.4" {
|
||||
t.Fatalf("unexpected g.Edges[0].Attributes.Style.Opacity.Value: %#v", g.Edges[0].Attributes.Style.Opacity.Value)
|
||||
if g.Edges[0].Style.Opacity.Value != "0.4" {
|
||||
t.Fatalf("unexpected g.Edges[0].Style.Opacity.Value: %#v", g.Edges[0].Style.Opacity.Value)
|
||||
}
|
||||
if g.Edges[0].Attributes.Label.Value != "" {
|
||||
t.Fatalf("unexpected g.Edges[0].Attributes.Label.Value : %#v", g.Edges[0].Attributes.Label.Value)
|
||||
if g.Edges[0].Label.Value != "" {
|
||||
t.Fatalf("unexpected g.Edges[0].Label.Value : %#v", g.Edges[0].Label.Value)
|
||||
}
|
||||
},
|
||||
},
|
||||
|
|
@ -1367,11 +1367,11 @@ x: {
|
|||
if len(g.Edges) != 1 {
|
||||
t.Fatalf("expected 1 edge: %#v", g.Edges)
|
||||
}
|
||||
if g.Edges[0].Attributes.Style.Opacity.Value != "0.4" {
|
||||
t.Fatalf("unexpected g.Edges[0].Attributes.Style.Opacity.Value: %#v", g.Edges[0].Attributes.Style.Opacity.Value)
|
||||
if g.Edges[0].Style.Opacity.Value != "0.4" {
|
||||
t.Fatalf("unexpected g.Edges[0].Style.Opacity.Value: %#v", g.Edges[0].Style.Opacity.Value)
|
||||
}
|
||||
if g.Edges[0].Attributes.Label.Value != "" {
|
||||
t.Fatalf("unexpected g.Edges[0].Attributes.Label.Value : %#v", g.Edges[0].Attributes.Label.Value)
|
||||
if g.Edges[0].Label.Value != "" {
|
||||
t.Fatalf("unexpected g.Edges[0].Label.Value : %#v", g.Edges[0].Label.Value)
|
||||
}
|
||||
},
|
||||
},
|
||||
|
|
@ -1396,11 +1396,11 @@ x: {
|
|||
if len(g.Edges) != 1 {
|
||||
t.Fatalf("expected 1 edge: %#v", g.Edges)
|
||||
}
|
||||
if g.Edges[0].Attributes.Style.Opacity.Value != "0.4" {
|
||||
t.Fatalf("unexpected g.Edges[0].Attributes.Style.Opacity.Value: %#v", g.Edges[0].Attributes.Style.Opacity.Value)
|
||||
if g.Edges[0].Style.Opacity.Value != "0.4" {
|
||||
t.Fatalf("unexpected g.Edges[0].Style.Opacity.Value: %#v", g.Edges[0].Style.Opacity.Value)
|
||||
}
|
||||
if g.Edges[0].Attributes.Label.Value != "" {
|
||||
t.Fatalf("unexpected g.Edges[0].Attributes.Label.Value : %#v", g.Edges[0].Attributes.Label.Value)
|
||||
if g.Edges[0].Label.Value != "" {
|
||||
t.Fatalf("unexpected g.Edges[0].Label.Value : %#v", g.Edges[0].Label.Value)
|
||||
}
|
||||
},
|
||||
},
|
||||
|
|
@ -1423,11 +1423,11 @@ x: {
|
|||
if len(g.Edges) != 1 {
|
||||
t.Fatalf("expected 1 edge: %#v", g.Edges)
|
||||
}
|
||||
if g.Edges[0].Attributes.Style.Opacity.Value != "0.4" {
|
||||
t.Fatalf("unexpected g.Edges[0].Attributes.Style.Opacity.Value: %#v", g.Edges[0].Attributes.Style.Opacity.Value)
|
||||
if g.Edges[0].Style.Opacity.Value != "0.4" {
|
||||
t.Fatalf("unexpected g.Edges[0].Style.Opacity.Value: %#v", g.Edges[0].Style.Opacity.Value)
|
||||
}
|
||||
if g.Edges[0].Attributes.Label.Value != "" {
|
||||
t.Fatalf("unexpected g.Edges[0].Attributes.Label.Value : %#v", g.Edges[0].Attributes.Label.Value)
|
||||
if g.Edges[0].Label.Value != "" {
|
||||
t.Fatalf("unexpected g.Edges[0].Label.Value : %#v", g.Edges[0].Label.Value)
|
||||
}
|
||||
},
|
||||
},
|
||||
|
|
@ -1452,8 +1452,8 @@ x -> y: {
|
|||
if len(g.Objects) != 1 {
|
||||
t.Fatal(g.Objects)
|
||||
}
|
||||
if g.Objects[0].Attributes.Link.Value != "https://google.com" {
|
||||
t.Fatal(g.Objects[0].Attributes.Link.Value)
|
||||
if g.Objects[0].Link.Value != "https://google.com" {
|
||||
t.Fatal(g.Objects[0].Link.Value)
|
||||
}
|
||||
},
|
||||
},
|
||||
|
|
@ -1465,8 +1465,8 @@ x -> y: {
|
|||
t.Fatal(g.Objects)
|
||||
}
|
||||
|
||||
if g.Objects[0].Attributes.Tooltip.Value != "https://google.com" {
|
||||
t.Fatal(g.Objects[0].Attributes.Tooltip.Value)
|
||||
if g.Objects[0].Tooltip.Value != "https://google.com" {
|
||||
t.Fatal(g.Objects[0].Tooltip.Value)
|
||||
}
|
||||
},
|
||||
},
|
||||
|
|
@ -1482,12 +1482,12 @@ x -> y: {
|
|||
if len(g.Objects) != 1 {
|
||||
t.Fatal(g.Objects)
|
||||
}
|
||||
if g.Objects[0].Attributes.Link.Value != "https://google.com" {
|
||||
t.Fatal(g.Objects[0].Attributes.Link.Value)
|
||||
if g.Objects[0].Link.Value != "https://google.com" {
|
||||
t.Fatal(g.Objects[0].Link.Value)
|
||||
}
|
||||
|
||||
if g.Objects[0].Attributes.Tooltip.Value != "hello world" {
|
||||
t.Fatal(g.Objects[0].Attributes.Tooltip.Value)
|
||||
if g.Objects[0].Tooltip.Value != "hello world" {
|
||||
t.Fatal(g.Objects[0].Tooltip.Value)
|
||||
}
|
||||
},
|
||||
},
|
||||
|
|
@ -1517,8 +1517,8 @@ b: {
|
|||
if len(g.Objects) != 1 {
|
||||
t.Fatal(g.Objects)
|
||||
}
|
||||
if g.Objects[0].Attributes.Link.Value != "Overview.Untitled board 7.zzzzz" {
|
||||
t.Fatal(g.Objects[0].Attributes.Link.Value)
|
||||
if g.Objects[0].Link.Value != "Overview.Untitled board 7.zzzzz" {
|
||||
t.Fatal(g.Objects[0].Link.Value)
|
||||
}
|
||||
},
|
||||
},
|
||||
|
|
@ -1603,20 +1603,20 @@ y
|
|||
if len(g.Objects) != 2 {
|
||||
t.Fatal(g.Objects)
|
||||
}
|
||||
if g.Objects[0].Attributes.NearKey == nil {
|
||||
if g.Objects[0].NearKey == nil {
|
||||
t.Fatal("missing near key")
|
||||
}
|
||||
if g.Objects[0].Attributes.Icon.Path != "orange" {
|
||||
t.Fatal(g.Objects[0].Attributes.Icon)
|
||||
if g.Objects[0].Icon.Path != "orange" {
|
||||
t.Fatal(g.Objects[0].Icon)
|
||||
}
|
||||
if g.Objects[0].Attributes.Style.Opacity.Value != "0.5" {
|
||||
t.Fatal(g.Objects[0].Attributes.Style.Opacity)
|
||||
if g.Objects[0].Style.Opacity.Value != "0.5" {
|
||||
t.Fatal(g.Objects[0].Style.Opacity)
|
||||
}
|
||||
if g.Objects[0].Attributes.Style.Stroke.Value != "red" {
|
||||
t.Fatal(g.Objects[0].Attributes.Style.Stroke)
|
||||
if g.Objects[0].Style.Stroke.Value != "red" {
|
||||
t.Fatal(g.Objects[0].Style.Stroke)
|
||||
}
|
||||
if g.Objects[0].Attributes.Style.Fill.Value != "green" {
|
||||
t.Fatal(g.Objects[0].Attributes.Style.Fill)
|
||||
if g.Objects[0].Style.Fill.Value != "green" {
|
||||
t.Fatal(g.Objects[0].Style.Fill)
|
||||
}
|
||||
},
|
||||
},
|
||||
|
|
@ -1696,7 +1696,7 @@ y -> x.style
|
|||
}
|
||||
assert.String(t, `"b\nb"`, g.Objects[0].ID)
|
||||
assert.String(t, `b
|
||||
b`, g.Objects[0].Attributes.Label.Value)
|
||||
b`, g.Objects[0].Label.Value)
|
||||
},
|
||||
},
|
||||
{
|
||||
|
|
@ -1708,7 +1708,7 @@ b`, g.Objects[0].Attributes.Label.Value)
|
|||
t.Fatal(g.Objects)
|
||||
}
|
||||
assert.String(t, "b\rb", g.Objects[0].ID)
|
||||
assert.String(t, "b\rb", g.Objects[0].Attributes.Label.Value)
|
||||
assert.String(t, "b\rb", g.Objects[0].Label.Value)
|
||||
},
|
||||
},
|
||||
{
|
||||
|
|
@ -1730,8 +1730,8 @@ b`, g.Objects[0].Attributes.Label.Value)
|
|||
if len(g.Objects[0].Class.Methods) != 0 {
|
||||
t.Fatal(len(g.Objects[0].Class.Methods))
|
||||
}
|
||||
if g.Objects[0].Attributes.Style.Opacity.Value != "0.4" {
|
||||
t.Fatal(g.Objects[0].Attributes.Style.Opacity.Value)
|
||||
if g.Objects[0].Style.Opacity.Value != "0.4" {
|
||||
t.Fatal(g.Objects[0].Style.Opacity.Value)
|
||||
}
|
||||
},
|
||||
},
|
||||
|
|
@ -1751,8 +1751,8 @@ b`, g.Objects[0].Attributes.Label.Value)
|
|||
if len(g.Objects[0].SQLTable.Columns) != 1 {
|
||||
t.Fatal(len(g.Objects[0].SQLTable.Columns))
|
||||
}
|
||||
if g.Objects[0].Attributes.Style.Opacity.Value != "0.4" {
|
||||
t.Fatal(g.Objects[0].Attributes.Style.Opacity.Value)
|
||||
if g.Objects[0].Style.Opacity.Value != "0.4" {
|
||||
t.Fatal(g.Objects[0].Style.Opacity.Value)
|
||||
}
|
||||
},
|
||||
},
|
||||
|
|
@ -1775,8 +1775,8 @@ b`, g.Objects[0].Attributes.Label.Value)
|
|||
if len(g.Objects[0].SQLTable.Columns) != 1 {
|
||||
t.Fatal(len(g.Objects[0].SQLTable.Columns))
|
||||
}
|
||||
if g.Objects[0].Attributes.Style.Opacity.Value != "0.4" {
|
||||
t.Fatal(g.Objects[0].Attributes.Style.Opacity.Value)
|
||||
if g.Objects[0].Style.Opacity.Value != "0.4" {
|
||||
t.Fatal(g.Objects[0].Style.Opacity.Value)
|
||||
}
|
||||
},
|
||||
},
|
||||
|
|
@ -1796,7 +1796,7 @@ x.y -> a.b: {
|
|||
}
|
||||
`,
|
||||
assertions: func(t *testing.T, g *d2graph.Graph) {
|
||||
tassert.Equal(t, "true", g.Edges[0].Attributes.Style.Animated.Value)
|
||||
tassert.Equal(t, "true", g.Edges[0].Style.Animated.Value)
|
||||
},
|
||||
},
|
||||
{
|
||||
|
|
@ -1901,7 +1901,7 @@ dst.id <-> src.dst_id
|
|||
}
|
||||
`,
|
||||
assertions: func(t *testing.T, g *d2graph.Graph) {
|
||||
assert.String(t, "sequence_diagram", g.Objects[0].Attributes.Shape.Value)
|
||||
assert.String(t, "sequence_diagram", g.Objects[0].Shape.Value)
|
||||
},
|
||||
},
|
||||
{
|
||||
|
|
@ -1948,7 +1948,7 @@ b
|
|||
text: `shape: sequence_diagram
|
||||
`,
|
||||
assertions: func(t *testing.T, g *d2graph.Graph) {
|
||||
assert.String(t, "sequence_diagram", g.Root.Attributes.Shape.Value)
|
||||
assert.String(t, "sequence_diagram", g.Root.Shape.Value)
|
||||
},
|
||||
},
|
||||
{
|
||||
|
|
@ -2028,7 +2028,7 @@ ok: {
|
|||
|
||||
text: `direction: right`,
|
||||
assertions: func(t *testing.T, g *d2graph.Graph) {
|
||||
assert.String(t, "right", g.Root.Attributes.Direction.Value)
|
||||
assert.String(t, "right", g.Root.Direction.Value)
|
||||
},
|
||||
},
|
||||
{
|
||||
|
|
@ -2036,7 +2036,7 @@ ok: {
|
|||
|
||||
text: `x`,
|
||||
assertions: func(t *testing.T, g *d2graph.Graph) {
|
||||
assert.String(t, "", g.Objects[0].Attributes.Direction.Value)
|
||||
assert.String(t, "", g.Objects[0].Direction.Value)
|
||||
},
|
||||
},
|
||||
{
|
||||
|
|
@ -2046,7 +2046,7 @@ ok: {
|
|||
direction: left
|
||||
}`,
|
||||
assertions: func(t *testing.T, g *d2graph.Graph) {
|
||||
assert.String(t, "left", g.Objects[0].Attributes.Direction.Value)
|
||||
assert.String(t, "left", g.Objects[0].Direction.Value)
|
||||
},
|
||||
},
|
||||
{
|
||||
|
|
@ -2057,7 +2057,7 @@ ok: {
|
|||
constraint: BIZ
|
||||
}`,
|
||||
assertions: func(t *testing.T, g *d2graph.Graph) {
|
||||
assert.String(t, "bar", g.Objects[0].Attributes.Label.Value)
|
||||
assert.String(t, "bar", g.Objects[0].Label.Value)
|
||||
},
|
||||
},
|
||||
{
|
||||
|
|
@ -2151,7 +2151,7 @@ layers: {
|
|||
}
|
||||
}`,
|
||||
assertions: func(t *testing.T, g *d2graph.Graph) {
|
||||
tassert.Equal(t, "root.layers.x", g.Objects[0].Attributes.Link.Value)
|
||||
tassert.Equal(t, "root.layers.x", g.Objects[0].Link.Value)
|
||||
},
|
||||
},
|
||||
{
|
||||
|
|
@ -2171,8 +2171,8 @@ scenarios: {
|
|||
}
|
||||
}`,
|
||||
assertions: func(t *testing.T, g *d2graph.Graph) {
|
||||
tassert.Equal(t, "root.layers.cat", g.Objects[0].Attributes.Link.Value)
|
||||
tassert.Equal(t, "root.layers.cat", g.Scenarios[0].Objects[0].Attributes.Link.Value)
|
||||
tassert.Equal(t, "root.layers.cat", g.Objects[0].Link.Value)
|
||||
tassert.Equal(t, "root.layers.cat", g.Scenarios[0].Objects[0].Link.Value)
|
||||
},
|
||||
},
|
||||
{
|
||||
|
|
@ -2205,7 +2205,7 @@ layers: {
|
|||
}
|
||||
}`,
|
||||
assertions: func(t *testing.T, g *d2graph.Graph) {
|
||||
tassert.Equal(t, "root.layers.x.layers.x", g.Objects[0].Attributes.Link.Value)
|
||||
tassert.Equal(t, "root.layers.x.layers.x", g.Objects[0].Link.Value)
|
||||
},
|
||||
},
|
||||
{
|
||||
|
|
@ -2219,7 +2219,7 @@ layers: {
|
|||
}
|
||||
}`,
|
||||
assertions: func(t *testing.T, g *d2graph.Graph) {
|
||||
tassert.Equal(t, "root.layers.x", g.Objects[1].Attributes.Link.Value)
|
||||
tassert.Equal(t, "root.layers.x", g.Objects[1].Link.Value)
|
||||
},
|
||||
},
|
||||
{
|
||||
|
|
@ -2237,9 +2237,9 @@ layers: {
|
|||
}
|
||||
}`,
|
||||
assertions: func(t *testing.T, g *d2graph.Graph) {
|
||||
tassert.NotNil(t, g.Layers[0].Layers[0].Objects[0].Attributes.Link.Value)
|
||||
tassert.Equal(t, "root.layers.x", g.Layers[0].Layers[0].Objects[0].Attributes.Link.Value)
|
||||
tassert.Equal(t, "root.layers.x", g.Layers[0].Layers[0].Objects[1].Attributes.Link.Value)
|
||||
tassert.NotNil(t, g.Layers[0].Layers[0].Objects[0].Link.Value)
|
||||
tassert.Equal(t, "root.layers.x", g.Layers[0].Layers[0].Objects[0].Link.Value)
|
||||
tassert.Equal(t, "root.layers.x", g.Layers[0].Layers[0].Objects[1].Link.Value)
|
||||
},
|
||||
},
|
||||
{
|
||||
|
|
@ -2289,7 +2289,7 @@ obj {
|
|||
}
|
||||
`,
|
||||
assertions: func(t *testing.T, g *d2graph.Graph) {
|
||||
tassert.Equal(t, "200", g.Objects[0].Attributes.GridRows.Value)
|
||||
tassert.Equal(t, "200", g.Objects[0].GridRows.Value)
|
||||
},
|
||||
},
|
||||
{
|
||||
|
|
@ -2362,16 +2362,16 @@ nostar -> 1star: { class: path }
|
|||
`,
|
||||
assertions: func(t *testing.T, g *d2graph.Graph) {
|
||||
tassert.Equal(t, 3, len(g.Objects))
|
||||
tassert.Equal(t, "dragon_ball", g.Objects[0].Attributes.Classes[0])
|
||||
tassert.Equal(t, "", g.Objects[0].Attributes.Label.Value)
|
||||
tassert.Equal(t, "dragon_ball", g.Objects[0].Classes[0])
|
||||
tassert.Equal(t, "", g.Objects[0].Label.Value)
|
||||
// Class field overrides primary
|
||||
tassert.Equal(t, "", g.Objects[1].Attributes.Label.Value)
|
||||
tassert.Equal(t, "**", g.Objects[2].Attributes.Label.Value)
|
||||
tassert.Equal(t, "orange", g.Objects[0].Attributes.Style.Fill.Value)
|
||||
tassert.Equal(t, "red", g.Objects[1].Attributes.Style.Fill.Value)
|
||||
tassert.Equal(t, "", g.Objects[1].Label.Value)
|
||||
tassert.Equal(t, "**", g.Objects[2].Label.Value)
|
||||
tassert.Equal(t, "orange", g.Objects[0].Style.Fill.Value)
|
||||
tassert.Equal(t, "red", g.Objects[1].Style.Fill.Value)
|
||||
|
||||
tassert.Equal(t, "4", g.Edges[0].Attributes.Style.StrokeWidth.Value)
|
||||
tassert.Equal(t, "then", g.Edges[0].Attributes.Label.Value)
|
||||
tassert.Equal(t, "4", g.Edges[0].Style.StrokeWidth.Value)
|
||||
tassert.Equal(t, "then", g.Edges[0].Label.Value)
|
||||
},
|
||||
},
|
||||
{
|
||||
|
|
@ -2386,7 +2386,7 @@ classes.x.shape: diamond
|
|||
`,
|
||||
assertions: func(t *testing.T, g *d2graph.Graph) {
|
||||
tassert.Equal(t, 1, len(g.Objects))
|
||||
tassert.Equal(t, "diamond", g.Objects[0].Attributes.Shape.Value)
|
||||
tassert.Equal(t, "diamond", g.Objects[0].Shape.Value)
|
||||
},
|
||||
},
|
||||
{
|
||||
|
|
|
|||
|
|
@ -42,10 +42,10 @@ func Export(ctx context.Context, g *d2graph.Graph, fontFamily *d2fonts.FontFamil
|
|||
func applyTheme(shape *d2target.Shape, obj *d2graph.Object, theme *d2themes.Theme) {
|
||||
shape.Stroke = obj.GetStroke(shape.StrokeDash)
|
||||
shape.Fill = obj.GetFill()
|
||||
if obj.Attributes.Shape.Value == d2target.ShapeText {
|
||||
if obj.Shape.Value == d2target.ShapeText {
|
||||
shape.Color = color.N1
|
||||
}
|
||||
if obj.Attributes.Shape.Value == d2target.ShapeSQLTable || obj.Attributes.Shape.Value == d2target.ShapeClass {
|
||||
if obj.Shape.Value == d2target.ShapeSQLTable || obj.Shape.Value == d2target.ShapeClass {
|
||||
shape.PrimaryAccentColor = color.B2
|
||||
shape.SecondaryAccentColor = color.AA2
|
||||
shape.NeutralAccentColor = color.N2
|
||||
|
|
@ -72,64 +72,64 @@ func applyTheme(shape *d2target.Shape, obj *d2graph.Object, theme *d2themes.Them
|
|||
}
|
||||
|
||||
func applyStyles(shape *d2target.Shape, obj *d2graph.Object) {
|
||||
if obj.Attributes.Style.Opacity != nil {
|
||||
shape.Opacity, _ = strconv.ParseFloat(obj.Attributes.Style.Opacity.Value, 64)
|
||||
if obj.Style.Opacity != nil {
|
||||
shape.Opacity, _ = strconv.ParseFloat(obj.Style.Opacity.Value, 64)
|
||||
}
|
||||
if obj.Attributes.Style.StrokeDash != nil {
|
||||
shape.StrokeDash, _ = strconv.ParseFloat(obj.Attributes.Style.StrokeDash.Value, 64)
|
||||
if obj.Style.StrokeDash != nil {
|
||||
shape.StrokeDash, _ = strconv.ParseFloat(obj.Style.StrokeDash.Value, 64)
|
||||
}
|
||||
if obj.Attributes.Style.Fill != nil {
|
||||
shape.Fill = obj.Attributes.Style.Fill.Value
|
||||
} else if obj.Attributes.Shape.Value == d2target.ShapeText {
|
||||
if obj.Style.Fill != nil {
|
||||
shape.Fill = obj.Style.Fill.Value
|
||||
} else if obj.Shape.Value == d2target.ShapeText {
|
||||
shape.Fill = "transparent"
|
||||
}
|
||||
if obj.Attributes.Style.FillPattern != nil {
|
||||
shape.FillPattern = obj.Attributes.Style.FillPattern.Value
|
||||
if obj.Style.FillPattern != nil {
|
||||
shape.FillPattern = obj.Style.FillPattern.Value
|
||||
}
|
||||
if obj.Attributes.Style.Stroke != nil {
|
||||
shape.Stroke = obj.Attributes.Style.Stroke.Value
|
||||
if obj.Style.Stroke != nil {
|
||||
shape.Stroke = obj.Style.Stroke.Value
|
||||
}
|
||||
if obj.Attributes.Style.StrokeWidth != nil {
|
||||
shape.StrokeWidth, _ = strconv.Atoi(obj.Attributes.Style.StrokeWidth.Value)
|
||||
if obj.Style.StrokeWidth != nil {
|
||||
shape.StrokeWidth, _ = strconv.Atoi(obj.Style.StrokeWidth.Value)
|
||||
}
|
||||
if obj.Attributes.Style.Shadow != nil {
|
||||
shape.Shadow, _ = strconv.ParseBool(obj.Attributes.Style.Shadow.Value)
|
||||
if obj.Style.Shadow != nil {
|
||||
shape.Shadow, _ = strconv.ParseBool(obj.Style.Shadow.Value)
|
||||
}
|
||||
if obj.Attributes.Style.ThreeDee != nil {
|
||||
shape.ThreeDee, _ = strconv.ParseBool(obj.Attributes.Style.ThreeDee.Value)
|
||||
if obj.Style.ThreeDee != nil {
|
||||
shape.ThreeDee, _ = strconv.ParseBool(obj.Style.ThreeDee.Value)
|
||||
}
|
||||
if obj.Attributes.Style.Multiple != nil {
|
||||
shape.Multiple, _ = strconv.ParseBool(obj.Attributes.Style.Multiple.Value)
|
||||
if obj.Style.Multiple != nil {
|
||||
shape.Multiple, _ = strconv.ParseBool(obj.Style.Multiple.Value)
|
||||
}
|
||||
if obj.Attributes.Style.BorderRadius != nil {
|
||||
shape.BorderRadius, _ = strconv.Atoi(obj.Attributes.Style.BorderRadius.Value)
|
||||
if obj.Style.BorderRadius != nil {
|
||||
shape.BorderRadius, _ = strconv.Atoi(obj.Style.BorderRadius.Value)
|
||||
}
|
||||
|
||||
if obj.Attributes.Style.FontColor != nil {
|
||||
shape.Color = obj.Attributes.Style.FontColor.Value
|
||||
if obj.Style.FontColor != nil {
|
||||
shape.Color = obj.Style.FontColor.Value
|
||||
}
|
||||
if obj.Attributes.Style.Italic != nil {
|
||||
shape.Italic, _ = strconv.ParseBool(obj.Attributes.Style.Italic.Value)
|
||||
if obj.Style.Italic != nil {
|
||||
shape.Italic, _ = strconv.ParseBool(obj.Style.Italic.Value)
|
||||
}
|
||||
if obj.Attributes.Style.Bold != nil {
|
||||
shape.Bold, _ = strconv.ParseBool(obj.Attributes.Style.Bold.Value)
|
||||
if obj.Style.Bold != nil {
|
||||
shape.Bold, _ = strconv.ParseBool(obj.Style.Bold.Value)
|
||||
}
|
||||
if obj.Attributes.Style.Underline != nil {
|
||||
shape.Underline, _ = strconv.ParseBool(obj.Attributes.Style.Underline.Value)
|
||||
if obj.Style.Underline != nil {
|
||||
shape.Underline, _ = strconv.ParseBool(obj.Style.Underline.Value)
|
||||
}
|
||||
if obj.Attributes.Style.Font != nil {
|
||||
shape.FontFamily = obj.Attributes.Style.Font.Value
|
||||
if obj.Style.Font != nil {
|
||||
shape.FontFamily = obj.Style.Font.Value
|
||||
}
|
||||
if obj.Attributes.Style.DoubleBorder != nil {
|
||||
shape.DoubleBorder, _ = strconv.ParseBool(obj.Attributes.Style.DoubleBorder.Value)
|
||||
if obj.Style.DoubleBorder != nil {
|
||||
shape.DoubleBorder, _ = strconv.ParseBool(obj.Style.DoubleBorder.Value)
|
||||
}
|
||||
}
|
||||
|
||||
func toShape(obj *d2graph.Object, theme *d2themes.Theme) d2target.Shape {
|
||||
shape := d2target.BaseShape()
|
||||
shape.SetType(obj.Attributes.Shape.Value)
|
||||
shape.SetType(obj.Shape.Value)
|
||||
shape.ID = obj.AbsID()
|
||||
shape.Classes = obj.Attributes.Classes
|
||||
shape.Classes = obj.Classes
|
||||
shape.ZIndex = obj.ZIndex
|
||||
shape.Level = int(obj.Level())
|
||||
shape.Pos = d2target.NewPoint(int(obj.TopLeft.X), int(obj.TopLeft.Y))
|
||||
|
|
@ -155,10 +155,10 @@ func toShape(obj *d2graph.Object, theme *d2themes.Theme) d2target.Shape {
|
|||
shape.Color = text.GetColor(shape.Italic)
|
||||
applyStyles(shape, obj)
|
||||
|
||||
switch obj.Attributes.Shape.Value {
|
||||
switch obj.Shape.Value {
|
||||
case d2target.ShapeCode, d2target.ShapeText:
|
||||
shape.Language = obj.Attributes.Language
|
||||
shape.Label = obj.Attributes.Label.Value
|
||||
shape.Language = obj.Language
|
||||
shape.Label = obj.Label.Value
|
||||
case d2target.ShapeClass:
|
||||
shape.Class = *obj.Class
|
||||
// The label is the header for classes and tables, which is set in client to be 4 px larger than the object's set font size
|
||||
|
|
@ -178,13 +178,13 @@ func toShape(obj *d2graph.Object, theme *d2themes.Theme) d2target.Shape {
|
|||
}
|
||||
}
|
||||
|
||||
if obj.Attributes.Tooltip != nil {
|
||||
shape.Tooltip = obj.Attributes.Tooltip.Value
|
||||
if obj.Tooltip != nil {
|
||||
shape.Tooltip = obj.Tooltip.Value
|
||||
}
|
||||
if obj.Attributes.Link != nil {
|
||||
shape.Link = obj.Attributes.Link.Value
|
||||
if obj.Link != nil {
|
||||
shape.Link = obj.Link.Value
|
||||
}
|
||||
shape.Icon = obj.Attributes.Icon
|
||||
shape.Icon = obj.Icon
|
||||
if obj.IconPosition != nil {
|
||||
shape.IconPosition = *obj.IconPosition
|
||||
}
|
||||
|
|
@ -195,7 +195,7 @@ func toShape(obj *d2graph.Object, theme *d2themes.Theme) d2target.Shape {
|
|||
func toConnection(edge *d2graph.Edge, theme *d2themes.Theme) d2target.Connection {
|
||||
connection := d2target.BaseConnection()
|
||||
connection.ID = edge.AbsID()
|
||||
connection.Classes = edge.Attributes.Classes
|
||||
connection.Classes = edge.Classes
|
||||
connection.ZIndex = edge.ZIndex
|
||||
text := edge.Text()
|
||||
|
||||
|
|
@ -236,60 +236,60 @@ func toConnection(edge *d2graph.Edge, theme *d2themes.Theme) d2target.Connection
|
|||
if theme != nil && theme.SpecialRules.NoCornerRadius {
|
||||
connection.BorderRadius = 0
|
||||
}
|
||||
if edge.Attributes.Style.BorderRadius != nil {
|
||||
connection.BorderRadius, _ = strconv.ParseFloat(edge.Attributes.Style.BorderRadius.Value, 64)
|
||||
if edge.Style.BorderRadius != nil {
|
||||
connection.BorderRadius, _ = strconv.ParseFloat(edge.Style.BorderRadius.Value, 64)
|
||||
}
|
||||
|
||||
if edge.Attributes.Style.Opacity != nil {
|
||||
connection.Opacity, _ = strconv.ParseFloat(edge.Attributes.Style.Opacity.Value, 64)
|
||||
if edge.Style.Opacity != nil {
|
||||
connection.Opacity, _ = strconv.ParseFloat(edge.Style.Opacity.Value, 64)
|
||||
}
|
||||
|
||||
if edge.Attributes.Style.StrokeDash != nil {
|
||||
connection.StrokeDash, _ = strconv.ParseFloat(edge.Attributes.Style.StrokeDash.Value, 64)
|
||||
if edge.Style.StrokeDash != nil {
|
||||
connection.StrokeDash, _ = strconv.ParseFloat(edge.Style.StrokeDash.Value, 64)
|
||||
}
|
||||
connection.Stroke = edge.GetStroke(connection.StrokeDash)
|
||||
if edge.Attributes.Style.Stroke != nil {
|
||||
connection.Stroke = edge.Attributes.Style.Stroke.Value
|
||||
if edge.Style.Stroke != nil {
|
||||
connection.Stroke = edge.Style.Stroke.Value
|
||||
}
|
||||
|
||||
if edge.Attributes.Style.StrokeWidth != nil {
|
||||
connection.StrokeWidth, _ = strconv.Atoi(edge.Attributes.Style.StrokeWidth.Value)
|
||||
if edge.Style.StrokeWidth != nil {
|
||||
connection.StrokeWidth, _ = strconv.Atoi(edge.Style.StrokeWidth.Value)
|
||||
}
|
||||
|
||||
if edge.Attributes.Style.Fill != nil {
|
||||
connection.Fill = edge.Attributes.Style.Fill.Value
|
||||
if edge.Style.Fill != nil {
|
||||
connection.Fill = edge.Style.Fill.Value
|
||||
}
|
||||
|
||||
connection.FontSize = text.FontSize
|
||||
if edge.Attributes.Style.FontSize != nil {
|
||||
connection.FontSize, _ = strconv.Atoi(edge.Attributes.Style.FontSize.Value)
|
||||
if edge.Style.FontSize != nil {
|
||||
connection.FontSize, _ = strconv.Atoi(edge.Style.FontSize.Value)
|
||||
}
|
||||
|
||||
if edge.Attributes.Style.Animated != nil {
|
||||
connection.Animated, _ = strconv.ParseBool(edge.Attributes.Style.Animated.Value)
|
||||
if edge.Style.Animated != nil {
|
||||
connection.Animated, _ = strconv.ParseBool(edge.Style.Animated.Value)
|
||||
}
|
||||
|
||||
if edge.Attributes.Tooltip != nil {
|
||||
connection.Tooltip = edge.Attributes.Tooltip.Value
|
||||
if edge.Tooltip != nil {
|
||||
connection.Tooltip = edge.Tooltip.Value
|
||||
}
|
||||
connection.Icon = edge.Attributes.Icon
|
||||
connection.Icon = edge.Icon
|
||||
|
||||
if edge.Attributes.Style.Italic != nil {
|
||||
connection.Italic, _ = strconv.ParseBool(edge.Attributes.Style.Italic.Value)
|
||||
if edge.Style.Italic != nil {
|
||||
connection.Italic, _ = strconv.ParseBool(edge.Style.Italic.Value)
|
||||
}
|
||||
|
||||
connection.Color = text.GetColor(connection.Italic)
|
||||
if edge.Attributes.Style.FontColor != nil {
|
||||
connection.Color = edge.Attributes.Style.FontColor.Value
|
||||
if edge.Style.FontColor != nil {
|
||||
connection.Color = edge.Style.FontColor.Value
|
||||
}
|
||||
if edge.Attributes.Style.Bold != nil {
|
||||
connection.Bold, _ = strconv.ParseBool(edge.Attributes.Style.Bold.Value)
|
||||
if edge.Style.Bold != nil {
|
||||
connection.Bold, _ = strconv.ParseBool(edge.Style.Bold.Value)
|
||||
}
|
||||
if theme != nil && theme.SpecialRules.Mono {
|
||||
connection.FontFamily = "mono"
|
||||
}
|
||||
if edge.Attributes.Style.Font != nil {
|
||||
connection.FontFamily = edge.Attributes.Style.Font.Value
|
||||
if edge.Style.Font != nil {
|
||||
connection.FontFamily = edge.Style.Font.Value
|
||||
}
|
||||
connection.Label = text.Text
|
||||
connection.LabelWidth = text.Dimensions.Width
|
||||
|
|
|
|||
|
|
@ -56,10 +56,9 @@ type Graph struct {
|
|||
func NewGraph() *Graph {
|
||||
d := &Graph{}
|
||||
d.Root = &Object{
|
||||
Graph: d,
|
||||
Parent: nil,
|
||||
Children: make(map[string]*Object),
|
||||
Attributes: &Attributes{},
|
||||
Graph: d,
|
||||
Parent: nil,
|
||||
Children: make(map[string]*Object),
|
||||
}
|
||||
return d
|
||||
}
|
||||
|
|
@ -90,11 +89,10 @@ type Object struct {
|
|||
// IDVal: yes'"
|
||||
//
|
||||
// ID allows joining on . naively and construct a valid D2 key path
|
||||
ID string `json:"id"`
|
||||
IDVal string `json:"id_val"`
|
||||
Map *d2ast.Map `json:"-"`
|
||||
LabelDimensions d2target.TextDimensions `json:"label_dimensions"`
|
||||
References []Reference `json:"references,omitempty"`
|
||||
ID string `json:"id"`
|
||||
IDVal string `json:"id_val"`
|
||||
Map *d2ast.Map `json:"-"`
|
||||
References []Reference `json:"references,omitempty"`
|
||||
|
||||
*geo.Box `json:"box,omitempty"`
|
||||
LabelPosition *string `json:"labelPosition,omitempty"`
|
||||
|
|
@ -106,20 +104,22 @@ type Object struct {
|
|||
Children map[string]*Object `json:"-"`
|
||||
ChildrenArray []*Object `json:"-"`
|
||||
|
||||
Attributes *Attributes `json:"attributes,omitempty"`
|
||||
Attributes `json:"attributes"`
|
||||
|
||||
ZIndex int `json:"zIndex"`
|
||||
}
|
||||
|
||||
type Attributes struct {
|
||||
Label Scalar `json:"label"`
|
||||
Label Scalar `json:"label"`
|
||||
LabelDimensions d2target.TextDimensions `json:"labelDimensions"`
|
||||
|
||||
Style Style `json:"style"`
|
||||
Icon *url.URL `json:"icon,omitempty"`
|
||||
Tooltip *Scalar `json:"tooltip,omitempty"`
|
||||
Link *Scalar `json:"link,omitempty"`
|
||||
|
||||
Width *Scalar `json:"width,omitempty"`
|
||||
Height *Scalar `json:"height,omitempty"`
|
||||
WidthAttr *Scalar `json:"width,omitempty"`
|
||||
HeightAttr *Scalar `json:"height,omitempty"`
|
||||
|
||||
Top *Scalar `json:"top,omitempty"`
|
||||
Left *Scalar `json:"left,omitempty"`
|
||||
|
|
@ -412,7 +412,7 @@ func (l ContainerLevel) LabelSize() int {
|
|||
|
||||
func (obj *Object) GetFill() string {
|
||||
level := int(obj.Level())
|
||||
shape := obj.Attributes.Shape.Value
|
||||
shape := obj.Shape.Value
|
||||
|
||||
if strings.EqualFold(shape, d2target.ShapeSQLTable) || strings.EqualFold(shape, d2target.ShapeClass) {
|
||||
return color.N1
|
||||
|
|
@ -491,7 +491,7 @@ func (obj *Object) GetFill() string {
|
|||
}
|
||||
|
||||
func (obj *Object) GetStroke(dashGapSize interface{}) string {
|
||||
shape := obj.Attributes.Shape.Value
|
||||
shape := obj.Shape.Value
|
||||
if strings.EqualFold(shape, d2target.ShapeCode) ||
|
||||
strings.EqualFold(shape, d2target.ShapeText) {
|
||||
return color.N1
|
||||
|
|
@ -518,10 +518,10 @@ func (obj *Object) IsContainer() bool {
|
|||
}
|
||||
|
||||
func (obj *Object) HasOutsideBottomLabel() bool {
|
||||
if obj == nil || obj.Attributes == nil {
|
||||
if obj == nil {
|
||||
return false
|
||||
}
|
||||
switch obj.Attributes.Shape.Value {
|
||||
switch obj.Shape.Value {
|
||||
case d2target.ShapeImage, d2target.ShapePerson:
|
||||
return true
|
||||
default:
|
||||
|
|
@ -530,14 +530,14 @@ func (obj *Object) HasOutsideBottomLabel() bool {
|
|||
}
|
||||
|
||||
func (obj *Object) HasLabel() bool {
|
||||
if obj == nil || obj.Attributes == nil {
|
||||
if obj == nil {
|
||||
return false
|
||||
}
|
||||
switch obj.Attributes.Shape.Value {
|
||||
switch obj.Shape.Value {
|
||||
case d2target.ShapeText, d2target.ShapeClass, d2target.ShapeSQLTable, d2target.ShapeCode:
|
||||
return false
|
||||
default:
|
||||
return obj.Attributes.Label.Value != ""
|
||||
return obj.Label.Value != ""
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -556,12 +556,12 @@ func (obj *Object) AbsIDArray() []string {
|
|||
}
|
||||
|
||||
func (obj *Object) Text() *d2target.MText {
|
||||
isBold := !obj.IsContainer() && obj.Attributes.Shape.Value != "text"
|
||||
isBold := !obj.IsContainer() && obj.Shape.Value != "text"
|
||||
isItalic := false
|
||||
if obj.Attributes.Style.Bold != nil && obj.Attributes.Style.Bold.Value == "true" {
|
||||
if obj.Style.Bold != nil && obj.Style.Bold.Value == "true" {
|
||||
isBold = true
|
||||
}
|
||||
if obj.Attributes.Style.Italic != nil && obj.Attributes.Style.Italic.Value == "true" {
|
||||
if obj.Style.Italic != nil && obj.Style.Italic.Value == "true" {
|
||||
isItalic = true
|
||||
}
|
||||
fontSize := d2fonts.FONT_SIZE_M
|
||||
|
|
@ -571,14 +571,14 @@ func (obj *Object) Text() *d2target.MText {
|
|||
}
|
||||
|
||||
if obj.OuterSequenceDiagram() == nil {
|
||||
if obj.IsContainer() && obj.Attributes.Shape.Value != "text" {
|
||||
if obj.IsContainer() && obj.Shape.Value != "text" {
|
||||
fontSize = obj.Level().LabelSize()
|
||||
}
|
||||
} else {
|
||||
isBold = false
|
||||
}
|
||||
if obj.Attributes.Style.FontSize != nil {
|
||||
fontSize, _ = strconv.Atoi(obj.Attributes.Style.FontSize.Value)
|
||||
if obj.Style.FontSize != nil {
|
||||
fontSize, _ = strconv.Atoi(obj.Style.FontSize.Value)
|
||||
}
|
||||
// Class and Table objects have Label set to header
|
||||
if obj.Class != nil || obj.SQLTable != nil {
|
||||
|
|
@ -588,12 +588,12 @@ func (obj *Object) Text() *d2target.MText {
|
|||
isBold = false
|
||||
}
|
||||
return &d2target.MText{
|
||||
Text: obj.Attributes.Label.Value,
|
||||
Text: obj.Label.Value,
|
||||
FontSize: fontSize,
|
||||
IsBold: isBold,
|
||||
IsItalic: isItalic,
|
||||
Language: obj.Attributes.Language,
|
||||
Shape: obj.Attributes.Shape.Value,
|
||||
Language: obj.Language,
|
||||
Shape: obj.Shape.Value,
|
||||
|
||||
Dimensions: obj.LabelDimensions,
|
||||
}
|
||||
|
|
@ -608,7 +608,7 @@ func (obj *Object) newObject(id string) *Object {
|
|||
child := &Object{
|
||||
ID: id,
|
||||
IDVal: idval,
|
||||
Attributes: &Attributes{
|
||||
Attributes: Attributes{
|
||||
Label: Scalar{
|
||||
Value: idval,
|
||||
},
|
||||
|
|
@ -786,7 +786,7 @@ func (obj *Object) FindEdges(mk *d2ast.Key) ([]*Edge, bool) {
|
|||
|
||||
func (obj *Object) ensureChildEdge(ida []string) *Object {
|
||||
for i := range ida {
|
||||
switch obj.Attributes.Shape.Value {
|
||||
switch obj.Shape.Value {
|
||||
case d2target.ShapeClass, d2target.ShapeSQLTable:
|
||||
// This will only be called for connecting edges where we want to truncate to the
|
||||
// container.
|
||||
|
|
@ -865,23 +865,23 @@ 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)
|
||||
shapeType := strings.ToLower(obj.Shape.Value)
|
||||
|
||||
if obj.Attributes.Style.Font != nil {
|
||||
f := d2fonts.D2_FONT_TO_FAMILY[obj.Attributes.Style.Font.Value]
|
||||
if obj.Style.Font != nil {
|
||||
f := d2fonts.D2_FONT_TO_FAMILY[obj.Style.Font.Value]
|
||||
fontFamily = &f
|
||||
}
|
||||
|
||||
var dims *d2target.TextDimensions
|
||||
switch shapeType {
|
||||
case d2target.ShapeText:
|
||||
if obj.Attributes.Language == "latex" {
|
||||
if obj.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 != "" {
|
||||
} else if obj.Language != "" {
|
||||
var err error
|
||||
dims, err = getMarkdownDimensions(mtexts, ruler, obj.Text(), fontFamily)
|
||||
if err != nil {
|
||||
|
|
@ -898,7 +898,7 @@ func (obj *Object) GetLabelSize(mtexts []*d2target.MText, ruler *textmeasure.Rul
|
|||
dims = GetTextDimensions(mtexts, ruler, obj.Text(), fontFamily)
|
||||
}
|
||||
|
||||
if shapeType == d2target.ShapeSQLTable && obj.Attributes.Label.Value == "" {
|
||||
if shapeType == d2target.ShapeSQLTable && obj.Label.Value == "" {
|
||||
// measure with placeholder text to determine height
|
||||
placeholder := *obj.Text()
|
||||
placeholder.Text = "Table"
|
||||
|
|
@ -927,7 +927,7 @@ func (obj *Object) GetDefaultSize(mtexts []*d2target.MText, ruler *textmeasure.R
|
|||
labelDims.Height += INNER_LABEL_PADDING
|
||||
}
|
||||
|
||||
switch strings.ToLower(obj.Attributes.Shape.Value) {
|
||||
switch strings.ToLower(obj.Shape.Value) {
|
||||
default:
|
||||
return d2target.NewTextDimensions(labelDims.Width, labelDims.Height), nil
|
||||
|
||||
|
|
@ -938,8 +938,8 @@ func (obj *Object) GetDefaultSize(mtexts []*d2target.MText, ruler *textmeasure.R
|
|||
maxWidth := go2.Max(12, labelDims.Width)
|
||||
|
||||
fontSize := d2fonts.FONT_SIZE_L
|
||||
if obj.Attributes.Style.FontSize != nil {
|
||||
fontSize, _ = strconv.Atoi(obj.Attributes.Style.FontSize.Value)
|
||||
if obj.Style.FontSize != nil {
|
||||
fontSize, _ = strconv.Atoi(obj.Style.FontSize.Value)
|
||||
}
|
||||
|
||||
for _, f := range obj.Class.Fields {
|
||||
|
|
@ -984,8 +984,8 @@ func (obj *Object) GetDefaultSize(mtexts []*d2target.MText, ruler *textmeasure.R
|
|||
constraintWidth := 0
|
||||
|
||||
colFontSize := d2fonts.FONT_SIZE_L
|
||||
if obj.Attributes.Style.FontSize != nil {
|
||||
colFontSize, _ = strconv.Atoi(obj.Attributes.Style.FontSize.Value)
|
||||
if obj.Style.FontSize != nil {
|
||||
colFontSize, _ = strconv.Atoi(obj.Style.FontSize.Value)
|
||||
}
|
||||
|
||||
for i := range obj.SQLTable.Columns {
|
||||
|
|
@ -1031,7 +1031,7 @@ func (obj *Object) GetDefaultSize(mtexts []*d2target.MText, ruler *textmeasure.R
|
|||
|
||||
func (obj *Object) OuterNearContainer() *Object {
|
||||
for obj != nil {
|
||||
if obj.Attributes.NearKey != nil {
|
||||
if obj.NearKey != nil {
|
||||
return obj
|
||||
}
|
||||
obj = obj.Parent
|
||||
|
|
@ -1048,9 +1048,8 @@ type Edge struct {
|
|||
SrcTableColumnIndex *int `json:"srcTableColumnIndex,omitempty"`
|
||||
DstTableColumnIndex *int `json:"dstTableColumnIndex,omitempty"`
|
||||
|
||||
LabelDimensions d2target.TextDimensions `json:"label_dimensions"`
|
||||
LabelPosition *string `json:"labelPosition,omitempty"`
|
||||
LabelPercentage *float64 `json:"labelPercentage,omitempty"`
|
||||
LabelPosition *string `json:"labelPosition,omitempty"`
|
||||
LabelPercentage *float64 `json:"labelPercentage,omitempty"`
|
||||
|
||||
IsCurve bool `json:"isCurve"`
|
||||
Route []*geo.Point `json:"route,omitempty"`
|
||||
|
|
@ -1064,7 +1063,7 @@ type Edge struct {
|
|||
DstArrowhead *Attributes `json:"dstArrowhead,omitempty"`
|
||||
|
||||
References []EdgeReference `json:"references,omitempty"`
|
||||
Attributes *Attributes `json:"attributes,omitempty"`
|
||||
Attributes `json:"attributes,omitempty"`
|
||||
|
||||
ZIndex int `json:"zIndex"`
|
||||
}
|
||||
|
|
@ -1104,15 +1103,15 @@ func (e *Edge) ArrowString() string {
|
|||
|
||||
func (e *Edge) Text() *d2target.MText {
|
||||
fontSize := d2fonts.FONT_SIZE_M
|
||||
if e.Attributes.Style.FontSize != nil {
|
||||
fontSize, _ = strconv.Atoi(e.Attributes.Style.FontSize.Value)
|
||||
if e.Style.FontSize != nil {
|
||||
fontSize, _ = strconv.Atoi(e.Style.FontSize.Value)
|
||||
}
|
||||
isBold := false
|
||||
if e.Attributes.Style.Bold != nil {
|
||||
isBold, _ = strconv.ParseBool(e.Attributes.Style.Bold.Value)
|
||||
if e.Style.Bold != nil {
|
||||
isBold, _ = strconv.ParseBool(e.Style.Bold.Value)
|
||||
}
|
||||
return &d2target.MText{
|
||||
Text: e.Attributes.Label.Value,
|
||||
Text: e.Label.Value,
|
||||
FontSize: fontSize,
|
||||
IsBold: isBold,
|
||||
IsItalic: true,
|
||||
|
|
@ -1160,7 +1159,7 @@ func (obj *Object) Connect(srcID, dstID []string, srcArrow, dstArrow bool, label
|
|||
}
|
||||
|
||||
e := &Edge{
|
||||
Attributes: &Attributes{
|
||||
Attributes: Attributes{
|
||||
Label: Scalar{
|
||||
Value: label,
|
||||
},
|
||||
|
|
@ -1179,7 +1178,7 @@ func (obj *Object) Connect(srcID, dstID []string, srcArrow, dstArrow bool, label
|
|||
}
|
||||
|
||||
func addSQLTableColumnIndices(e *Edge, srcID, dstID []string, obj, src, dst *Object) {
|
||||
if src.Attributes.Shape.Value == d2target.ShapeSQLTable {
|
||||
if src.Shape.Value == d2target.ShapeSQLTable {
|
||||
if src == dst {
|
||||
// Ignore edge to column inside table.
|
||||
return
|
||||
|
|
@ -1197,7 +1196,7 @@ func addSQLTableColumnIndices(e *Edge, srcID, dstID []string, obj, src, dst *Obj
|
|||
}
|
||||
}
|
||||
}
|
||||
if dst.Attributes.Shape.Value == d2target.ShapeSQLTable {
|
||||
if dst.Shape.Value == d2target.ShapeSQLTable {
|
||||
objAbsID := obj.AbsIDArray()
|
||||
dstAbsID := dst.AbsIDArray()
|
||||
if len(objAbsID)+len(dstID) > len(dstAbsID) {
|
||||
|
|
@ -1344,16 +1343,16 @@ func (g *Graph) SetDimensions(mtexts []*d2target.MText, ruler *textmeasure.Ruler
|
|||
|
||||
var desiredWidth int
|
||||
var desiredHeight int
|
||||
if obj.Attributes.Width != nil {
|
||||
desiredWidth, _ = strconv.Atoi(obj.Attributes.Width.Value)
|
||||
if obj.WidthAttr != nil {
|
||||
desiredWidth, _ = strconv.Atoi(obj.WidthAttr.Value)
|
||||
}
|
||||
if obj.Attributes.Height != nil {
|
||||
desiredHeight, _ = strconv.Atoi(obj.Attributes.Height.Value)
|
||||
if obj.HeightAttr != nil {
|
||||
desiredHeight, _ = strconv.Atoi(obj.HeightAttr.Value)
|
||||
}
|
||||
|
||||
dslShape := strings.ToLower(obj.Attributes.Shape.Value)
|
||||
dslShape := strings.ToLower(obj.Shape.Value)
|
||||
|
||||
if obj.Attributes.Label.Value == "" &&
|
||||
if obj.Label.Value == "" &&
|
||||
dslShape != d2target.ShapeImage &&
|
||||
dslShape != d2target.ShapeSQLTable &&
|
||||
dslShape != d2target.ShapeClass {
|
||||
|
|
@ -1379,12 +1378,12 @@ func (g *Graph) SetDimensions(mtexts []*d2target.MText, ruler *textmeasure.Ruler
|
|||
continue
|
||||
}
|
||||
|
||||
if g.Theme != nil && g.Theme.SpecialRules.CapsLock && !strings.EqualFold(obj.Attributes.Shape.Value, d2target.ShapeCode) {
|
||||
if obj.Attributes.Language != "latex" && !obj.Attributes.Style.NoneTextTransform() {
|
||||
obj.Attributes.Label.Value = strings.ToUpper(obj.Attributes.Label.Value)
|
||||
if g.Theme != nil && g.Theme.SpecialRules.CapsLock && !strings.EqualFold(obj.Shape.Value, d2target.ShapeCode) {
|
||||
if obj.Language != "latex" && !obj.Style.NoneTextTransform() {
|
||||
obj.Label.Value = strings.ToUpper(obj.Label.Value)
|
||||
}
|
||||
}
|
||||
obj.Attributes.ApplyTextTransform()
|
||||
obj.ApplyTextTransform()
|
||||
|
||||
labelDims, err := obj.GetLabelSize(mtexts, ruler, fontFamily)
|
||||
if err != nil {
|
||||
|
|
@ -1394,7 +1393,7 @@ func (g *Graph) SetDimensions(mtexts []*d2target.MText, ruler *textmeasure.Ruler
|
|||
|
||||
// if there is a desired width or height, fit to content box without inner label padding for smallest minimum size
|
||||
withInnerLabelPadding := desiredWidth == 0 && desiredHeight == 0 &&
|
||||
dslShape != d2target.ShapeText && obj.Attributes.Label.Value != ""
|
||||
dslShape != d2target.ShapeText && obj.Label.Value != ""
|
||||
defaultDims, err := obj.GetDefaultSize(mtexts, ruler, fontFamily, *labelDims, withInnerLabelPadding)
|
||||
if err != nil {
|
||||
return err
|
||||
|
|
@ -1426,7 +1425,7 @@ func (g *Graph) SetDimensions(mtexts []*d2target.MText, ruler *textmeasure.Ruler
|
|||
}
|
||||
|
||||
// give shapes with icons extra padding to fit their label
|
||||
if obj.Attributes.Icon != nil {
|
||||
if obj.Icon != nil {
|
||||
labelHeight := float64(labelDims.Height + INNER_LABEL_PADDING)
|
||||
// Evenly pad enough to fit label above icon
|
||||
if desiredWidth == 0 {
|
||||
|
|
@ -1440,10 +1439,10 @@ func (g *Graph) SetDimensions(mtexts []*d2target.MText, ruler *textmeasure.Ruler
|
|||
switch shapeType {
|
||||
case shape.TABLE_TYPE, shape.CLASS_TYPE, shape.CODE_TYPE, shape.IMAGE_TYPE:
|
||||
default:
|
||||
if obj.Attributes.Link != nil {
|
||||
if obj.Link != nil {
|
||||
paddingX += 32
|
||||
}
|
||||
if obj.Attributes.Tooltip != nil {
|
||||
if obj.Tooltip != nil {
|
||||
paddingX += 32
|
||||
}
|
||||
}
|
||||
|
|
@ -1489,18 +1488,18 @@ func (g *Graph) SetDimensions(mtexts []*d2target.MText, ruler *textmeasure.Ruler
|
|||
edge.MinHeight += dims.Height + 5
|
||||
}
|
||||
|
||||
if edge.Attributes.Label.Value == "" {
|
||||
if edge.Label.Value == "" {
|
||||
continue
|
||||
}
|
||||
|
||||
if g.Theme != nil && g.Theme.SpecialRules.CapsLock && !edge.Attributes.Style.NoneTextTransform() {
|
||||
edge.Attributes.Label.Value = strings.ToUpper(edge.Attributes.Label.Value)
|
||||
if g.Theme != nil && g.Theme.SpecialRules.CapsLock && !edge.Style.NoneTextTransform() {
|
||||
edge.Label.Value = strings.ToUpper(edge.Label.Value)
|
||||
}
|
||||
edge.Attributes.ApplyTextTransform()
|
||||
edge.ApplyTextTransform()
|
||||
|
||||
usedFont := fontFamily
|
||||
if edge.Attributes.Style.Font != nil {
|
||||
f := d2fonts.D2_FONT_TO_FAMILY[edge.Attributes.Style.Font.Value]
|
||||
if edge.Style.Font != nil {
|
||||
f := d2fonts.D2_FONT_TO_FAMILY[edge.Style.Font.Value]
|
||||
usedFont = &f
|
||||
}
|
||||
|
||||
|
|
@ -1522,11 +1521,11 @@ func (g *Graph) Texts() []*d2target.MText {
|
|||
capsLock := g.Theme != nil && g.Theme.SpecialRules.CapsLock
|
||||
|
||||
for _, obj := range g.Objects {
|
||||
if obj.Attributes.Label.Value != "" {
|
||||
obj.Attributes.ApplyTextTransform()
|
||||
if obj.Label.Value != "" {
|
||||
obj.ApplyTextTransform()
|
||||
text := obj.Text()
|
||||
if capsLock && !strings.EqualFold(obj.Attributes.Shape.Value, d2target.ShapeCode) {
|
||||
if obj.Attributes.Language != "latex" && !obj.Attributes.Style.NoneTextTransform() {
|
||||
if capsLock && !strings.EqualFold(obj.Shape.Value, d2target.ShapeCode) {
|
||||
if obj.Language != "latex" && !obj.Style.NoneTextTransform() {
|
||||
text.Text = strings.ToUpper(text.Text)
|
||||
}
|
||||
}
|
||||
|
|
@ -1534,8 +1533,8 @@ func (g *Graph) Texts() []*d2target.MText {
|
|||
}
|
||||
if obj.Class != nil {
|
||||
fontSize := d2fonts.FONT_SIZE_L
|
||||
if obj.Attributes.Style.FontSize != nil {
|
||||
fontSize, _ = strconv.Atoi(obj.Attributes.Style.FontSize.Value)
|
||||
if obj.Style.FontSize != nil {
|
||||
fontSize, _ = strconv.Atoi(obj.Style.FontSize.Value)
|
||||
}
|
||||
for _, field := range obj.Class.Fields {
|
||||
texts = appendTextDedup(texts, field.Text(fontSize))
|
||||
|
|
@ -1545,8 +1544,8 @@ func (g *Graph) Texts() []*d2target.MText {
|
|||
}
|
||||
} else if obj.SQLTable != nil {
|
||||
colFontSize := d2fonts.FONT_SIZE_L
|
||||
if obj.Attributes.Style.FontSize != nil {
|
||||
colFontSize, _ = strconv.Atoi(obj.Attributes.Style.FontSize.Value)
|
||||
if obj.Style.FontSize != nil {
|
||||
colFontSize, _ = strconv.Atoi(obj.Style.FontSize.Value)
|
||||
}
|
||||
for _, column := range obj.SQLTable.Columns {
|
||||
for _, t := range column.Texts(colFontSize) {
|
||||
|
|
@ -1556,10 +1555,10 @@ func (g *Graph) Texts() []*d2target.MText {
|
|||
}
|
||||
}
|
||||
for _, edge := range g.Edges {
|
||||
if edge.Attributes.Label.Value != "" {
|
||||
edge.Attributes.ApplyTextTransform()
|
||||
if edge.Label.Value != "" {
|
||||
edge.ApplyTextTransform()
|
||||
text := edge.Text()
|
||||
if capsLock && !edge.Attributes.Style.NoneTextTransform() {
|
||||
if capsLock && !edge.Style.NoneTextTransform() {
|
||||
text.Text = strings.ToUpper(text.Text)
|
||||
}
|
||||
texts = appendTextDedup(texts, text)
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
package d2graph
|
||||
|
||||
func (obj *Object) IsGridDiagram() bool {
|
||||
return obj != nil && obj.Attributes != nil &&
|
||||
(obj.Attributes.GridRows != nil || obj.Attributes.GridColumns != nil)
|
||||
return obj != nil &&
|
||||
(obj.GridRows != nil || obj.GridColumns != nil)
|
||||
}
|
||||
|
||||
func (obj *Object) ClosestGridDiagram() *Object {
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ package d2graph
|
|||
import "oss.terrastruct.com/d2/d2target"
|
||||
|
||||
func (obj *Object) IsSequenceDiagram() bool {
|
||||
return obj != nil && obj.Attributes != nil && obj.Attributes.Shape.Value == d2target.ShapeSequenceDiagram
|
||||
return obj != nil && obj.Shape.Value == d2target.ShapeSequenceDiagram
|
||||
}
|
||||
|
||||
func (obj *Object) OuterSequenceDiagram() *Object {
|
||||
|
|
|
|||
120
d2graph/serde.go
120
d2graph/serde.go
|
|
@ -265,73 +265,51 @@ func CompareSerializedObject(obj, other *Object) error {
|
|||
}
|
||||
}
|
||||
|
||||
if obj.Attributes != nil && other.Attributes == nil {
|
||||
return fmt.Errorf("other should have attributes")
|
||||
} else if obj.Attributes == nil && other.Attributes != nil {
|
||||
return fmt.Errorf("other should not have attributes")
|
||||
} else if obj.Attributes != nil {
|
||||
if d2target.IsShape(obj.Attributes.Shape.Value) != d2target.IsShape(other.Attributes.Shape.Value) {
|
||||
return fmt.Errorf(
|
||||
"shapes differ: obj=%s, other=%s",
|
||||
obj.Attributes.Shape.Value,
|
||||
other.Attributes.Shape.Value,
|
||||
)
|
||||
}
|
||||
|
||||
if obj.Attributes.Icon == nil && other.Attributes.Icon != nil {
|
||||
return fmt.Errorf("other does not have an icon")
|
||||
} else if obj.Attributes.Icon != nil && other.Attributes.Icon == nil {
|
||||
return fmt.Errorf("obj does not have an icon")
|
||||
}
|
||||
|
||||
if obj.Attributes.Direction.Value != other.Attributes.Direction.Value {
|
||||
return fmt.Errorf(
|
||||
"directions differ: obj=%s, other=%s",
|
||||
obj.Attributes.Direction.Value,
|
||||
other.Attributes.Direction.Value,
|
||||
)
|
||||
}
|
||||
|
||||
if obj.Attributes.Label.Value != other.Attributes.Label.Value {
|
||||
return fmt.Errorf(
|
||||
"labels differ: obj=%s, other=%s",
|
||||
obj.Attributes.Label.Value,
|
||||
other.Attributes.Label.Value,
|
||||
)
|
||||
}
|
||||
|
||||
if obj.Attributes.NearKey != nil {
|
||||
if other.Attributes.NearKey == nil {
|
||||
return fmt.Errorf("other does not have near")
|
||||
}
|
||||
objKey := strings.Join(Key(obj.Attributes.NearKey), ".")
|
||||
deserKey := strings.Join(Key(other.Attributes.NearKey), ".")
|
||||
if objKey != deserKey {
|
||||
return fmt.Errorf(
|
||||
"near differs: obj=%s, other=%s",
|
||||
objKey,
|
||||
deserKey,
|
||||
)
|
||||
}
|
||||
} else if other.Attributes.NearKey != nil {
|
||||
return fmt.Errorf("other should not have near")
|
||||
}
|
||||
if d2target.IsShape(obj.Shape.Value) != d2target.IsShape(other.Shape.Value) {
|
||||
return fmt.Errorf(
|
||||
"shapes differ: obj=%s, other=%s",
|
||||
obj.Shape.Value,
|
||||
other.Shape.Value,
|
||||
)
|
||||
}
|
||||
|
||||
if obj.SQLTable == nil && other.SQLTable != nil {
|
||||
return fmt.Errorf("other is not a sql table")
|
||||
} else if obj.SQLTable != nil && other.SQLTable == nil {
|
||||
return fmt.Errorf("obj is not a sql table")
|
||||
if obj.Icon == nil && other.Icon != nil {
|
||||
return fmt.Errorf("other does not have an icon")
|
||||
} else if obj.Icon != nil && other.Icon == nil {
|
||||
return fmt.Errorf("obj does not have an icon")
|
||||
}
|
||||
|
||||
if obj.SQLTable != nil {
|
||||
if len(obj.SQLTable.Columns) != len(other.SQLTable.Columns) {
|
||||
if obj.Direction.Value != other.Direction.Value {
|
||||
return fmt.Errorf(
|
||||
"directions differ: obj=%s, other=%s",
|
||||
obj.Direction.Value,
|
||||
other.Direction.Value,
|
||||
)
|
||||
}
|
||||
|
||||
if obj.Label.Value != other.Label.Value {
|
||||
return fmt.Errorf(
|
||||
"labels differ: obj=%s, other=%s",
|
||||
obj.Label.Value,
|
||||
other.Label.Value,
|
||||
)
|
||||
}
|
||||
|
||||
if obj.NearKey != nil {
|
||||
if other.NearKey == nil {
|
||||
return fmt.Errorf("other does not have near")
|
||||
}
|
||||
objKey := strings.Join(Key(obj.NearKey), ".")
|
||||
deserKey := strings.Join(Key(other.NearKey), ".")
|
||||
if objKey != deserKey {
|
||||
return fmt.Errorf(
|
||||
"table columns count differ: obj=%d, other=%d",
|
||||
len(obj.SQLTable.Columns),
|
||||
len(other.SQLTable.Columns),
|
||||
"near differs: obj=%s, other=%s",
|
||||
objKey,
|
||||
deserKey,
|
||||
)
|
||||
}
|
||||
} else if other.NearKey != nil {
|
||||
return fmt.Errorf("other should not have near")
|
||||
}
|
||||
|
||||
if obj.LabelDimensions.Width != other.LabelDimensions.Width {
|
||||
|
|
@ -350,6 +328,22 @@ func CompareSerializedObject(obj, other *Object) error {
|
|||
)
|
||||
}
|
||||
|
||||
if obj.SQLTable == nil && other.SQLTable != nil {
|
||||
return fmt.Errorf("other is not a sql table")
|
||||
} else if obj.SQLTable != nil && other.SQLTable == nil {
|
||||
return fmt.Errorf("obj is not a sql table")
|
||||
}
|
||||
|
||||
if obj.SQLTable != nil {
|
||||
if len(obj.SQLTable.Columns) != len(other.SQLTable.Columns) {
|
||||
return fmt.Errorf(
|
||||
"table columns count differ: obj=%d, other=%d",
|
||||
len(obj.SQLTable.Columns),
|
||||
len(other.SQLTable.Columns),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
@ -410,11 +404,11 @@ func CompareSerializedEdge(edge, other *Edge) error {
|
|||
)
|
||||
}
|
||||
|
||||
if edge.Attributes.Label.Value != other.Attributes.Label.Value {
|
||||
if edge.Label.Value != other.Label.Value {
|
||||
return fmt.Errorf(
|
||||
"labels differ: edge=%s, other=%s",
|
||||
edge.Attributes.Label.Value,
|
||||
other.Attributes.Label.Value,
|
||||
edge.Label.Value,
|
||||
other.Label.Value,
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@ func Layout(ctx context.Context, g *d2graph.Graph, opts *ConfigurableOpts) (err
|
|||
},
|
||||
}
|
||||
isHorizontal := false
|
||||
switch g.Root.Attributes.Direction.Value {
|
||||
switch g.Root.Direction.Value {
|
||||
case "down":
|
||||
rootAttrs.rankdir = "TB"
|
||||
case "right":
|
||||
|
|
@ -118,9 +118,9 @@ func Layout(ctx context.Context, g *d2graph.Graph, opts *ConfigurableOpts) (err
|
|||
maxContainerLabelHeight = go2.Max(maxContainerLabelHeight, obj.LabelDimensions.Height+label.PADDING)
|
||||
}
|
||||
|
||||
if obj.Attributes.Icon != nil && obj.Attributes.Shape.Value != d2target.ShapeImage {
|
||||
if obj.Icon != nil && obj.Shape.Value != d2target.ShapeImage {
|
||||
contentBox := geo.NewBox(geo.NewPoint(0, 0), float64(obj.Width), float64(obj.Height))
|
||||
shapeType := d2target.DSL_SHAPE_TO_SHAPE_TYPE[obj.Attributes.Shape.Value]
|
||||
shapeType := d2target.DSL_SHAPE_TO_SHAPE_TYPE[obj.Shape.Value]
|
||||
s := shape.NewShape(shapeType, contentBox)
|
||||
iconSize := d2target.GetIconSize(s.GetInnerBox(), string(label.InsideTopLeft))
|
||||
// Since dagre container labels are pushed up, we don't want a child container to collide
|
||||
|
|
@ -161,7 +161,7 @@ func Layout(ctx context.Context, g *d2graph.Graph, opts *ConfigurableOpts) (err
|
|||
|
||||
height := obj.Height
|
||||
if obj.HasLabel() {
|
||||
if obj.HasOutsideBottomLabel() || obj.Attributes.Icon != nil {
|
||||
if obj.HasOutsideBottomLabel() || obj.Icon != nil {
|
||||
height += float64(obj.LabelDimensions.Height) + label.PADDING
|
||||
}
|
||||
if len(obj.ChildrenArray) > 0 {
|
||||
|
|
@ -189,7 +189,7 @@ func Layout(ctx context.Context, g *d2graph.Graph, opts *ConfigurableOpts) (err
|
|||
|
||||
// We want to leave some gap between multiple edges
|
||||
if numEdges > 1 {
|
||||
switch g.Root.Attributes.Direction.Value {
|
||||
switch g.Root.Direction.Value {
|
||||
case "down", "up", "":
|
||||
width += EDGE_LABEL_GAP
|
||||
case "left", "right":
|
||||
|
|
@ -242,13 +242,13 @@ func Layout(ctx context.Context, g *d2graph.Graph, opts *ConfigurableOpts) (err
|
|||
obj.LabelPosition = go2.Pointer(string(label.OutsideBottomCenter))
|
||||
// remove the extra height we added to the node when passing to dagre
|
||||
obj.Height -= float64(obj.LabelDimensions.Height) + label.PADDING
|
||||
} else if obj.Attributes.Icon != nil {
|
||||
} else if obj.Icon != nil {
|
||||
obj.LabelPosition = go2.Pointer(string(label.InsideTopCenter))
|
||||
} else {
|
||||
obj.LabelPosition = go2.Pointer(string(label.InsideMiddleCenter))
|
||||
}
|
||||
}
|
||||
if obj.Attributes.Icon != nil {
|
||||
if obj.Icon != nil {
|
||||
if len(obj.ChildrenArray) > 0 {
|
||||
obj.IconPosition = go2.Pointer(string(label.OutsideTopLeft))
|
||||
obj.LabelPosition = go2.Pointer(string(label.OutsideTopRight))
|
||||
|
|
@ -453,15 +453,15 @@ func Layout(ctx context.Context, g *d2graph.Graph, opts *ConfigurableOpts) (err
|
|||
}
|
||||
}
|
||||
|
||||
srcShape := shape.NewShape(d2target.DSL_SHAPE_TO_SHAPE_TYPE[strings.ToLower(edge.Src.Attributes.Shape.Value)], edge.Src.Box)
|
||||
dstShape := shape.NewShape(d2target.DSL_SHAPE_TO_SHAPE_TYPE[strings.ToLower(edge.Dst.Attributes.Shape.Value)], edge.Dst.Box)
|
||||
srcShape := shape.NewShape(d2target.DSL_SHAPE_TO_SHAPE_TYPE[strings.ToLower(edge.Src.Shape.Value)], edge.Src.Box)
|
||||
dstShape := shape.NewShape(d2target.DSL_SHAPE_TO_SHAPE_TYPE[strings.ToLower(edge.Dst.Shape.Value)], edge.Dst.Box)
|
||||
|
||||
// trace the edge to the specific shape's border
|
||||
points[startIndex] = shape.TraceToShapeBorder(srcShape, start, points[startIndex+1])
|
||||
|
||||
// if an edge to a container runs into its label, stop the edge at the label instead
|
||||
overlapsContainerLabel := false
|
||||
if edge.Dst.IsContainer() && edge.Dst.Attributes.Label.Value != "" && !dstShape.Is(shape.TEXT_TYPE) {
|
||||
if edge.Dst.IsContainer() && edge.Dst.Label.Value != "" && !dstShape.Is(shape.TEXT_TYPE) {
|
||||
// assumes LabelPosition, LabelWidth, LabelHeight are all set if there is a label
|
||||
labelWidth := float64(edge.Dst.LabelDimensions.Width)
|
||||
labelHeight := float64(edge.Dst.LabelDimensions.Height)
|
||||
|
|
@ -514,7 +514,7 @@ func Layout(ctx context.Context, g *d2graph.Graph, opts *ConfigurableOpts) (err
|
|||
|
||||
edge.Route = path
|
||||
// compile needs to assign edge label positions
|
||||
if edge.Attributes.Label.Value != "" {
|
||||
if edge.Label.Value != "" {
|
||||
edge.LabelPosition = go2.Pointer(string(label.InsideMiddleCenter))
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -159,7 +159,7 @@ func Layout(ctx context.Context, g *d2graph.Graph, opts *ConfigurableOpts) (err
|
|||
},
|
||||
},
|
||||
}
|
||||
switch g.Root.Attributes.Direction.Value {
|
||||
switch g.Root.Direction.Value {
|
||||
case "down":
|
||||
elkGraph.LayoutOptions.Direction = "DOWN"
|
||||
case "up":
|
||||
|
|
@ -198,7 +198,7 @@ func Layout(ctx context.Context, g *d2graph.Graph, opts *ConfigurableOpts) (err
|
|||
}
|
||||
}
|
||||
if incoming >= 2 || outgoing >= 2 {
|
||||
switch g.Root.Attributes.Direction.Value {
|
||||
switch g.Root.Direction.Value {
|
||||
case "right", "left":
|
||||
obj.Height = math.Max(obj.Height, math.Max(incoming, outgoing)*port_spacing)
|
||||
default:
|
||||
|
|
@ -209,7 +209,7 @@ func Layout(ctx context.Context, g *d2graph.Graph, opts *ConfigurableOpts) (err
|
|||
height := obj.Height
|
||||
width := obj.Width
|
||||
if obj.HasLabel() {
|
||||
if obj.HasOutsideBottomLabel() || obj.Attributes.Icon != nil {
|
||||
if obj.HasOutsideBottomLabel() || obj.Icon != nil {
|
||||
height += float64(obj.LabelDimensions.Height) + label.PADDING
|
||||
}
|
||||
width = go2.Max(width, float64(obj.LabelDimensions.Width))
|
||||
|
|
@ -256,7 +256,7 @@ func Layout(ctx context.Context, g *d2graph.Graph, opts *ConfigurableOpts) (err
|
|||
n.Height += 100 + float64(labelHeight)
|
||||
n.Width += 100
|
||||
contentBox := geo.NewBox(geo.NewPoint(0, 0), float64(n.Width), float64(n.Height))
|
||||
shapeType := d2target.DSL_SHAPE_TO_SHAPE_TYPE[obj.Attributes.Shape.Value]
|
||||
shapeType := d2target.DSL_SHAPE_TO_SHAPE_TYPE[obj.Shape.Value]
|
||||
s := shape.NewShape(shapeType, contentBox)
|
||||
|
||||
paddingTop := n.Height - s.GetInnerBox().Height
|
||||
|
|
@ -264,7 +264,7 @@ func Layout(ctx context.Context, g *d2graph.Graph, opts *ConfigurableOpts) (err
|
|||
n.Width -= 100
|
||||
|
||||
iconHeight := 0
|
||||
if obj.Attributes.Icon != nil && obj.Attributes.Shape.Value != d2target.ShapeImage {
|
||||
if obj.Icon != nil && obj.Shape.Value != d2target.ShapeImage {
|
||||
iconHeight = d2target.GetIconSize(s.GetInnerBox(), string(label.InsideTopLeft)) + label.PADDING*2
|
||||
}
|
||||
|
||||
|
|
@ -283,7 +283,7 @@ func Layout(ctx context.Context, g *d2graph.Graph, opts *ConfigurableOpts) (err
|
|||
|
||||
if obj.HasLabel() {
|
||||
n.Labels = append(n.Labels, &ELKLabel{
|
||||
Text: obj.Attributes.Label.Value,
|
||||
Text: obj.Label.Value,
|
||||
Width: float64(obj.LabelDimensions.Width),
|
||||
Height: float64(obj.LabelDimensions.Height),
|
||||
})
|
||||
|
|
@ -303,9 +303,9 @@ func Layout(ctx context.Context, g *d2graph.Graph, opts *ConfigurableOpts) (err
|
|||
Sources: []string{edge.Src.AbsID()},
|
||||
Targets: []string{edge.Dst.AbsID()},
|
||||
}
|
||||
if edge.Attributes.Label.Value != "" {
|
||||
if edge.Label.Value != "" {
|
||||
e.Labels = append(e.Labels, &ELKLabel{
|
||||
Text: edge.Attributes.Label.Value,
|
||||
Text: edge.Label.Value,
|
||||
Width: float64(edge.LabelDimensions.Width),
|
||||
Height: float64(edge.LabelDimensions.Height),
|
||||
LayoutOptions: &elkOpts{
|
||||
|
|
@ -397,13 +397,13 @@ func Layout(ctx context.Context, g *d2graph.Graph, opts *ConfigurableOpts) (err
|
|||
} else if obj.HasOutsideBottomLabel() {
|
||||
obj.LabelPosition = go2.Pointer(string(label.OutsideBottomCenter))
|
||||
obj.Height -= float64(obj.LabelDimensions.Height) + label.PADDING
|
||||
} else if obj.Attributes.Icon != nil {
|
||||
} else if obj.Icon != nil {
|
||||
obj.LabelPosition = go2.Pointer(string(label.InsideTopCenter))
|
||||
} else {
|
||||
obj.LabelPosition = go2.Pointer(string(label.InsideMiddleCenter))
|
||||
}
|
||||
}
|
||||
if obj.Attributes.Icon != nil {
|
||||
if obj.Icon != nil {
|
||||
if len(obj.ChildrenArray) > 0 {
|
||||
obj.IconPosition = go2.Pointer(string(label.InsideTopLeft))
|
||||
obj.LabelPosition = go2.Pointer(string(label.InsideTopRight))
|
||||
|
|
@ -444,14 +444,14 @@ func Layout(ctx context.Context, g *d2graph.Graph, opts *ConfigurableOpts) (err
|
|||
}
|
||||
|
||||
startIndex, endIndex := 0, len(points)-1
|
||||
srcShape := shape.NewShape(d2target.DSL_SHAPE_TO_SHAPE_TYPE[strings.ToLower(edge.Src.Attributes.Shape.Value)], edge.Src.Box)
|
||||
dstShape := shape.NewShape(d2target.DSL_SHAPE_TO_SHAPE_TYPE[strings.ToLower(edge.Dst.Attributes.Shape.Value)], edge.Dst.Box)
|
||||
srcShape := shape.NewShape(d2target.DSL_SHAPE_TO_SHAPE_TYPE[strings.ToLower(edge.Src.Shape.Value)], edge.Src.Box)
|
||||
dstShape := shape.NewShape(d2target.DSL_SHAPE_TO_SHAPE_TYPE[strings.ToLower(edge.Dst.Shape.Value)], edge.Dst.Box)
|
||||
|
||||
// trace the edge to the specific shape's border
|
||||
points[startIndex] = shape.TraceToShapeBorder(srcShape, points[startIndex], points[startIndex+1])
|
||||
points[endIndex] = shape.TraceToShapeBorder(dstShape, points[endIndex], points[endIndex-1])
|
||||
|
||||
if edge.Attributes.Label.Value != "" {
|
||||
if edge.Label.Value != "" {
|
||||
edge.LabelPosition = go2.Pointer(string(label.InsideMiddleCenter))
|
||||
}
|
||||
|
||||
|
|
@ -519,7 +519,7 @@ func deleteBends(g *d2graph.Graph) {
|
|||
newStart = geo.NewPoint(end.X, start.Y)
|
||||
}
|
||||
|
||||
endpointShape := shape.NewShape(d2target.DSL_SHAPE_TO_SHAPE_TYPE[strings.ToLower(endpoint.Attributes.Shape.Value)], endpoint.Box)
|
||||
endpointShape := shape.NewShape(d2target.DSL_SHAPE_TO_SHAPE_TYPE[strings.ToLower(endpoint.Shape.Value)], endpoint.Box)
|
||||
newStart = shape.TraceToShapeBorder(endpointShape, newStart, end)
|
||||
|
||||
// Check that the new segment doesn't collide with anything new
|
||||
|
|
|
|||
|
|
@ -32,11 +32,11 @@ func newGridDiagram(root *d2graph.Object) *gridDiagram {
|
|||
horizontalGap: DEFAULT_GAP,
|
||||
}
|
||||
|
||||
if root.Attributes.GridRows != nil {
|
||||
gd.rows, _ = strconv.Atoi(root.Attributes.GridRows.Value)
|
||||
if root.GridRows != nil {
|
||||
gd.rows, _ = strconv.Atoi(root.GridRows.Value)
|
||||
}
|
||||
if root.Attributes.GridColumns != nil {
|
||||
gd.columns, _ = strconv.Atoi(root.Attributes.GridColumns.Value)
|
||||
if root.GridColumns != nil {
|
||||
gd.columns, _ = strconv.Atoi(root.GridColumns.Value)
|
||||
}
|
||||
|
||||
if gd.rows != 0 && gd.columns != 0 {
|
||||
|
|
@ -47,7 +47,7 @@ func newGridDiagram(root *d2graph.Object) *gridDiagram {
|
|||
// . │ g h i │ │ c f i │
|
||||
// . └───────┘ └───────┘
|
||||
// if keyword rows is first, make it row-directed, if columns is first it is column-directed
|
||||
if root.Attributes.GridRows.MapKey.Range.Before(root.Attributes.GridColumns.MapKey.Range) {
|
||||
if root.GridRows.MapKey.Range.Before(root.GridColumns.MapKey.Range) {
|
||||
gd.rowDirected = true
|
||||
}
|
||||
|
||||
|
|
@ -84,15 +84,15 @@ func newGridDiagram(root *d2graph.Object) *gridDiagram {
|
|||
}
|
||||
|
||||
// grid gap sets both, but can be overridden
|
||||
if root.Attributes.GridGap != nil {
|
||||
gd.verticalGap, _ = strconv.Atoi(root.Attributes.GridGap.Value)
|
||||
if root.GridGap != nil {
|
||||
gd.verticalGap, _ = strconv.Atoi(root.GridGap.Value)
|
||||
gd.horizontalGap = gd.verticalGap
|
||||
}
|
||||
if root.Attributes.VerticalGap != nil {
|
||||
gd.verticalGap, _ = strconv.Atoi(root.Attributes.VerticalGap.Value)
|
||||
if root.VerticalGap != nil {
|
||||
gd.verticalGap, _ = strconv.Atoi(root.VerticalGap.Value)
|
||||
}
|
||||
if root.Attributes.HorizontalGap != nil {
|
||||
gd.horizontalGap, _ = strconv.Atoi(root.Attributes.HorizontalGap.Value)
|
||||
if root.HorizontalGap != nil {
|
||||
gd.horizontalGap, _ = strconv.Atoi(root.HorizontalGap.Value)
|
||||
}
|
||||
|
||||
return &gd
|
||||
|
|
|
|||
|
|
@ -123,7 +123,7 @@ func layoutGrid(g *d2graph.Graph, obj *d2graph.Object) (*gridDiagram, error) {
|
|||
|
||||
// position labels and icons
|
||||
for _, o := range gd.objects {
|
||||
if o.Attributes.Icon != nil {
|
||||
if o.Icon != nil {
|
||||
o.LabelPosition = go2.Pointer(string(label.InsideTopCenter))
|
||||
o.IconPosition = go2.Pointer(string(label.InsideMiddleCenter))
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ func Layout(ctx context.Context, g *d2graph.Graph, constantNearGraphs []*d2graph
|
|||
for _, processCenters := range []bool{true, false} {
|
||||
for _, tempGraph := range constantNearGraphs {
|
||||
obj := tempGraph.Root.ChildrenArray[0]
|
||||
if processCenters == strings.Contains(d2graph.Key(obj.Attributes.NearKey)[0], "-center") {
|
||||
if processCenters == strings.Contains(d2graph.Key(obj.NearKey)[0], "-center") {
|
||||
prevX, prevY := obj.TopLeft.X, obj.TopLeft.Y
|
||||
obj.TopLeft = geo.NewPoint(place(obj))
|
||||
dx, dy := obj.TopLeft.X-prevX, obj.TopLeft.Y-prevY
|
||||
|
|
@ -56,7 +56,7 @@ func Layout(ctx context.Context, g *d2graph.Graph, constantNearGraphs []*d2graph
|
|||
}
|
||||
for _, tempGraph := range constantNearGraphs {
|
||||
obj := tempGraph.Root.ChildrenArray[0]
|
||||
if processCenters == strings.Contains(d2graph.Key(obj.Attributes.NearKey)[0], "-center") {
|
||||
if processCenters == strings.Contains(d2graph.Key(obj.NearKey)[0], "-center") {
|
||||
// The z-index for constant nears does not matter, as it will not collide
|
||||
g.Objects = append(g.Objects, tempGraph.Objects...)
|
||||
if obj.Parent.Children == nil {
|
||||
|
|
@ -78,7 +78,7 @@ func place(obj *d2graph.Object) (float64, float64) {
|
|||
w := br.X - tl.X
|
||||
h := br.Y - tl.Y
|
||||
|
||||
nearKeyStr := d2graph.Key(obj.Attributes.NearKey)[0]
|
||||
nearKeyStr := d2graph.Key(obj.NearKey)[0]
|
||||
var x, y float64
|
||||
switch nearKeyStr {
|
||||
case "top-left":
|
||||
|
|
@ -139,14 +139,14 @@ func place(obj *d2graph.Object) (float64, float64) {
|
|||
func WithoutConstantNears(ctx context.Context, g *d2graph.Graph) (constantNearGraphs []*d2graph.Graph) {
|
||||
for i := 0; i < len(g.Objects); i++ {
|
||||
obj := g.Objects[i]
|
||||
if obj.Attributes.NearKey == nil {
|
||||
if obj.NearKey == nil {
|
||||
continue
|
||||
}
|
||||
_, isKey := g.Root.HasChild(d2graph.Key(obj.Attributes.NearKey))
|
||||
_, isKey := g.Root.HasChild(d2graph.Key(obj.NearKey))
|
||||
if isKey {
|
||||
continue
|
||||
}
|
||||
_, isConst := d2graph.NearConstants[d2graph.Key(obj.Attributes.NearKey)[0]]
|
||||
_, isConst := d2graph.NearConstants[d2graph.Key(obj.NearKey)[0]]
|
||||
if isConst {
|
||||
descendantObjects, edges := pluckObjAndEdges(g, obj)
|
||||
|
||||
|
|
@ -217,10 +217,10 @@ func boundingBox(g *d2graph.Graph) (tl, br *geo.Point) {
|
|||
y2 := math.Inf(-1)
|
||||
|
||||
for _, obj := range g.Objects {
|
||||
if obj.Attributes.NearKey != nil {
|
||||
if obj.NearKey != nil {
|
||||
// Top left should not be MORE top than top-center
|
||||
// But it should go more left if top-center label extends beyond bounds of diagram
|
||||
switch d2graph.Key(obj.Attributes.NearKey)[0] {
|
||||
switch d2graph.Key(obj.NearKey)[0] {
|
||||
case "top-center", "bottom-center":
|
||||
x1 = math.Min(x1, obj.TopLeft.X)
|
||||
x2 = math.Max(x2, obj.TopLeft.X+obj.Width)
|
||||
|
|
@ -236,7 +236,7 @@ func boundingBox(g *d2graph.Graph) (tl, br *geo.Point) {
|
|||
y1 = math.Min(y1, obj.TopLeft.Y)
|
||||
x2 = math.Max(x2, obj.TopLeft.X+obj.Width)
|
||||
y2 = math.Max(y2, obj.TopLeft.Y+obj.Height)
|
||||
if obj.Attributes.Label.Value != "" && obj.LabelPosition != nil {
|
||||
if obj.Label.Value != "" && obj.LabelPosition != nil {
|
||||
labelPosition := label.Position(*obj.LabelPosition)
|
||||
if labelPosition.IsOutside() {
|
||||
labelTL := labelPosition.GetPointOnBox(obj.Box, label.PADDING, float64(obj.LabelDimensions.Width), float64(obj.LabelDimensions.Height))
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ func WithoutSequenceDiagrams(ctx context.Context, g *d2graph.Graph) (map[string]
|
|||
if len(obj.ChildrenArray) == 0 {
|
||||
continue
|
||||
}
|
||||
if obj.Attributes.Shape.Value != d2target.ShapeSequenceDiagram {
|
||||
if obj.Shape.Value != d2target.ShapeSequenceDiagram {
|
||||
queue = append(queue, obj.ChildrenArray...)
|
||||
continue
|
||||
}
|
||||
|
|
|
|||
|
|
@ -180,7 +180,7 @@ b -> a.t2`
|
|||
g, err := d2compiler.Compile("", strings.NewReader(input), nil)
|
||||
assert.Nil(t, err)
|
||||
|
||||
g.Root.Attributes.Shape = d2graph.Scalar{Value: d2target.ShapeSequenceDiagram}
|
||||
g.Root.Shape = d2graph.Scalar{Value: d2target.ShapeSequenceDiagram}
|
||||
|
||||
a, has := g.Root.HasChild([]string{"a"})
|
||||
assert.True(t, has)
|
||||
|
|
@ -217,14 +217,14 @@ b -> a.t2`
|
|||
})
|
||||
|
||||
// check properties
|
||||
assert.Equal(t, strings.ToLower(shape.PERSON_TYPE), strings.ToLower(a.Attributes.Shape.Value))
|
||||
assert.Equal(t, strings.ToLower(shape.PERSON_TYPE), strings.ToLower(a.Shape.Value))
|
||||
|
||||
if a_t1.Attributes.Label.Value != "" {
|
||||
t.Fatalf("expected no label for span, got %s", a_t1.Attributes.Label.Value)
|
||||
if a_t1.Label.Value != "" {
|
||||
t.Fatalf("expected no label for span, got %s", a_t1.Label.Value)
|
||||
}
|
||||
|
||||
if a_t1.Attributes.Shape.Value != shape.SQUARE_TYPE {
|
||||
t.Fatalf("expected square shape for span, got %s", a_t1.Attributes.Shape.Value)
|
||||
if a_t1.Shape.Value != shape.SQUARE_TYPE {
|
||||
t.Fatalf("expected square shape for span, got %s", a_t1.Shape.Value)
|
||||
}
|
||||
|
||||
if a_t1.Height != b_t1.Height {
|
||||
|
|
@ -323,7 +323,7 @@ container -> c: edge 1
|
|||
|
||||
c := g.Root.EnsureChild([]string{"c"})
|
||||
c.Box = geo.NewBox(nil, 100, 100)
|
||||
c.Attributes.Shape = d2graph.Scalar{Value: d2target.ShapeSquare}
|
||||
c.Shape = d2graph.Scalar{Value: d2target.ShapeSquare}
|
||||
|
||||
layoutFn := func(ctx context.Context, g *d2graph.Graph) error {
|
||||
if len(g.Objects) != 2 {
|
||||
|
|
@ -378,7 +378,7 @@ container -> c: edge 1
|
|||
|
||||
func TestSelfEdges(t *testing.T) {
|
||||
g := d2graph.NewGraph()
|
||||
g.Root.Attributes.Shape = d2graph.Scalar{Value: d2target.ShapeSequenceDiagram}
|
||||
g.Root.Shape = d2graph.Scalar{Value: d2target.ShapeSequenceDiagram}
|
||||
n1 := g.Root.EnsureChild([]string{"n1"})
|
||||
n1.Box = geo.NewBox(nil, 100, 100)
|
||||
|
||||
|
|
@ -387,7 +387,7 @@ func TestSelfEdges(t *testing.T) {
|
|||
Src: n1,
|
||||
Dst: n1,
|
||||
Index: 0,
|
||||
Attributes: &d2graph.Attributes{
|
||||
Attributes: d2graph.Attributes{
|
||||
Label: d2graph.Scalar{Value: "left to right"},
|
||||
},
|
||||
},
|
||||
|
|
@ -414,10 +414,10 @@ func TestSelfEdges(t *testing.T) {
|
|||
|
||||
func TestSequenceToDescendant(t *testing.T) {
|
||||
g := d2graph.NewGraph()
|
||||
g.Root.Attributes.Shape = d2graph.Scalar{Value: d2target.ShapeSequenceDiagram}
|
||||
g.Root.Shape = d2graph.Scalar{Value: d2target.ShapeSequenceDiagram}
|
||||
a := g.Root.EnsureChild([]string{"a"})
|
||||
a.Box = geo.NewBox(nil, 100, 100)
|
||||
a.Attributes = &d2graph.Attributes{
|
||||
a.Attributes = d2graph.Attributes{
|
||||
Shape: d2graph.Scalar{Value: shape.PERSON_TYPE},
|
||||
}
|
||||
a_t1 := a.EnsureChild([]string{"t1"})
|
||||
|
|
@ -425,15 +425,13 @@ func TestSequenceToDescendant(t *testing.T) {
|
|||
|
||||
g.Edges = []*d2graph.Edge{
|
||||
{
|
||||
Src: a,
|
||||
Dst: a_t1,
|
||||
Index: 0,
|
||||
Attributes: &d2graph.Attributes{},
|
||||
Src: a,
|
||||
Dst: a_t1,
|
||||
Index: 0,
|
||||
}, {
|
||||
Src: a_t1,
|
||||
Dst: a,
|
||||
Index: 0,
|
||||
Attributes: &d2graph.Attributes{},
|
||||
Src: a_t1,
|
||||
Dst: a,
|
||||
Index: 0,
|
||||
},
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -110,7 +110,7 @@ func newSequenceDiagram(objects []*d2graph.Object, messages []*d2graph.Edge) (*s
|
|||
sd.objectRank[actor] = rank
|
||||
|
||||
if actor.Width < MIN_ACTOR_WIDTH {
|
||||
dslShape := strings.ToLower(actor.Attributes.Shape.Value)
|
||||
dslShape := strings.ToLower(actor.Shape.Value)
|
||||
switch dslShape {
|
||||
case d2target.ShapePerson, d2target.ShapeOval, d2target.ShapeSquare, d2target.ShapeCircle:
|
||||
// scale shape up to min width uniformly
|
||||
|
|
@ -131,7 +131,7 @@ func newSequenceDiagram(objects []*d2graph.Object, messages []*d2graph.Edge) (*s
|
|||
// edge groups are children of actors with no edges and children edges
|
||||
if child.IsSequenceDiagramNote() {
|
||||
sd.verticalIndices[child.AbsID()] = getObjEarliestLineNum(child)
|
||||
child.Attributes.Shape = d2graph.Scalar{Value: shape.PAGE_TYPE}
|
||||
child.Shape = d2graph.Scalar{Value: shape.PAGE_TYPE}
|
||||
sd.notes = append(sd.notes, child)
|
||||
sd.objectRank[child] = rank
|
||||
child.LabelPosition = go2.Pointer(string(label.InsideMiddleCenter))
|
||||
|
|
@ -139,8 +139,8 @@ func newSequenceDiagram(objects []*d2graph.Object, messages []*d2graph.Edge) (*s
|
|||
} else {
|
||||
// spans have no labels
|
||||
// TODO why not? Spans should be able to
|
||||
child.Attributes.Label = d2graph.Scalar{Value: ""}
|
||||
child.Attributes.Shape = d2graph.Scalar{Value: shape.SQUARE_TYPE}
|
||||
child.Label = d2graph.Scalar{Value: ""}
|
||||
child.Shape = d2graph.Scalar{Value: shape.SQUARE_TYPE}
|
||||
sd.spans = append(sd.spans, child)
|
||||
sd.objectRank[child] = rank
|
||||
}
|
||||
|
|
@ -390,15 +390,15 @@ func (sd *sequenceDiagram) addLifelineEdges() {
|
|||
StrokeDash: &d2graph.Scalar{Value: fmt.Sprintf("%d", LIFELINE_STROKE_DASH)},
|
||||
StrokeWidth: &d2graph.Scalar{Value: fmt.Sprintf("%d", LIFELINE_STROKE_WIDTH)},
|
||||
}
|
||||
if actor.Attributes.Style.StrokeDash != nil {
|
||||
style.StrokeDash = &d2graph.Scalar{Value: actor.Attributes.Style.StrokeDash.Value}
|
||||
if actor.Style.StrokeDash != nil {
|
||||
style.StrokeDash = &d2graph.Scalar{Value: actor.Style.StrokeDash.Value}
|
||||
}
|
||||
if actor.Attributes.Style.Stroke != nil {
|
||||
style.Stroke = &d2graph.Scalar{Value: actor.Attributes.Style.Stroke.Value}
|
||||
if actor.Style.Stroke != nil {
|
||||
style.Stroke = &d2graph.Scalar{Value: actor.Style.Stroke.Value}
|
||||
}
|
||||
|
||||
sd.lifelines = append(sd.lifelines, &d2graph.Edge{
|
||||
Attributes: &d2graph.Attributes{Style: style},
|
||||
Attributes: d2graph.Attributes{Style: style},
|
||||
Src: actor,
|
||||
SrcArrow: false,
|
||||
Dst: &d2graph.Object{
|
||||
|
|
@ -581,7 +581,7 @@ func (sd *sequenceDiagram) routeMessages() error {
|
|||
}
|
||||
messageOffset += sd.yStep
|
||||
|
||||
if message.Attributes.Label.Value != "" {
|
||||
if message.Label.Value != "" {
|
||||
message.LabelPosition = go2.Pointer(string(label.InsideMiddleCenter))
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -159,12 +159,12 @@ func _set(g *d2graph.Graph, key string, tag, value *string) error {
|
|||
}
|
||||
}
|
||||
|
||||
if obj.Attributes.Label.MapKey != nil && obj.Map == nil && (!found || reserved || len(mk.Edges) > 0) {
|
||||
if obj.Label.MapKey != nil && obj.Map == nil && (!found || reserved || len(mk.Edges) > 0) {
|
||||
obj.Map = &d2ast.Map{
|
||||
Range: d2ast.MakeRange(",1:0:0-1:0:0"),
|
||||
}
|
||||
obj.Attributes.Label.MapKey.Primary = obj.Attributes.Label.MapKey.Value.ScalarBox()
|
||||
obj.Attributes.Label.MapKey.Value = d2ast.MakeValueBox(obj.Map)
|
||||
obj.Label.MapKey.Primary = obj.Label.MapKey.Value.ScalarBox()
|
||||
obj.Label.MapKey.Value = d2ast.MakeValueBox(obj.Map)
|
||||
scope = obj.Map
|
||||
|
||||
mk.Key.Path = mk.Key.Path[toSkip-1:]
|
||||
|
|
@ -247,10 +247,10 @@ func _set(g *d2graph.Graph, key string, tag, value *string) error {
|
|||
if n.MapKey.Key.Path[0].Unbox().ScalarString() == mk.Key.Path[toSkip-1].Unbox().ScalarString() {
|
||||
scope = n.MapKey.Value.Map
|
||||
if mk.Key.Path[0].Unbox().ScalarString() == "source-arrowhead" && edge.SrcArrowhead != nil {
|
||||
attrs = edge.SrcArrowhead
|
||||
attrs = *edge.SrcArrowhead
|
||||
}
|
||||
if mk.Key.Path[0].Unbox().ScalarString() == "target-arrowhead" && edge.DstArrowhead != nil {
|
||||
attrs = edge.DstArrowhead
|
||||
attrs = *edge.DstArrowhead
|
||||
}
|
||||
reservedKey = mk.Key.Path[0].Unbox().ScalarString()
|
||||
mk.Key.Path = mk.Key.Path[1:]
|
||||
|
|
@ -295,13 +295,13 @@ func _set(g *d2graph.Graph, key string, tag, value *string) error {
|
|||
return nil
|
||||
}
|
||||
case "width":
|
||||
if attrs.Width != nil && attrs.Width.MapKey != nil {
|
||||
attrs.Width.MapKey.SetScalar(mk.Value.ScalarBox())
|
||||
if attrs.WidthAttr != nil && attrs.WidthAttr.MapKey != nil {
|
||||
attrs.WidthAttr.MapKey.SetScalar(mk.Value.ScalarBox())
|
||||
return nil
|
||||
}
|
||||
case "height":
|
||||
if attrs.Height != nil && attrs.Height.MapKey != nil {
|
||||
attrs.Height.MapKey.SetScalar(mk.Value.ScalarBox())
|
||||
if attrs.HeightAttr != nil && attrs.HeightAttr.MapKey != nil {
|
||||
attrs.HeightAttr.MapKey.SetScalar(mk.Value.ScalarBox())
|
||||
return nil
|
||||
}
|
||||
case "top":
|
||||
|
|
@ -340,12 +340,13 @@ func _set(g *d2graph.Graph, key string, tag, value *string) error {
|
|||
return nil
|
||||
}
|
||||
case "source-arrowhead", "target-arrowhead":
|
||||
var arrowhead *d2graph.Attributes
|
||||
if reservedKey == "source-arrowhead" {
|
||||
attrs = edge.SrcArrowhead
|
||||
arrowhead = edge.SrcArrowhead
|
||||
} else {
|
||||
attrs = edge.DstArrowhead
|
||||
arrowhead = edge.DstArrowhead
|
||||
}
|
||||
if attrs != nil {
|
||||
if arrowhead != nil {
|
||||
if reservedTargetKey == "" {
|
||||
if len(mk.Key.Path[reservedIndex:]) != 2 {
|
||||
return errors.New("malformed style setting, expected 2 part path")
|
||||
|
|
@ -354,13 +355,13 @@ func _set(g *d2graph.Graph, key string, tag, value *string) error {
|
|||
}
|
||||
switch reservedTargetKey {
|
||||
case "shape":
|
||||
if attrs.Shape.MapKey != nil {
|
||||
attrs.Shape.MapKey.SetScalar(mk.Value.ScalarBox())
|
||||
if arrowhead.Shape.MapKey != nil {
|
||||
arrowhead.Shape.MapKey.SetScalar(mk.Value.ScalarBox())
|
||||
return nil
|
||||
}
|
||||
case "label":
|
||||
if attrs.Label.MapKey != nil {
|
||||
attrs.Label.MapKey.SetScalar(mk.Value.ScalarBox())
|
||||
if arrowhead.Label.MapKey != nil {
|
||||
arrowhead.Label.MapKey.SetScalar(mk.Value.ScalarBox())
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
|
@ -664,7 +665,7 @@ func renameConflictsToParent(g *d2graph.Graph, key *d2ast.KeyPath) (*d2graph.Gra
|
|||
if !ok {
|
||||
return g, nil
|
||||
}
|
||||
if obj.Attributes.Shape.Value == d2target.ShapeSQLTable || obj.Attributes.Shape.Value == d2target.ShapeClass {
|
||||
if obj.Shape.Value == d2target.ShapeSQLTable || obj.Shape.Value == d2target.ShapeClass {
|
||||
return g, nil
|
||||
}
|
||||
|
||||
|
|
@ -961,7 +962,7 @@ func deleteObject(g *d2graph.Graph, key *d2ast.KeyPath, obj *d2graph.Object) (*d
|
|||
isSpecial := isReserved || x.Unbox().ScalarString() == "_"
|
||||
return !isSpecial
|
||||
})
|
||||
if obj.Attributes.Shape.Value == d2target.ShapeSQLTable || obj.Attributes.Shape.Value == d2target.ShapeClass {
|
||||
if obj.Shape.Value == d2target.ShapeSQLTable || obj.Shape.Value == d2target.ShapeClass {
|
||||
deleteFromMap(ref.Scope, ref.MapKey)
|
||||
} else if len(withoutSpecial) == 0 {
|
||||
hoistRefChildren(g, key, ref)
|
||||
|
|
@ -990,7 +991,7 @@ func deleteObject(g *d2graph.Graph, key *d2ast.KeyPath, obj *d2graph.Object) (*d
|
|||
} else if ref.InEdge() {
|
||||
edge := ref.MapKey.Edges[ref.MapKeyEdgeIndex]
|
||||
|
||||
if obj.Attributes.Shape.Value == d2target.ShapeSQLTable || obj.Attributes.Shape.Value == d2target.ShapeClass {
|
||||
if obj.Shape.Value == d2target.ShapeSQLTable || obj.Shape.Value == d2target.ShapeClass {
|
||||
if ref.MapKeyEdgeDest() {
|
||||
ensureNode(g, refEdges, ref.ScopeObj, ref.Scope, ref.MapKey, edge.Src, true)
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -50,11 +50,11 @@ func TestCreate(t *testing.T) {
|
|||
if g.Objects[0].ID != "square" {
|
||||
t.Fatalf("expected g.Objects[0].ID to be square: %#v", g.Objects[0])
|
||||
}
|
||||
if g.Objects[0].Attributes.Label.MapKey.Value.Unbox() != nil {
|
||||
t.Fatalf("expected g.Objects[0].Attributes.Label.Node.Value.Unbox() == nil: %#v", g.Objects[0].Attributes.Label.MapKey.Value)
|
||||
if g.Objects[0].Label.MapKey.Value.Unbox() != nil {
|
||||
t.Fatalf("expected g.Objects[0].Label.Node.Value.Unbox() == nil: %#v", g.Objects[0].Label.MapKey.Value)
|
||||
}
|
||||
if d2format.Format(g.Objects[0].Attributes.Label.MapKey.Key) != "square" {
|
||||
t.Fatalf("expected g.Objects[0].Attributes.Label.Node.Key to be square: %#v", g.Objects[0].Attributes.Label.MapKey.Key)
|
||||
if d2format.Format(g.Objects[0].Label.MapKey.Key) != "square" {
|
||||
t.Fatalf("expected g.Objects[0].Label.Node.Key to be square: %#v", g.Objects[0].Label.MapKey.Key)
|
||||
}
|
||||
},
|
||||
},
|
||||
|
|
@ -92,11 +92,11 @@ x 2
|
|||
if g.Objects[2].AbsID() != "b.c.square" {
|
||||
t.Fatalf("bad absolute ID: %#v", g.Objects[2].AbsID())
|
||||
}
|
||||
if d2format.Format(g.Objects[2].Attributes.Label.MapKey.Key) != "b.c.square" {
|
||||
t.Fatalf("bad mapkey: %#v", g.Objects[2].Attributes.Label.MapKey.Key)
|
||||
if d2format.Format(g.Objects[2].Label.MapKey.Key) != "b.c.square" {
|
||||
t.Fatalf("bad mapkey: %#v", g.Objects[2].Label.MapKey.Key)
|
||||
}
|
||||
if g.Objects[2].Attributes.Label.MapKey.Value.Unbox() != nil {
|
||||
t.Fatalf("expected nil mapkey value: %#v", g.Objects[2].Attributes.Label.MapKey.Value)
|
||||
if g.Objects[2].Label.MapKey.Value.Unbox() != nil {
|
||||
t.Fatalf("expected nil mapkey value: %#v", g.Objects[2].Label.MapKey.Value)
|
||||
}
|
||||
},
|
||||
},
|
||||
|
|
@ -116,11 +116,11 @@ square 2
|
|||
if g.Objects[1].ID != "square 2" {
|
||||
t.Fatalf("expected g.Objects[1].ID to be square 2: %#v", g.Objects[1])
|
||||
}
|
||||
if g.Objects[1].Attributes.Label.MapKey.Value.Unbox() != nil {
|
||||
t.Fatalf("expected g.Objects[1].Attributes.Label.Node.Value.Unbox() == nil: %#v", g.Objects[1].Attributes.Label.MapKey.Value)
|
||||
if g.Objects[1].Label.MapKey.Value.Unbox() != nil {
|
||||
t.Fatalf("expected g.Objects[1].Label.Node.Value.Unbox() == nil: %#v", g.Objects[1].Label.MapKey.Value)
|
||||
}
|
||||
if d2format.Format(g.Objects[1].Attributes.Label.MapKey.Key) != "square 2" {
|
||||
t.Fatalf("expected g.Objects[1].Attributes.Label.Node.Key to be square 2: %#v", g.Objects[1].Attributes.Label.MapKey.Key)
|
||||
if d2format.Format(g.Objects[1].Label.MapKey.Key) != "square 2" {
|
||||
t.Fatalf("expected g.Objects[1].Label.Node.Key to be square 2: %#v", g.Objects[1].Label.MapKey.Key)
|
||||
}
|
||||
},
|
||||
},
|
||||
|
|
@ -160,11 +160,11 @@ x.y.z.square 2
|
|||
if g.Objects[3].ID != "square" {
|
||||
t.Fatalf("expected g.Objects[3].ID to be square: %#v", g.Objects[3])
|
||||
}
|
||||
if g.Objects[3].Attributes.Label.MapKey.Value.Unbox() != nil {
|
||||
t.Fatalf("expected g.Objects[3].Attributes.Label.Node.Value.Unbox() == nil: %#v", g.Objects[3].Attributes.Label.MapKey.Value)
|
||||
if g.Objects[3].Label.MapKey.Value.Unbox() != nil {
|
||||
t.Fatalf("expected g.Objects[3].Label.Node.Value.Unbox() == nil: %#v", g.Objects[3].Label.MapKey.Value)
|
||||
}
|
||||
if d2format.Format(g.Objects[3].Attributes.Label.MapKey.Key) != "square" {
|
||||
t.Fatalf("expected g.Objects[3].Attributes.Label.Node.Key to be square: %#v", g.Objects[3].Attributes.Label.MapKey.Key)
|
||||
if d2format.Format(g.Objects[3].Label.MapKey.Key) != "square" {
|
||||
t.Fatalf("expected g.Objects[3].Label.Node.Key to be square: %#v", g.Objects[3].Label.MapKey.Key)
|
||||
}
|
||||
},
|
||||
},
|
||||
|
|
@ -188,11 +188,11 @@ x.y.z.square 2
|
|||
if g.Objects[4].ID != "square 2" {
|
||||
t.Fatalf("expected g.Objects[4].ID to be square 2: %#v", g.Objects[4])
|
||||
}
|
||||
if g.Objects[4].Attributes.Label.MapKey.Value.Unbox() != nil {
|
||||
t.Fatalf("expected g.Objects[4].Attributes.Label.Node.Value.Unbox() == nil: %#v", g.Objects[4].Attributes.Label.MapKey.Value)
|
||||
if g.Objects[4].Label.MapKey.Value.Unbox() != nil {
|
||||
t.Fatalf("expected g.Objects[4].Label.Node.Value.Unbox() == nil: %#v", g.Objects[4].Label.MapKey.Value)
|
||||
}
|
||||
if d2format.Format(g.Objects[4].Attributes.Label.MapKey.Key) != "square 2" {
|
||||
t.Fatalf("expected g.Objects[4].Attributes.Label.Node.Key to be square 2: %#v", g.Objects[4].Attributes.Label.MapKey.Key)
|
||||
if d2format.Format(g.Objects[4].Label.MapKey.Key) != "square 2" {
|
||||
t.Fatalf("expected g.Objects[4].Label.Node.Key to be square 2: %#v", g.Objects[4].Label.MapKey.Key)
|
||||
}
|
||||
},
|
||||
},
|
||||
|
|
@ -234,8 +234,8 @@ x.y.z.square 2
|
|||
if g.Objects[13].ID != "square 11" {
|
||||
t.Fatalf("expected g.Objects[13].ID to be square 11: %#v", g.Objects[13])
|
||||
}
|
||||
if d2format.Format(g.Objects[13].Attributes.Label.MapKey.Key) != "square 11" {
|
||||
t.Fatalf("expected g.Objects[13].Attributes.Label.Node.Key to be square 11: %#v", g.Objects[13].Attributes.Label.MapKey.Key)
|
||||
if d2format.Format(g.Objects[13].Label.MapKey.Key) != "square 11" {
|
||||
t.Fatalf("expected g.Objects[13].Label.Node.Key to be square 11: %#v", g.Objects[13].Label.MapKey.Key)
|
||||
}
|
||||
},
|
||||
},
|
||||
|
|
@ -517,11 +517,11 @@ func TestSet(t *testing.T) {
|
|||
if g.Objects[0].ID != "square" {
|
||||
t.Fatalf("expected g.Objects[0].ID to be square: %#v", g.Objects[0])
|
||||
}
|
||||
if g.Objects[0].Attributes.Label.MapKey.Value.Unbox() != nil {
|
||||
t.Fatalf("expected g.Objects[0].Attributes.Label.Node.Value.Unbox() == nil: %#v", g.Objects[0].Attributes.Label.MapKey.Value)
|
||||
if g.Objects[0].Label.MapKey.Value.Unbox() != nil {
|
||||
t.Fatalf("expected g.Objects[0].Label.Node.Value.Unbox() == nil: %#v", g.Objects[0].Label.MapKey.Value)
|
||||
}
|
||||
if d2format.Format(g.Objects[0].Attributes.Label.MapKey.Key) != "square" {
|
||||
t.Fatalf("expected g.Objects[0].Attributes.Label.Node.Key to be square: %#v", g.Objects[0].Attributes.Label.MapKey.Key)
|
||||
if d2format.Format(g.Objects[0].Label.MapKey.Key) != "square" {
|
||||
t.Fatalf("expected g.Objects[0].Label.Node.Key to be square: %#v", g.Objects[0].Label.MapKey.Key)
|
||||
}
|
||||
},
|
||||
},
|
||||
|
|
@ -546,8 +546,8 @@ func TestSet(t *testing.T) {
|
|||
if g.Edges[0].Dst.ID != "y" {
|
||||
t.Fatalf("expected g.Edges[0].Dst.ID == y: %#v", g.Edges[0].Dst.ID)
|
||||
}
|
||||
if g.Edges[0].Attributes.Label.Value != "two" {
|
||||
t.Fatalf("expected g.Edges[0].Attributes.Label.Value == two: %#v", g.Edges[0].Attributes.Label.Value)
|
||||
if g.Edges[0].Label.Value != "two" {
|
||||
t.Fatalf("expected g.Edges[0].Label.Value == two: %#v", g.Edges[0].Label.Value)
|
||||
}
|
||||
},
|
||||
},
|
||||
|
|
@ -566,8 +566,8 @@ func TestSet(t *testing.T) {
|
|||
if g.Objects[0].ID != "square" {
|
||||
t.Fatalf("expected g.Objects[0].ID to be square: %#v", g.Objects[0])
|
||||
}
|
||||
if g.Objects[0].Attributes.Shape.Value != d2target.ShapeSquare {
|
||||
t.Fatalf("expected g.Objects[0].Attributes.Shape.Value == square: %#v", g.Objects[0].Attributes.Shape.Value)
|
||||
if g.Objects[0].Shape.Value != d2target.ShapeSquare {
|
||||
t.Fatalf("expected g.Objects[0].Shape.Value == square: %#v", g.Objects[0].Shape.Value)
|
||||
}
|
||||
},
|
||||
},
|
||||
|
|
@ -586,8 +586,8 @@ func TestSet(t *testing.T) {
|
|||
if g.Objects[0].ID != "square" {
|
||||
t.Fatalf("expected g.Objects[0].ID to be square: %#v", g.Objects[0])
|
||||
}
|
||||
if g.Objects[0].Attributes.Shape.Value != d2target.ShapeCircle {
|
||||
t.Fatalf("expected g.Objects[0].Attributes.Shape.Value == circle: %#v", g.Objects[0].Attributes.Shape.Value)
|
||||
if g.Objects[0].Shape.Value != d2target.ShapeCircle {
|
||||
t.Fatalf("expected g.Objects[0].Shape.Value == circle: %#v", g.Objects[0].Shape.Value)
|
||||
}
|
||||
},
|
||||
},
|
||||
|
|
@ -606,7 +606,7 @@ func TestSet(t *testing.T) {
|
|||
if len(g.Objects) != 1 {
|
||||
t.Fatalf("expected 1 object but got %#v", len(g.Objects))
|
||||
}
|
||||
f, err := strconv.ParseFloat(g.Objects[0].Attributes.Style.Opacity.Value, 64)
|
||||
f, err := strconv.ParseFloat(g.Objects[0].Style.Opacity.Value, 64)
|
||||
if err != nil || f != 0.2 {
|
||||
t.Fatalf("expected g.Objects[0].Map.Nodes[0].MapKey.Value.Number.Value.Float64() == 0.2: %#v", f)
|
||||
}
|
||||
|
|
@ -652,7 +652,7 @@ func TestSet(t *testing.T) {
|
|||
if len(g.AST.Nodes[0].MapKey.Value.Map.Nodes) != 1 {
|
||||
t.Fatalf("expected 1 node within square but got %v", len(g.AST.Nodes[0].MapKey.Value.Map.Nodes))
|
||||
}
|
||||
f, err := strconv.ParseFloat(g.Objects[0].Attributes.Style.Opacity.Value, 64)
|
||||
f, err := strconv.ParseFloat(g.Objects[0].Style.Opacity.Value, 64)
|
||||
if err != nil || f != 0.2 {
|
||||
t.Fatal(err, f)
|
||||
}
|
||||
|
|
@ -670,7 +670,7 @@ func TestSet(t *testing.T) {
|
|||
if len(g.AST.Nodes) != 1 {
|
||||
t.Fatal(g.AST)
|
||||
}
|
||||
f, err := strconv.ParseFloat(g.Objects[0].Attributes.Style.Opacity.Value, 64)
|
||||
f, err := strconv.ParseFloat(g.Objects[0].Style.Opacity.Value, 64)
|
||||
if err != nil || f != 0.2 {
|
||||
t.Fatal(err, f)
|
||||
}
|
||||
|
|
@ -689,7 +689,7 @@ square.style.opacity: 0.2
|
|||
if len(g.AST.Nodes) != 2 {
|
||||
t.Fatal(g.AST)
|
||||
}
|
||||
f, err := strconv.ParseFloat(g.Objects[0].Attributes.Style.Opacity.Value, 64)
|
||||
f, err := strconv.ParseFloat(g.Objects[0].Style.Opacity.Value, 64)
|
||||
if err != nil || f != 0.2 {
|
||||
t.Fatal(err, f)
|
||||
}
|
||||
|
|
@ -877,8 +877,8 @@ square.style.opacity: 0.2
|
|||
if g.Objects[0].ID != "square" {
|
||||
t.Fatalf("expected g.Objects[0].ID to be square: %#v", g.Objects[0])
|
||||
}
|
||||
if g.Objects[0].Attributes.Shape.Value == d2target.ShapeSquare {
|
||||
t.Fatalf("expected g.Objects[0].Attributes.Shape.Value == square: %#v", g.Objects[0].Attributes.Shape.Value)
|
||||
if g.Objects[0].Shape.Value == d2target.ShapeSquare {
|
||||
t.Fatalf("expected g.Objects[0].Shape.Value == square: %#v", g.Objects[0].Shape.Value)
|
||||
}
|
||||
},
|
||||
},
|
||||
|
|
@ -897,8 +897,8 @@ square.style.opacity: 0.2
|
|||
if g.Objects[0].ID != "square" {
|
||||
t.Fatalf("expected g.Objects[0].ID to be square: %#v", g.Objects[0])
|
||||
}
|
||||
if g.Objects[0].Attributes.Shape.Value == d2target.ShapeSquare {
|
||||
t.Fatalf("expected g.Objects[0].Attributes.Shape.Value == square: %#v", g.Objects[0].Attributes.Shape.Value)
|
||||
if g.Objects[0].Shape.Value == d2target.ShapeSquare {
|
||||
t.Fatalf("expected g.Objects[0].Shape.Value == square: %#v", g.Objects[0].Shape.Value)
|
||||
}
|
||||
},
|
||||
},
|
||||
|
|
@ -920,8 +920,8 @@ square.style.opacity: 0.2
|
|||
if g.Objects[0].ID != "square" {
|
||||
t.Fatal(g.Objects[0])
|
||||
}
|
||||
if g.Objects[0].Attributes.Label.Value == "I am deeply CONCERNED and I want something GOOD for BREAKFAST!" {
|
||||
t.Fatal(g.Objects[0].Attributes.Label.Value)
|
||||
if g.Objects[0].Label.Value == "I am deeply CONCERNED and I want something GOOD for BREAKFAST!" {
|
||||
t.Fatal(g.Objects[0].Label.Value)
|
||||
}
|
||||
},
|
||||
},
|
||||
|
|
@ -1036,8 +1036,8 @@ z: {
|
|||
if len(g.Edges) != 2 {
|
||||
t.Fatalf("expected 2 edges: %#v", g.Edges)
|
||||
}
|
||||
if g.Edges[0].Attributes.Label.Value != "two" {
|
||||
t.Fatalf("expected g.Edges[0].Attributes.Label.Value == two: %#v", g.Edges[0].Attributes.Label.Value)
|
||||
if g.Edges[0].Label.Value != "two" {
|
||||
t.Fatalf("expected g.Edges[0].Label.Value == two: %#v", g.Edges[0].Label.Value)
|
||||
}
|
||||
},
|
||||
},
|
||||
|
|
@ -1054,8 +1054,8 @@ z: {
|
|||
if len(g.Objects) != 1 {
|
||||
t.Fatal(g.Objects)
|
||||
}
|
||||
if g.Objects[0].Attributes.Icon.String() != "https://icons.terrastruct.com/essentials/087-menu.svg" {
|
||||
t.Fatal(g.Objects[0].Attributes.Icon.String())
|
||||
if g.Objects[0].Icon.String() != "https://icons.terrastruct.com/essentials/087-menu.svg" {
|
||||
t.Fatal(g.Objects[0].Icon.String())
|
||||
}
|
||||
},
|
||||
},
|
||||
|
|
@ -1133,7 +1133,7 @@ z: {
|
|||
assert.JSON(t, 3, len(g.Objects))
|
||||
assert.JSON(t, 1, len(g.Edges))
|
||||
assert.JSON(t, "q", g.Edges[0].Src.ID)
|
||||
assert.JSON(t, "0.4", g.Edges[0].Attributes.Style.Opacity.Value)
|
||||
assert.JSON(t, "0.4", g.Edges[0].Style.Opacity.Value)
|
||||
},
|
||||
},
|
||||
{
|
||||
|
|
@ -1309,8 +1309,8 @@ a.b -> a.c: {style.animated: true}
|
|||
if g.Edges[0].Src.ID != "q" {
|
||||
t.Fatal(g.Edges[0].Src.ID)
|
||||
}
|
||||
if g.Edges[0].Attributes.Style.Opacity.Value != "0.4" {
|
||||
t.Fatal(g.Edges[0].Attributes.Style.Opacity.Value)
|
||||
if g.Edges[0].Style.Opacity.Value != "0.4" {
|
||||
t.Fatal(g.Edges[0].Style.Opacity.Value)
|
||||
}
|
||||
},
|
||||
},
|
||||
|
|
|
|||
|
|
@ -33,19 +33,19 @@ func FeatureSupportCheck(info *PluginInfo, g *d2graph.Graph) error {
|
|||
}
|
||||
|
||||
for _, obj := range g.Objects {
|
||||
if obj.Attributes.Top != nil || obj.Attributes.Left != nil {
|
||||
if obj.Top != nil || obj.Left != nil {
|
||||
if _, ok := featureMap[TOP_LEFT]; !ok {
|
||||
return fmt.Errorf(`Object "%s" has attribute "top" and/or "left" set, but layout engine "%s" does not support locked positions.`, obj.AbsID(), info.Name)
|
||||
}
|
||||
}
|
||||
if (obj.Attributes.Width != nil || obj.Attributes.Height != nil) && len(obj.ChildrenArray) > 0 {
|
||||
if (obj.WidthAttr != nil || obj.HeightAttr != nil) && len(obj.ChildrenArray) > 0 {
|
||||
if _, ok := featureMap[CONTAINER_DIMENSIONS]; !ok {
|
||||
return fmt.Errorf(`Object "%s" has attribute "width" and/or "height" set, but layout engine "%s" does not support dimensions set on containers.`, obj.AbsID(), info.Name)
|
||||
}
|
||||
}
|
||||
|
||||
if obj.Attributes.NearKey != nil {
|
||||
_, isKey := g.Root.HasChild(d2graph.Key(obj.Attributes.NearKey))
|
||||
if obj.NearKey != nil {
|
||||
_, isKey := g.Root.HasChild(d2graph.Key(obj.NearKey))
|
||||
if isKey {
|
||||
if _, ok := featureMap[NEAR_OBJECT]; !ok {
|
||||
return fmt.Errorf(`Object "%s" has "near" set to another object, but layout engine "%s" only supports constant values for "near".`, obj.AbsID(), info.Name)
|
||||
|
|
|
|||
16
testdata/d2compiler/TestCompile/basic_icon.exp.json
generated
vendored
16
testdata/d2compiler/TestCompile/basic_icon.exp.json
generated
vendored
|
|
@ -77,14 +77,14 @@
|
|||
"root": {
|
||||
"id": "",
|
||||
"id_val": "",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"attributes": {
|
||||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -104,10 +104,6 @@
|
|||
{
|
||||
"id": "hey",
|
||||
"id_val": "hey",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -134,6 +130,10 @@
|
|||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"icon": {
|
||||
"Scheme": "https",
|
||||
|
|
|
|||
16
testdata/d2compiler/TestCompile/basic_sequence.exp.json
generated
vendored
16
testdata/d2compiler/TestCompile/basic_sequence.exp.json
generated
vendored
|
|
@ -72,14 +72,14 @@
|
|||
"root": {
|
||||
"id": "",
|
||||
"id_val": "",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"attributes": {
|
||||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -99,10 +99,6 @@
|
|||
{
|
||||
"id": "x",
|
||||
"id_val": "x",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -129,6 +125,10 @@
|
|||
"label": {
|
||||
"value": "x"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
|
|||
16
testdata/d2compiler/TestCompile/basic_shape.exp.json
generated
vendored
16
testdata/d2compiler/TestCompile/basic_shape.exp.json
generated
vendored
|
|
@ -72,14 +72,14 @@
|
|||
"root": {
|
||||
"id": "",
|
||||
"id_val": "",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"attributes": {
|
||||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -99,10 +99,6 @@
|
|||
{
|
||||
"id": "x",
|
||||
"id_val": "x",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -129,6 +125,10 @@
|
|||
"label": {
|
||||
"value": "x"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
|
|||
16
testdata/d2compiler/TestCompile/basic_style.exp.json
generated
vendored
16
testdata/d2compiler/TestCompile/basic_style.exp.json
generated
vendored
|
|
@ -79,14 +79,14 @@
|
|||
"root": {
|
||||
"id": "",
|
||||
"id_val": "",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"attributes": {
|
||||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -106,10 +106,6 @@
|
|||
{
|
||||
"id": "x",
|
||||
"id_val": "x",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -136,6 +132,10 @@
|
|||
"label": {
|
||||
"value": "x"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {
|
||||
"opacity": {
|
||||
"value": "0.4"
|
||||
|
|
|
|||
16
testdata/d2compiler/TestCompile/class_paren.exp.json
generated
vendored
16
testdata/d2compiler/TestCompile/class_paren.exp.json
generated
vendored
|
|
@ -171,14 +171,14 @@
|
|||
"root": {
|
||||
"id": "",
|
||||
"id_val": "",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"attributes": {
|
||||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -198,10 +198,6 @@
|
|||
{
|
||||
"id": "_shape_",
|
||||
"id_val": "_shape_",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -249,6 +245,10 @@
|
|||
"label": {
|
||||
"value": "shape"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
|
|||
16
testdata/d2compiler/TestCompile/class_style.exp.json
generated
vendored
16
testdata/d2compiler/TestCompile/class_style.exp.json
generated
vendored
|
|
@ -145,14 +145,14 @@
|
|||
"root": {
|
||||
"id": "",
|
||||
"id_val": "",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"attributes": {
|
||||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -172,10 +172,6 @@
|
|||
{
|
||||
"id": "IUserProperties",
|
||||
"id_val": "IUserProperties",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -212,6 +208,10 @@
|
|||
"label": {
|
||||
"value": "IUserProperties"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {
|
||||
"opacity": {
|
||||
"value": "0.4"
|
||||
|
|
|
|||
40
testdata/d2compiler/TestCompile/classes.exp.json
generated
vendored
40
testdata/d2compiler/TestCompile/classes.exp.json
generated
vendored
|
|
@ -633,14 +633,14 @@
|
|||
"root": {
|
||||
"id": "",
|
||||
"id_val": "",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"attributes": {
|
||||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -660,10 +660,6 @@
|
|||
"index": 0,
|
||||
"minWidth": 0,
|
||||
"minHeight": 0,
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"isCurve": false,
|
||||
"src_arrow": false,
|
||||
"dst_arrow": true,
|
||||
|
|
@ -676,6 +672,10 @@
|
|||
"label": {
|
||||
"value": "then"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {
|
||||
"strokeWidth": {
|
||||
"value": "4"
|
||||
|
|
@ -702,10 +702,6 @@
|
|||
{
|
||||
"id": "nostar",
|
||||
"id_val": "nostar",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -752,6 +748,10 @@
|
|||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {
|
||||
"fill": {
|
||||
"value": "orange"
|
||||
|
|
@ -776,10 +776,6 @@
|
|||
{
|
||||
"id": "1star",
|
||||
"id_val": "1star",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -826,6 +822,10 @@
|
|||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {
|
||||
"fill": {
|
||||
"value": "red"
|
||||
|
|
@ -850,10 +850,6 @@
|
|||
{
|
||||
"id": "2star",
|
||||
"id_val": "2star",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -880,6 +876,10 @@
|
|||
"label": {
|
||||
"value": "**"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {
|
||||
"fill": {
|
||||
"value": "orange"
|
||||
|
|
|
|||
16
testdata/d2compiler/TestCompile/constraint_label.exp.json
generated
vendored
16
testdata/d2compiler/TestCompile/constraint_label.exp.json
generated
vendored
|
|
@ -105,14 +105,14 @@
|
|||
"root": {
|
||||
"id": "",
|
||||
"id_val": "",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"attributes": {
|
||||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -132,10 +132,6 @@
|
|||
{
|
||||
"id": "foo",
|
||||
"id_val": "foo",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -162,6 +158,10 @@
|
|||
"label": {
|
||||
"value": "bar"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
|
|||
16
testdata/d2compiler/TestCompile/default_direction.exp.json
generated
vendored
16
testdata/d2compiler/TestCompile/default_direction.exp.json
generated
vendored
|
|
@ -33,14 +33,14 @@
|
|||
"root": {
|
||||
"id": "",
|
||||
"id_val": "",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"attributes": {
|
||||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -60,10 +60,6 @@
|
|||
{
|
||||
"id": "x",
|
||||
"id_val": "x",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -90,6 +86,10 @@
|
|||
"label": {
|
||||
"value": "x"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
|
|||
16
testdata/d2compiler/TestCompile/dimension_with_style.exp.json
generated
vendored
16
testdata/d2compiler/TestCompile/dimension_with_style.exp.json
generated
vendored
|
|
@ -107,14 +107,14 @@
|
|||
"root": {
|
||||
"id": "",
|
||||
"id_val": "",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"attributes": {
|
||||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -134,10 +134,6 @@
|
|||
{
|
||||
"id": "x",
|
||||
"id_val": "x",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -164,6 +160,10 @@
|
|||
"label": {
|
||||
"value": "x"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {
|
||||
"multiple": {
|
||||
"value": "true"
|
||||
|
|
|
|||
80
testdata/d2compiler/TestCompile/dimensions_on_containers.exp.json
generated
vendored
80
testdata/d2compiler/TestCompile/dimensions_on_containers.exp.json
generated
vendored
|
|
@ -941,14 +941,14 @@
|
|||
"root": {
|
||||
"id": "",
|
||||
"id_val": "",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"attributes": {
|
||||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -968,10 +968,6 @@
|
|||
{
|
||||
"id": "containers",
|
||||
"id_val": "containers",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -998,6 +994,10 @@
|
|||
"label": {
|
||||
"value": "containers"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -1015,10 +1015,6 @@
|
|||
{
|
||||
"id": "circle container",
|
||||
"id_val": "circle container",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -1045,6 +1041,10 @@
|
|||
"label": {
|
||||
"value": "circle container"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"width": {
|
||||
"value": "512"
|
||||
|
|
@ -1065,10 +1065,6 @@
|
|||
{
|
||||
"id": "diamond",
|
||||
"id_val": "diamond",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -1095,6 +1091,10 @@
|
|||
"label": {
|
||||
"value": "diamond"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"width": {
|
||||
"value": "128"
|
||||
|
|
@ -1118,10 +1118,6 @@
|
|||
{
|
||||
"id": "diamond container",
|
||||
"id_val": "diamond container",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -1148,6 +1144,10 @@
|
|||
"label": {
|
||||
"value": "diamond container"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"width": {
|
||||
"value": "512"
|
||||
|
|
@ -1171,10 +1171,6 @@
|
|||
{
|
||||
"id": "circle",
|
||||
"id_val": "circle",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -1201,6 +1197,10 @@
|
|||
"label": {
|
||||
"value": "circle"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"width": {
|
||||
"value": "128"
|
||||
|
|
@ -1221,10 +1221,6 @@
|
|||
{
|
||||
"id": "oval container",
|
||||
"id_val": "oval container",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -1251,6 +1247,10 @@
|
|||
"label": {
|
||||
"value": "oval container"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"width": {
|
||||
"value": "512"
|
||||
|
|
@ -1274,10 +1274,6 @@
|
|||
{
|
||||
"id": "hexagon",
|
||||
"id_val": "hexagon",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -1304,6 +1300,10 @@
|
|||
"label": {
|
||||
"value": "hexagon"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"width": {
|
||||
"value": "128"
|
||||
|
|
@ -1327,10 +1327,6 @@
|
|||
{
|
||||
"id": "hexagon container",
|
||||
"id_val": "hexagon container",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -1357,6 +1353,10 @@
|
|||
"label": {
|
||||
"value": "hexagon container"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"width": {
|
||||
"value": "512"
|
||||
|
|
@ -1380,10 +1380,6 @@
|
|||
{
|
||||
"id": "oval",
|
||||
"id_val": "oval",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -1410,6 +1406,10 @@
|
|||
"label": {
|
||||
"value": "oval"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"width": {
|
||||
"value": "128"
|
||||
|
|
|
|||
16
testdata/d2compiler/TestCompile/dimensions_on_nonimage.exp.json
generated
vendored
16
testdata/d2compiler/TestCompile/dimensions_on_nonimage.exp.json
generated
vendored
|
|
@ -135,14 +135,14 @@
|
|||
"root": {
|
||||
"id": "",
|
||||
"id_val": "",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"attributes": {
|
||||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -162,10 +162,6 @@
|
|||
{
|
||||
"id": "hey",
|
||||
"id_val": "hey",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -192,6 +188,10 @@
|
|||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"width": {
|
||||
"value": "200"
|
||||
|
|
|
|||
32
testdata/d2compiler/TestCompile/edge.exp.json
generated
vendored
32
testdata/d2compiler/TestCompile/edge.exp.json
generated
vendored
|
|
@ -56,14 +56,14 @@
|
|||
"root": {
|
||||
"id": "",
|
||||
"id_val": "",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"attributes": {
|
||||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -83,10 +83,6 @@
|
|||
"index": 0,
|
||||
"minWidth": 0,
|
||||
"minHeight": 0,
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"isCurve": false,
|
||||
"src_arrow": false,
|
||||
"dst_arrow": true,
|
||||
|
|
@ -99,6 +95,10 @@
|
|||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -118,10 +118,6 @@
|
|||
{
|
||||
"id": "x",
|
||||
"id_val": "x",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -148,6 +144,10 @@
|
|||
"label": {
|
||||
"value": "x"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -165,10 +165,6 @@
|
|||
{
|
||||
"id": "y",
|
||||
"id_val": "y",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -195,6 +191,10 @@
|
|||
"label": {
|
||||
"value": "y"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
|
|||
40
testdata/d2compiler/TestCompile/edge_arrowhead_fields.exp.json
generated
vendored
40
testdata/d2compiler/TestCompile/edge_arrowhead_fields.exp.json
generated
vendored
|
|
@ -235,14 +235,14 @@
|
|||
"root": {
|
||||
"id": "",
|
||||
"id_val": "",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"attributes": {
|
||||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -262,16 +262,16 @@
|
|||
"index": 0,
|
||||
"minWidth": 0,
|
||||
"minHeight": 0,
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"isCurve": false,
|
||||
"src_arrow": false,
|
||||
"srcArrowhead": {
|
||||
"label": {
|
||||
"value": "Reisner's Rule of Conceptual Inertia"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -289,6 +289,10 @@
|
|||
"label": {
|
||||
"value": "QOTD"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {
|
||||
"filled": {
|
||||
"value": "true"
|
||||
|
|
@ -314,6 +318,10 @@
|
|||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -333,10 +341,6 @@
|
|||
{
|
||||
"id": "x",
|
||||
"id_val": "x",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -363,6 +367,10 @@
|
|||
"label": {
|
||||
"value": "x"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -380,10 +388,6 @@
|
|||
{
|
||||
"id": "y",
|
||||
"id_val": "y",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -410,6 +414,10 @@
|
|||
"label": {
|
||||
"value": "y"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
|
|||
36
testdata/d2compiler/TestCompile/edge_arrowhead_primary.exp.json
generated
vendored
36
testdata/d2compiler/TestCompile/edge_arrowhead_primary.exp.json
generated
vendored
|
|
@ -95,14 +95,14 @@
|
|||
"root": {
|
||||
"id": "",
|
||||
"id_val": "",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"attributes": {
|
||||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -122,16 +122,16 @@
|
|||
"index": 0,
|
||||
"minWidth": 0,
|
||||
"minHeight": 0,
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"isCurve": false,
|
||||
"src_arrow": false,
|
||||
"srcArrowhead": {
|
||||
"label": {
|
||||
"value": "Reisner's Rule of Conceptual Inertia"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -154,6 +154,10 @@
|
|||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -173,10 +177,6 @@
|
|||
{
|
||||
"id": "x",
|
||||
"id_val": "x",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -203,6 +203,10 @@
|
|||
"label": {
|
||||
"value": "x"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -220,10 +224,6 @@
|
|||
{
|
||||
"id": "y",
|
||||
"id_val": "y",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -250,6 +250,10 @@
|
|||
"label": {
|
||||
"value": "y"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
|
|||
48
testdata/d2compiler/TestCompile/edge_chain.exp.json
generated
vendored
48
testdata/d2compiler/TestCompile/edge_chain.exp.json
generated
vendored
|
|
@ -103,14 +103,14 @@
|
|||
"root": {
|
||||
"id": "",
|
||||
"id_val": "",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"attributes": {
|
||||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -130,10 +130,6 @@
|
|||
"index": 0,
|
||||
"minWidth": 0,
|
||||
"minHeight": 0,
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"isCurve": false,
|
||||
"src_arrow": false,
|
||||
"dst_arrow": true,
|
||||
|
|
@ -146,6 +142,10 @@
|
|||
"label": {
|
||||
"value": "The kids will love our inflatable slides"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -164,10 +164,6 @@
|
|||
"index": 0,
|
||||
"minWidth": 0,
|
||||
"minHeight": 0,
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"isCurve": false,
|
||||
"src_arrow": false,
|
||||
"dst_arrow": true,
|
||||
|
|
@ -180,6 +176,10 @@
|
|||
"label": {
|
||||
"value": "The kids will love our inflatable slides"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -199,10 +199,6 @@
|
|||
{
|
||||
"id": "x",
|
||||
"id_val": "x",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -229,6 +225,10 @@
|
|||
"label": {
|
||||
"value": "x"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -246,10 +246,6 @@
|
|||
{
|
||||
"id": "y",
|
||||
"id_val": "y",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -296,6 +292,10 @@
|
|||
"label": {
|
||||
"value": "y"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -313,10 +313,6 @@
|
|||
{
|
||||
"id": "z",
|
||||
"id_val": "z",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -343,6 +339,10 @@
|
|||
"label": {
|
||||
"value": "z"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
|
|||
48
testdata/d2compiler/TestCompile/edge_chain_map.exp.json
generated
vendored
48
testdata/d2compiler/TestCompile/edge_chain_map.exp.json
generated
vendored
|
|
@ -132,14 +132,14 @@
|
|||
"root": {
|
||||
"id": "",
|
||||
"id_val": "",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"attributes": {
|
||||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -159,10 +159,6 @@
|
|||
"index": 0,
|
||||
"minWidth": 0,
|
||||
"minHeight": 0,
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"isCurve": false,
|
||||
"src_arrow": false,
|
||||
"dst_arrow": true,
|
||||
|
|
@ -175,6 +171,10 @@
|
|||
"label": {
|
||||
"value": "Space: the final frontier. These are the voyages of the starship Enterprise."
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -193,10 +193,6 @@
|
|||
"index": 0,
|
||||
"minWidth": 0,
|
||||
"minHeight": 0,
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"isCurve": false,
|
||||
"src_arrow": false,
|
||||
"dst_arrow": true,
|
||||
|
|
@ -209,6 +205,10 @@
|
|||
"label": {
|
||||
"value": "Space: the final frontier. These are the voyages of the starship Enterprise."
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -228,10 +228,6 @@
|
|||
{
|
||||
"id": "x",
|
||||
"id_val": "x",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -258,6 +254,10 @@
|
|||
"label": {
|
||||
"value": "x"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -275,10 +275,6 @@
|
|||
{
|
||||
"id": "y",
|
||||
"id_val": "y",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -325,6 +321,10 @@
|
|||
"label": {
|
||||
"value": "y"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -342,10 +342,6 @@
|
|||
{
|
||||
"id": "z",
|
||||
"id_val": "z",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -372,6 +368,10 @@
|
|||
"label": {
|
||||
"value": "z"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
|
|||
32
testdata/d2compiler/TestCompile/edge_column_index.exp.json
generated
vendored
32
testdata/d2compiler/TestCompile/edge_column_index.exp.json
generated
vendored
|
|
@ -334,14 +334,14 @@
|
|||
"root": {
|
||||
"id": "",
|
||||
"id_val": "",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"attributes": {
|
||||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -363,10 +363,6 @@
|
|||
"minHeight": 0,
|
||||
"srcTableColumnIndex": 0,
|
||||
"dstTableColumnIndex": 1,
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"isCurve": false,
|
||||
"src_arrow": true,
|
||||
"dst_arrow": true,
|
||||
|
|
@ -379,6 +375,10 @@
|
|||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -398,10 +398,6 @@
|
|||
{
|
||||
"id": "src",
|
||||
"id_val": "src",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -519,6 +515,10 @@
|
|||
"label": {
|
||||
"value": "src"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -536,10 +536,6 @@
|
|||
{
|
||||
"id": "dst",
|
||||
"id_val": "dst",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -657,6 +653,10 @@
|
|||
"label": {
|
||||
"value": "dst"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
|
|||
32
testdata/d2compiler/TestCompile/edge_exclusive_style.exp.json
generated
vendored
32
testdata/d2compiler/TestCompile/edge_exclusive_style.exp.json
generated
vendored
|
|
@ -101,14 +101,14 @@
|
|||
"root": {
|
||||
"id": "",
|
||||
"id_val": "",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"attributes": {
|
||||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -128,10 +128,6 @@
|
|||
"index": 0,
|
||||
"minWidth": 0,
|
||||
"minHeight": 0,
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"isCurve": false,
|
||||
"src_arrow": false,
|
||||
"dst_arrow": true,
|
||||
|
|
@ -144,6 +140,10 @@
|
|||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {
|
||||
"animated": {
|
||||
"value": "true"
|
||||
|
|
@ -167,10 +167,6 @@
|
|||
{
|
||||
"id": "x",
|
||||
"id_val": "x",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -197,6 +193,10 @@
|
|||
"label": {
|
||||
"value": "x"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -214,10 +214,6 @@
|
|||
{
|
||||
"id": "y",
|
||||
"id_val": "y",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -244,6 +240,10 @@
|
|||
"label": {
|
||||
"value": "y"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
|
|||
36
testdata/d2compiler/TestCompile/edge_flat_arrowhead.exp.json
generated
vendored
36
testdata/d2compiler/TestCompile/edge_flat_arrowhead.exp.json
generated
vendored
|
|
@ -144,14 +144,14 @@
|
|||
"root": {
|
||||
"id": "",
|
||||
"id_val": "",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"attributes": {
|
||||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -171,16 +171,16 @@
|
|||
"index": 0,
|
||||
"minWidth": 0,
|
||||
"minHeight": 0,
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"isCurve": false,
|
||||
"src_arrow": false,
|
||||
"srcArrowhead": {
|
||||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -206,6 +206,10 @@
|
|||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -225,10 +229,6 @@
|
|||
{
|
||||
"id": "x",
|
||||
"id_val": "x",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -275,6 +275,10 @@
|
|||
"label": {
|
||||
"value": "x"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -292,10 +296,6 @@
|
|||
{
|
||||
"id": "y",
|
||||
"id_val": "y",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -342,6 +342,10 @@
|
|||
"label": {
|
||||
"value": "y"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
|
|||
36
testdata/d2compiler/TestCompile/edge_flat_label_arrowhead.exp.json
generated
vendored
36
testdata/d2compiler/TestCompile/edge_flat_label_arrowhead.exp.json
generated
vendored
|
|
@ -112,14 +112,14 @@
|
|||
"root": {
|
||||
"id": "",
|
||||
"id_val": "",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"attributes": {
|
||||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -139,16 +139,16 @@
|
|||
"index": 0,
|
||||
"minWidth": 0,
|
||||
"minHeight": 0,
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"isCurve": false,
|
||||
"src_arrow": false,
|
||||
"srcArrowhead": {
|
||||
"label": {
|
||||
"value": "yo"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -171,6 +171,10 @@
|
|||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -190,10 +194,6 @@
|
|||
{
|
||||
"id": "x",
|
||||
"id_val": "x",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -220,6 +220,10 @@
|
|||
"label": {
|
||||
"value": "x"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -237,10 +241,6 @@
|
|||
{
|
||||
"id": "y",
|
||||
"id_val": "y",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -267,6 +267,10 @@
|
|||
"label": {
|
||||
"value": "y"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
|
|||
32
testdata/d2compiler/TestCompile/edge_index.exp.json
generated
vendored
32
testdata/d2compiler/TestCompile/edge_index.exp.json
generated
vendored
|
|
@ -127,14 +127,14 @@
|
|||
"root": {
|
||||
"id": "",
|
||||
"id_val": "",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"attributes": {
|
||||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -154,10 +154,6 @@
|
|||
"index": 0,
|
||||
"minWidth": 0,
|
||||
"minHeight": 0,
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"isCurve": false,
|
||||
"src_arrow": false,
|
||||
"dst_arrow": true,
|
||||
|
|
@ -173,6 +169,10 @@
|
|||
"label": {
|
||||
"value": "two"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -192,10 +192,6 @@
|
|||
{
|
||||
"id": "x",
|
||||
"id_val": "x",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -242,6 +238,10 @@
|
|||
"label": {
|
||||
"value": "x"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -259,10 +259,6 @@
|
|||
{
|
||||
"id": "y",
|
||||
"id_val": "y",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -309,6 +305,10 @@
|
|||
"label": {
|
||||
"value": "y"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
|
|||
32
testdata/d2compiler/TestCompile/edge_index_map.exp.json
generated
vendored
32
testdata/d2compiler/TestCompile/edge_index_map.exp.json
generated
vendored
|
|
@ -146,14 +146,14 @@
|
|||
"root": {
|
||||
"id": "",
|
||||
"id_val": "",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"attributes": {
|
||||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -173,10 +173,6 @@
|
|||
"index": 0,
|
||||
"minWidth": 0,
|
||||
"minHeight": 0,
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"isCurve": false,
|
||||
"src_arrow": false,
|
||||
"dst_arrow": true,
|
||||
|
|
@ -192,6 +188,10 @@
|
|||
"label": {
|
||||
"value": "Space: the final frontier. These are the voyages of the starship Enterprise."
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -211,10 +211,6 @@
|
|||
{
|
||||
"id": "x",
|
||||
"id_val": "x",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -261,6 +257,10 @@
|
|||
"label": {
|
||||
"value": "x"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -278,10 +278,6 @@
|
|||
{
|
||||
"id": "y",
|
||||
"id_val": "y",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -328,6 +324,10 @@
|
|||
"label": {
|
||||
"value": "y"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
|
|||
40
testdata/d2compiler/TestCompile/edge_index_nested.exp.json
generated
vendored
40
testdata/d2compiler/TestCompile/edge_index_nested.exp.json
generated
vendored
|
|
@ -156,14 +156,14 @@
|
|||
"root": {
|
||||
"id": "",
|
||||
"id_val": "",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"attributes": {
|
||||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -183,10 +183,6 @@
|
|||
"index": 0,
|
||||
"minWidth": 0,
|
||||
"minHeight": 0,
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"isCurve": false,
|
||||
"src_arrow": false,
|
||||
"dst_arrow": true,
|
||||
|
|
@ -202,6 +198,10 @@
|
|||
"label": {
|
||||
"value": "two"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -221,10 +221,6 @@
|
|||
{
|
||||
"id": "b",
|
||||
"id_val": "b",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -251,6 +247,10 @@
|
|||
"label": {
|
||||
"value": "b"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -268,10 +268,6 @@
|
|||
{
|
||||
"id": "x",
|
||||
"id_val": "x",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -318,6 +314,10 @@
|
|||
"label": {
|
||||
"value": "x"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -335,10 +335,6 @@
|
|||
{
|
||||
"id": "y",
|
||||
"id_val": "y",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -385,6 +381,10 @@
|
|||
"label": {
|
||||
"value": "y"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
|
|||
40
testdata/d2compiler/TestCompile/edge_index_nested_cross_scope.exp.json
generated
vendored
40
testdata/d2compiler/TestCompile/edge_index_nested_cross_scope.exp.json
generated
vendored
|
|
@ -172,14 +172,14 @@
|
|||
"root": {
|
||||
"id": "",
|
||||
"id_val": "",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"attributes": {
|
||||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -199,10 +199,6 @@
|
|||
"index": 0,
|
||||
"minWidth": 0,
|
||||
"minHeight": 0,
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"isCurve": false,
|
||||
"src_arrow": false,
|
||||
"dst_arrow": true,
|
||||
|
|
@ -218,6 +214,10 @@
|
|||
"label": {
|
||||
"value": "two"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -237,10 +237,6 @@
|
|||
{
|
||||
"id": "b",
|
||||
"id_val": "b",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -287,6 +283,10 @@
|
|||
"label": {
|
||||
"value": "b"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -304,10 +304,6 @@
|
|||
{
|
||||
"id": "x",
|
||||
"id_val": "x",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -354,6 +350,10 @@
|
|||
"label": {
|
||||
"value": "x"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -371,10 +371,6 @@
|
|||
{
|
||||
"id": "y",
|
||||
"id_val": "y",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -421,6 +417,10 @@
|
|||
"label": {
|
||||
"value": "y"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
|
|||
40
testdata/d2compiler/TestCompile/edge_key_group_flat_nested.exp.json
generated
vendored
40
testdata/d2compiler/TestCompile/edge_key_group_flat_nested.exp.json
generated
vendored
|
|
@ -185,14 +185,14 @@
|
|||
"root": {
|
||||
"id": "",
|
||||
"id_val": "",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"attributes": {
|
||||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -212,10 +212,6 @@
|
|||
"index": 0,
|
||||
"minWidth": 0,
|
||||
"minHeight": 0,
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"isCurve": false,
|
||||
"src_arrow": false,
|
||||
"dst_arrow": true,
|
||||
|
|
@ -231,6 +227,10 @@
|
|||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {
|
||||
"opacity": {
|
||||
"value": "0.4"
|
||||
|
|
@ -254,10 +254,6 @@
|
|||
{
|
||||
"id": "x",
|
||||
"id_val": "x",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -304,6 +300,10 @@
|
|||
"label": {
|
||||
"value": "x"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -321,10 +321,6 @@
|
|||
{
|
||||
"id": "a",
|
||||
"id_val": "a",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -371,6 +367,10 @@
|
|||
"label": {
|
||||
"value": "a"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -388,10 +388,6 @@
|
|||
{
|
||||
"id": "b",
|
||||
"id_val": "b",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -438,6 +434,10 @@
|
|||
"label": {
|
||||
"value": "b"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
|
|||
40
testdata/d2compiler/TestCompile/edge_key_group_flat_nested_underscore.exp.json
generated
vendored
40
testdata/d2compiler/TestCompile/edge_key_group_flat_nested_underscore.exp.json
generated
vendored
|
|
@ -191,14 +191,14 @@
|
|||
"root": {
|
||||
"id": "",
|
||||
"id_val": "",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"attributes": {
|
||||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -218,10 +218,6 @@
|
|||
"index": 0,
|
||||
"minWidth": 0,
|
||||
"minHeight": 0,
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"isCurve": false,
|
||||
"src_arrow": false,
|
||||
"dst_arrow": true,
|
||||
|
|
@ -237,6 +233,10 @@
|
|||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {
|
||||
"opacity": {
|
||||
"value": "0.4"
|
||||
|
|
@ -260,10 +260,6 @@
|
|||
{
|
||||
"id": "a",
|
||||
"id_val": "a",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -290,6 +286,10 @@
|
|||
"label": {
|
||||
"value": "a"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -307,10 +307,6 @@
|
|||
{
|
||||
"id": "b",
|
||||
"id_val": "b",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -337,6 +333,10 @@
|
|||
"label": {
|
||||
"value": "b"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -354,10 +354,6 @@
|
|||
{
|
||||
"id": "x",
|
||||
"id_val": "x",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -384,6 +380,10 @@
|
|||
"label": {
|
||||
"value": "x"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
|
|||
40
testdata/d2compiler/TestCompile/edge_key_group_map_flat_nested_underscore.exp.json
generated
vendored
40
testdata/d2compiler/TestCompile/edge_key_group_map_flat_nested_underscore.exp.json
generated
vendored
|
|
@ -204,14 +204,14 @@
|
|||
"root": {
|
||||
"id": "",
|
||||
"id_val": "",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"attributes": {
|
||||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -231,10 +231,6 @@
|
|||
"index": 0,
|
||||
"minWidth": 0,
|
||||
"minHeight": 0,
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"isCurve": false,
|
||||
"src_arrow": false,
|
||||
"dst_arrow": true,
|
||||
|
|
@ -250,6 +246,10 @@
|
|||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {
|
||||
"opacity": {
|
||||
"value": "0.4"
|
||||
|
|
@ -273,10 +273,6 @@
|
|||
{
|
||||
"id": "a",
|
||||
"id_val": "a",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -303,6 +299,10 @@
|
|||
"label": {
|
||||
"value": "a"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -320,10 +320,6 @@
|
|||
{
|
||||
"id": "b",
|
||||
"id_val": "b",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -350,6 +346,10 @@
|
|||
"label": {
|
||||
"value": "b"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -367,10 +367,6 @@
|
|||
{
|
||||
"id": "x",
|
||||
"id_val": "x",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -397,6 +393,10 @@
|
|||
"label": {
|
||||
"value": "x"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
|
|||
40
testdata/d2compiler/TestCompile/edge_key_group_map_nested_underscore.exp.json
generated
vendored
40
testdata/d2compiler/TestCompile/edge_key_group_map_nested_underscore.exp.json
generated
vendored
|
|
@ -222,14 +222,14 @@
|
|||
"root": {
|
||||
"id": "",
|
||||
"id_val": "",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"attributes": {
|
||||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -249,10 +249,6 @@
|
|||
"index": 0,
|
||||
"minWidth": 0,
|
||||
"minHeight": 0,
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"isCurve": false,
|
||||
"src_arrow": false,
|
||||
"dst_arrow": true,
|
||||
|
|
@ -268,6 +264,10 @@
|
|||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {
|
||||
"opacity": {
|
||||
"value": "0.4"
|
||||
|
|
@ -291,10 +291,6 @@
|
|||
{
|
||||
"id": "a",
|
||||
"id_val": "a",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -321,6 +317,10 @@
|
|||
"label": {
|
||||
"value": "a"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -338,10 +338,6 @@
|
|||
{
|
||||
"id": "b",
|
||||
"id_val": "b",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -368,6 +364,10 @@
|
|||
"label": {
|
||||
"value": "b"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -385,10 +385,6 @@
|
|||
{
|
||||
"id": "x",
|
||||
"id_val": "x",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -415,6 +411,10 @@
|
|||
"label": {
|
||||
"value": "x"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
|
|||
32
testdata/d2compiler/TestCompile/edge_label_map.exp.json
generated
vendored
32
testdata/d2compiler/TestCompile/edge_label_map.exp.json
generated
vendored
|
|
@ -112,14 +112,14 @@
|
|||
"root": {
|
||||
"id": "",
|
||||
"id_val": "",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"attributes": {
|
||||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -139,10 +139,6 @@
|
|||
"index": 0,
|
||||
"minWidth": 0,
|
||||
"minHeight": 0,
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"isCurve": false,
|
||||
"src_arrow": false,
|
||||
"dst_arrow": true,
|
||||
|
|
@ -155,6 +151,10 @@
|
|||
"label": {
|
||||
"value": "asdf"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {
|
||||
"opacity": {
|
||||
"value": "0.5"
|
||||
|
|
@ -178,10 +178,6 @@
|
|||
{
|
||||
"id": "hey y9",
|
||||
"id_val": "hey y9",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -208,6 +204,10 @@
|
|||
"label": {
|
||||
"value": "hey y9"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -225,10 +225,6 @@
|
|||
{
|
||||
"id": "qwer",
|
||||
"id_val": "qwer",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -255,6 +251,10 @@
|
|||
"label": {
|
||||
"value": "qwer"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
|
|||
32
testdata/d2compiler/TestCompile/edge_map.exp.json
generated
vendored
32
testdata/d2compiler/TestCompile/edge_map.exp.json
generated
vendored
|
|
@ -95,14 +95,14 @@
|
|||
"root": {
|
||||
"id": "",
|
||||
"id_val": "",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"attributes": {
|
||||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -122,10 +122,6 @@
|
|||
"index": 0,
|
||||
"minWidth": 0,
|
||||
"minHeight": 0,
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"isCurve": false,
|
||||
"src_arrow": false,
|
||||
"dst_arrow": true,
|
||||
|
|
@ -138,6 +134,10 @@
|
|||
"label": {
|
||||
"value": "Space: the final frontier. These are the voyages of the starship Enterprise."
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -157,10 +157,6 @@
|
|||
{
|
||||
"id": "x",
|
||||
"id_val": "x",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -187,6 +183,10 @@
|
|||
"label": {
|
||||
"value": "x"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -204,10 +204,6 @@
|
|||
{
|
||||
"id": "y",
|
||||
"id_val": "y",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -234,6 +230,10 @@
|
|||
"label": {
|
||||
"value": "y"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
|
|||
36
testdata/d2compiler/TestCompile/edge_map_arrowhead.exp.json
generated
vendored
36
testdata/d2compiler/TestCompile/edge_map_arrowhead.exp.json
generated
vendored
|
|
@ -124,14 +124,14 @@
|
|||
"root": {
|
||||
"id": "",
|
||||
"id_val": "",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"attributes": {
|
||||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -151,16 +151,16 @@
|
|||
"index": 0,
|
||||
"minWidth": 0,
|
||||
"minHeight": 0,
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"isCurve": false,
|
||||
"src_arrow": false,
|
||||
"srcArrowhead": {
|
||||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -183,6 +183,10 @@
|
|||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -202,10 +206,6 @@
|
|||
{
|
||||
"id": "x",
|
||||
"id_val": "x",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -232,6 +232,10 @@
|
|||
"label": {
|
||||
"value": "x"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -249,10 +253,6 @@
|
|||
{
|
||||
"id": "y",
|
||||
"id_val": "y",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -279,6 +279,10 @@
|
|||
"label": {
|
||||
"value": "y"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
|
|||
32
testdata/d2compiler/TestCompile/edge_map_group_flat.exp.json
generated
vendored
32
testdata/d2compiler/TestCompile/edge_map_group_flat.exp.json
generated
vendored
|
|
@ -140,14 +140,14 @@
|
|||
"root": {
|
||||
"id": "",
|
||||
"id_val": "",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"attributes": {
|
||||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -167,10 +167,6 @@
|
|||
"index": 0,
|
||||
"minWidth": 0,
|
||||
"minHeight": 0,
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"isCurve": false,
|
||||
"src_arrow": false,
|
||||
"dst_arrow": true,
|
||||
|
|
@ -186,6 +182,10 @@
|
|||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {
|
||||
"opacity": {
|
||||
"value": "0.4"
|
||||
|
|
@ -209,10 +209,6 @@
|
|||
{
|
||||
"id": "x",
|
||||
"id_val": "x",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -259,6 +255,10 @@
|
|||
"label": {
|
||||
"value": "x"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -276,10 +276,6 @@
|
|||
{
|
||||
"id": "y",
|
||||
"id_val": "y",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -326,6 +322,10 @@
|
|||
"label": {
|
||||
"value": "y"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
|
|||
32
testdata/d2compiler/TestCompile/edge_map_group_semiflat.exp.json
generated
vendored
32
testdata/d2compiler/TestCompile/edge_map_group_semiflat.exp.json
generated
vendored
|
|
@ -158,14 +158,14 @@
|
|||
"root": {
|
||||
"id": "",
|
||||
"id_val": "",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"attributes": {
|
||||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -185,10 +185,6 @@
|
|||
"index": 0,
|
||||
"minWidth": 0,
|
||||
"minHeight": 0,
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"isCurve": false,
|
||||
"src_arrow": false,
|
||||
"dst_arrow": true,
|
||||
|
|
@ -204,6 +200,10 @@
|
|||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {
|
||||
"opacity": {
|
||||
"value": "0.4"
|
||||
|
|
@ -227,10 +227,6 @@
|
|||
{
|
||||
"id": "x",
|
||||
"id_val": "x",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -277,6 +273,10 @@
|
|||
"label": {
|
||||
"value": "x"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -294,10 +294,6 @@
|
|||
{
|
||||
"id": "y",
|
||||
"id_val": "y",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -344,6 +340,10 @@
|
|||
"label": {
|
||||
"value": "y"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
|
|||
32
testdata/d2compiler/TestCompile/edge_map_nested.exp.json
generated
vendored
32
testdata/d2compiler/TestCompile/edge_map_nested.exp.json
generated
vendored
|
|
@ -120,14 +120,14 @@
|
|||
"root": {
|
||||
"id": "",
|
||||
"id_val": "",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"attributes": {
|
||||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -147,10 +147,6 @@
|
|||
"index": 0,
|
||||
"minWidth": 0,
|
||||
"minHeight": 0,
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"isCurve": false,
|
||||
"src_arrow": false,
|
||||
"dst_arrow": true,
|
||||
|
|
@ -163,6 +159,10 @@
|
|||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {
|
||||
"opacity": {
|
||||
"value": "0.4"
|
||||
|
|
@ -186,10 +186,6 @@
|
|||
{
|
||||
"id": "x",
|
||||
"id_val": "x",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -216,6 +212,10 @@
|
|||
"label": {
|
||||
"value": "x"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -233,10 +233,6 @@
|
|||
{
|
||||
"id": "y",
|
||||
"id_val": "y",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -263,6 +259,10 @@
|
|||
"label": {
|
||||
"value": "y"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
|
|||
32
testdata/d2compiler/TestCompile/edge_map_nested_flat.exp.json
generated
vendored
32
testdata/d2compiler/TestCompile/edge_map_nested_flat.exp.json
generated
vendored
|
|
@ -102,14 +102,14 @@
|
|||
"root": {
|
||||
"id": "",
|
||||
"id_val": "",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"attributes": {
|
||||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -129,10 +129,6 @@
|
|||
"index": 0,
|
||||
"minWidth": 0,
|
||||
"minHeight": 0,
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"isCurve": false,
|
||||
"src_arrow": false,
|
||||
"dst_arrow": true,
|
||||
|
|
@ -145,6 +141,10 @@
|
|||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {
|
||||
"opacity": {
|
||||
"value": "0.4"
|
||||
|
|
@ -168,10 +168,6 @@
|
|||
{
|
||||
"id": "x",
|
||||
"id_val": "x",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -198,6 +194,10 @@
|
|||
"label": {
|
||||
"value": "x"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -215,10 +215,6 @@
|
|||
{
|
||||
"id": "y",
|
||||
"id_val": "y",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -245,6 +241,10 @@
|
|||
"label": {
|
||||
"value": "y"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
|
|||
40
testdata/d2compiler/TestCompile/edge_mixed_arrowhead.exp.json
generated
vendored
40
testdata/d2compiler/TestCompile/edge_mixed_arrowhead.exp.json
generated
vendored
|
|
@ -212,14 +212,14 @@
|
|||
"root": {
|
||||
"id": "",
|
||||
"id_val": "",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"attributes": {
|
||||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -239,16 +239,16 @@
|
|||
"index": 0,
|
||||
"minWidth": 0,
|
||||
"minHeight": 0,
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"isCurve": false,
|
||||
"src_arrow": false,
|
||||
"srcArrowhead": {
|
||||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -266,6 +266,10 @@
|
|||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -290,6 +294,10 @@
|
|||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -309,10 +317,6 @@
|
|||
{
|
||||
"id": "x",
|
||||
"id_val": "x",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -359,6 +363,10 @@
|
|||
"label": {
|
||||
"value": "x"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -376,10 +384,6 @@
|
|||
{
|
||||
"id": "y",
|
||||
"id_val": "y",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -426,6 +430,10 @@
|
|||
"label": {
|
||||
"value": "y"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
|
|||
36
testdata/d2compiler/TestCompile/edge_non_shape_arrowhead.exp.json
generated
vendored
36
testdata/d2compiler/TestCompile/edge_non_shape_arrowhead.exp.json
generated
vendored
|
|
@ -106,14 +106,14 @@
|
|||
"root": {
|
||||
"id": "",
|
||||
"id_val": "",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"attributes": {
|
||||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -133,16 +133,16 @@
|
|||
"index": 0,
|
||||
"minWidth": 0,
|
||||
"minHeight": 0,
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"isCurve": false,
|
||||
"src_arrow": false,
|
||||
"srcArrowhead": {
|
||||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -165,6 +165,10 @@
|
|||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -184,10 +188,6 @@
|
|||
{
|
||||
"id": "x",
|
||||
"id_val": "x",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -214,6 +214,10 @@
|
|||
"label": {
|
||||
"value": "x"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -231,10 +235,6 @@
|
|||
{
|
||||
"id": "y",
|
||||
"id_val": "y",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -261,6 +261,10 @@
|
|||
"label": {
|
||||
"value": "y"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
|
|||
36
testdata/d2compiler/TestCompile/edge_semiflat_arrowhead.exp.json
generated
vendored
36
testdata/d2compiler/TestCompile/edge_semiflat_arrowhead.exp.json
generated
vendored
|
|
@ -162,14 +162,14 @@
|
|||
"root": {
|
||||
"id": "",
|
||||
"id_val": "",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"attributes": {
|
||||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -189,16 +189,16 @@
|
|||
"index": 0,
|
||||
"minWidth": 0,
|
||||
"minHeight": 0,
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"isCurve": false,
|
||||
"src_arrow": false,
|
||||
"srcArrowhead": {
|
||||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -224,6 +224,10 @@
|
|||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -243,10 +247,6 @@
|
|||
{
|
||||
"id": "x",
|
||||
"id_val": "x",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -293,6 +293,10 @@
|
|||
"label": {
|
||||
"value": "x"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -310,10 +314,6 @@
|
|||
{
|
||||
"id": "y",
|
||||
"id_val": "y",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -360,6 +360,10 @@
|
|||
"label": {
|
||||
"value": "y"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
|
|||
16
testdata/d2compiler/TestCompile/escaped_id.exp.json
generated
vendored
16
testdata/d2compiler/TestCompile/escaped_id.exp.json
generated
vendored
|
|
@ -33,14 +33,14 @@
|
|||
"root": {
|
||||
"id": "",
|
||||
"id_val": "",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"attributes": {
|
||||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -60,10 +60,6 @@
|
|||
{
|
||||
"id": "\"b\\nb\"",
|
||||
"id_val": "b\nb",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -90,6 +86,10 @@
|
|||
"label": {
|
||||
"value": "b\nb"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
|
|||
16
testdata/d2compiler/TestCompile/fill-pattern.exp.json
generated
vendored
16
testdata/d2compiler/TestCompile/fill-pattern.exp.json
generated
vendored
|
|
@ -101,14 +101,14 @@
|
|||
"root": {
|
||||
"id": "",
|
||||
"id_val": "",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"attributes": {
|
||||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -128,10 +128,6 @@
|
|||
{
|
||||
"id": "x",
|
||||
"id_val": "x",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -158,6 +154,10 @@
|
|||
"label": {
|
||||
"value": "x"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {
|
||||
"fillPattern": {
|
||||
"value": "dots"
|
||||
|
|
|
|||
16
testdata/d2compiler/TestCompile/grid.exp.json
generated
vendored
16
testdata/d2compiler/TestCompile/grid.exp.json
generated
vendored
|
|
@ -97,14 +97,14 @@
|
|||
"root": {
|
||||
"id": "",
|
||||
"id_val": "",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"attributes": {
|
||||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -124,10 +124,6 @@
|
|||
{
|
||||
"id": "hey",
|
||||
"id_val": "hey",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -154,6 +150,10 @@
|
|||
"label": {
|
||||
"value": "hey"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
|
|||
16
testdata/d2compiler/TestCompile/image_style.exp.json
generated
vendored
16
testdata/d2compiler/TestCompile/image_style.exp.json
generated
vendored
|
|
@ -154,14 +154,14 @@
|
|||
"root": {
|
||||
"id": "",
|
||||
"id_val": "",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"attributes": {
|
||||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -181,10 +181,6 @@
|
|||
{
|
||||
"id": "hey",
|
||||
"id_val": "hey",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -211,6 +207,10 @@
|
|||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {
|
||||
"stroke": {
|
||||
"value": "#0D32B2"
|
||||
|
|
|
|||
40
testdata/d2compiler/TestCompile/link-board-key-nested.exp.json
generated
vendored
40
testdata/d2compiler/TestCompile/link-board-key-nested.exp.json
generated
vendored
|
|
@ -163,14 +163,14 @@
|
|||
"root": {
|
||||
"id": "",
|
||||
"id_val": "",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"attributes": {
|
||||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -190,10 +190,6 @@
|
|||
{
|
||||
"id": "x",
|
||||
"id_val": "x",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -220,6 +216,10 @@
|
|||
"label": {
|
||||
"value": "x"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -237,10 +237,6 @@
|
|||
{
|
||||
"id": "y",
|
||||
"id_val": "y",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -278,6 +274,10 @@
|
|||
"label": {
|
||||
"value": "y"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"link": {
|
||||
"value": "root.layers.x"
|
||||
|
|
@ -461,14 +461,14 @@
|
|||
"root": {
|
||||
"id": "",
|
||||
"id_val": "",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"attributes": {
|
||||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -488,10 +488,6 @@
|
|||
{
|
||||
"id": "yo",
|
||||
"id_val": "yo",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -518,6 +514,10 @@
|
|||
"label": {
|
||||
"value": "yo"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
|
|||
64
testdata/d2compiler/TestCompile/link-board-mixed.exp.json
generated
vendored
64
testdata/d2compiler/TestCompile/link-board-mixed.exp.json
generated
vendored
|
|
@ -313,14 +313,14 @@
|
|||
"root": {
|
||||
"id": "",
|
||||
"id_val": "",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"attributes": {
|
||||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -340,10 +340,6 @@
|
|||
{
|
||||
"id": "question",
|
||||
"id_val": "question",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -401,6 +397,10 @@
|
|||
"label": {
|
||||
"value": "How does the cat go?"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"link": {
|
||||
"value": "root.layers.cat"
|
||||
|
|
@ -734,14 +734,14 @@
|
|||
"root": {
|
||||
"id": "",
|
||||
"id_val": "",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"attributes": {
|
||||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -761,10 +761,6 @@
|
|||
"index": 0,
|
||||
"minWidth": 0,
|
||||
"minHeight": 0,
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"isCurve": false,
|
||||
"src_arrow": false,
|
||||
"dst_arrow": true,
|
||||
|
|
@ -777,6 +773,10 @@
|
|||
"label": {
|
||||
"value": "goes"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -796,10 +796,6 @@
|
|||
{
|
||||
"id": "the cat",
|
||||
"id_val": "the cat",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -826,6 +822,10 @@
|
|||
"label": {
|
||||
"value": "the cat"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -843,10 +843,6 @@
|
|||
{
|
||||
"id": "meeeowwww",
|
||||
"id_val": "meeeowwww",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -873,6 +869,10 @@
|
|||
"label": {
|
||||
"value": "meeeowwww"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -1205,14 +1205,14 @@
|
|||
"root": {
|
||||
"id": "",
|
||||
"id_val": "",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"attributes": {
|
||||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -1232,10 +1232,6 @@
|
|||
{
|
||||
"id": "question",
|
||||
"id_val": "question",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -1335,6 +1331,10 @@
|
|||
"label": {
|
||||
"value": "How does the cat go?"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {
|
||||
"fill": {
|
||||
"value": "green"
|
||||
|
|
|
|||
40
testdata/d2compiler/TestCompile/link-board-nested.exp.json
generated
vendored
40
testdata/d2compiler/TestCompile/link-board-nested.exp.json
generated
vendored
|
|
@ -192,14 +192,14 @@
|
|||
"root": {
|
||||
"id": "",
|
||||
"id_val": "",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"attributes": {
|
||||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -219,10 +219,6 @@
|
|||
{
|
||||
"id": "x",
|
||||
"id_val": "x",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -260,6 +256,10 @@
|
|||
"label": {
|
||||
"value": "x"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"link": {
|
||||
"value": "root.layers.x.layers.x"
|
||||
|
|
@ -472,14 +472,14 @@
|
|||
"root": {
|
||||
"id": "",
|
||||
"id_val": "",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"attributes": {
|
||||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -690,14 +690,14 @@
|
|||
"root": {
|
||||
"id": "",
|
||||
"id_val": "",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"attributes": {
|
||||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -717,10 +717,6 @@
|
|||
{
|
||||
"id": "hello",
|
||||
"id_val": "hello",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -747,6 +743,10 @@
|
|||
"label": {
|
||||
"value": "hello"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
|
|||
32
testdata/d2compiler/TestCompile/link-board-ok.exp.json
generated
vendored
32
testdata/d2compiler/TestCompile/link-board-ok.exp.json
generated
vendored
|
|
@ -134,14 +134,14 @@
|
|||
"root": {
|
||||
"id": "",
|
||||
"id_val": "",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"attributes": {
|
||||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -161,10 +161,6 @@
|
|||
{
|
||||
"id": "x",
|
||||
"id_val": "x",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -202,6 +198,10 @@
|
|||
"label": {
|
||||
"value": "x"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"link": {
|
||||
"value": "root.layers.x"
|
||||
|
|
@ -356,14 +356,14 @@
|
|||
"root": {
|
||||
"id": "",
|
||||
"id_val": "",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"attributes": {
|
||||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -383,10 +383,6 @@
|
|||
{
|
||||
"id": "y",
|
||||
"id_val": "y",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -413,6 +409,10 @@
|
|||
"label": {
|
||||
"value": "y"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
|
|||
56
testdata/d2compiler/TestCompile/link-board-underscore.exp.json
generated
vendored
56
testdata/d2compiler/TestCompile/link-board-underscore.exp.json
generated
vendored
|
|
@ -258,14 +258,14 @@
|
|||
"root": {
|
||||
"id": "",
|
||||
"id_val": "",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"attributes": {
|
||||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -285,10 +285,6 @@
|
|||
{
|
||||
"id": "x",
|
||||
"id_val": "x",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -315,6 +311,10 @@
|
|||
"label": {
|
||||
"value": "x"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -590,14 +590,14 @@
|
|||
"root": {
|
||||
"id": "",
|
||||
"id_val": "",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"attributes": {
|
||||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -617,10 +617,6 @@
|
|||
{
|
||||
"id": "yo",
|
||||
"id_val": "yo",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -647,6 +643,10 @@
|
|||
"label": {
|
||||
"value": "yo"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -922,14 +922,14 @@
|
|||
"root": {
|
||||
"id": "",
|
||||
"id_val": "",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"attributes": {
|
||||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -949,10 +949,6 @@
|
|||
{
|
||||
"id": "hello",
|
||||
"id_val": "hello",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -990,6 +986,10 @@
|
|||
"label": {
|
||||
"value": "hello"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"link": {
|
||||
"value": "root.layers.x"
|
||||
|
|
@ -1010,10 +1010,6 @@
|
|||
{
|
||||
"id": "hey",
|
||||
"id_val": "hey",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -1051,6 +1047,10 @@
|
|||
"label": {
|
||||
"value": "hey"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"link": {
|
||||
"value": "root.layers.x"
|
||||
|
|
|
|||
16
testdata/d2compiler/TestCompile/missing-class.exp.json
generated
vendored
16
testdata/d2compiler/TestCompile/missing-class.exp.json
generated
vendored
|
|
@ -54,14 +54,14 @@
|
|||
"root": {
|
||||
"id": "",
|
||||
"id_val": "",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"attributes": {
|
||||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -81,10 +81,6 @@
|
|||
{
|
||||
"id": "x",
|
||||
"id_val": "x",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -122,6 +118,10 @@
|
|||
"label": {
|
||||
"value": "x"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
|
|||
16
testdata/d2compiler/TestCompile/near_constant.exp.json
generated
vendored
16
testdata/d2compiler/TestCompile/near_constant.exp.json
generated
vendored
|
|
@ -54,14 +54,14 @@
|
|||
"root": {
|
||||
"id": "",
|
||||
"id_val": "",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"attributes": {
|
||||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -81,10 +81,6 @@
|
|||
{
|
||||
"id": "x",
|
||||
"id_val": "x",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -122,6 +118,10 @@
|
|||
"label": {
|
||||
"value": "x"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": {
|
||||
"range": "d2/testdata/d2compiler/TestCompile/near_constant.d2,0:8:8-0:18:18",
|
||||
|
|
|
|||
24
testdata/d2compiler/TestCompile/nested_sql.exp.json
generated
vendored
24
testdata/d2compiler/TestCompile/nested_sql.exp.json
generated
vendored
|
|
@ -167,14 +167,14 @@
|
|||
"root": {
|
||||
"id": "",
|
||||
"id_val": "",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"attributes": {
|
||||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -194,10 +194,6 @@
|
|||
{
|
||||
"id": "outer",
|
||||
"id_val": "outer",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -224,6 +220,10 @@
|
|||
"label": {
|
||||
"value": "outer"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -241,10 +241,6 @@
|
|||
{
|
||||
"id": "table",
|
||||
"id_val": "table",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -331,6 +327,10 @@
|
|||
"label": {
|
||||
"value": "table"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
|
|||
24
testdata/d2compiler/TestCompile/nil_scope_obj_regression.exp.json
generated
vendored
24
testdata/d2compiler/TestCompile/nil_scope_obj_regression.exp.json
generated
vendored
|
|
@ -96,14 +96,14 @@
|
|||
"root": {
|
||||
"id": "",
|
||||
"id_val": "",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"attributes": {
|
||||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -123,10 +123,6 @@
|
|||
{
|
||||
"id": "a",
|
||||
"id_val": "a",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -184,6 +180,10 @@
|
|||
"label": {
|
||||
"value": "a"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -201,10 +201,6 @@
|
|||
{
|
||||
"id": "b",
|
||||
"id_val": "b",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -231,6 +227,10 @@
|
|||
"label": {
|
||||
"value": "b"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
|
|||
16
testdata/d2compiler/TestCompile/null.exp.json
generated
vendored
16
testdata/d2compiler/TestCompile/null.exp.json
generated
vendored
|
|
@ -33,14 +33,14 @@
|
|||
"root": {
|
||||
"id": "",
|
||||
"id_val": "",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"attributes": {
|
||||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -60,10 +60,6 @@
|
|||
{
|
||||
"id": "'null'",
|
||||
"id_val": "null",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -90,6 +86,10 @@
|
|||
"label": {
|
||||
"value": "null"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
|
|||
16
testdata/d2compiler/TestCompile/path_link.exp.json
generated
vendored
16
testdata/d2compiler/TestCompile/path_link.exp.json
generated
vendored
|
|
@ -72,14 +72,14 @@
|
|||
"root": {
|
||||
"id": "",
|
||||
"id_val": "",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"attributes": {
|
||||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -99,10 +99,6 @@
|
|||
{
|
||||
"id": "x",
|
||||
"id_val": "x",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -129,6 +125,10 @@
|
|||
"label": {
|
||||
"value": "x"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"link": {
|
||||
"value": "Overview.Untitled board 7.zzzzz"
|
||||
|
|
|
|||
16
testdata/d2compiler/TestCompile/positions.exp.json
generated
vendored
16
testdata/d2compiler/TestCompile/positions.exp.json
generated
vendored
|
|
@ -97,14 +97,14 @@
|
|||
"root": {
|
||||
"id": "",
|
||||
"id_val": "",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"attributes": {
|
||||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -124,10 +124,6 @@
|
|||
{
|
||||
"id": "hey",
|
||||
"id_val": "hey",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -154,6 +150,10 @@
|
|||
"label": {
|
||||
"value": "hey"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"top": {
|
||||
"value": "200"
|
||||
|
|
|
|||
16
testdata/d2compiler/TestCompile/reordered-classes.exp.json
generated
vendored
16
testdata/d2compiler/TestCompile/reordered-classes.exp.json
generated
vendored
|
|
@ -200,14 +200,14 @@
|
|||
"root": {
|
||||
"id": "",
|
||||
"id_val": "",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"attributes": {
|
||||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -227,10 +227,6 @@
|
|||
{
|
||||
"id": "a",
|
||||
"id_val": "a",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -268,6 +264,10 @@
|
|||
"label": {
|
||||
"value": "a"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
|
|||
24
testdata/d2compiler/TestCompile/reserved_icon_near_style.exp.json
generated
vendored
24
testdata/d2compiler/TestCompile/reserved_icon_near_style.exp.json
generated
vendored
|
|
@ -267,14 +267,14 @@
|
|||
"root": {
|
||||
"id": "",
|
||||
"id_val": "",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"attributes": {
|
||||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -294,10 +294,6 @@
|
|||
{
|
||||
"id": "x",
|
||||
"id_val": "x",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -355,6 +351,10 @@
|
|||
"label": {
|
||||
"value": "x"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {
|
||||
"opacity": {
|
||||
"value": "0.5"
|
||||
|
|
@ -410,10 +410,6 @@
|
|||
{
|
||||
"id": "y",
|
||||
"id_val": "y",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -440,6 +436,10 @@
|
|||
"label": {
|
||||
"value": "y"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
|
|||
8
testdata/d2compiler/TestCompile/root_direction.exp.json
generated
vendored
8
testdata/d2compiler/TestCompile/root_direction.exp.json
generated
vendored
|
|
@ -43,14 +43,14 @@
|
|||
"root": {
|
||||
"id": "",
|
||||
"id_val": "",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"attributes": {
|
||||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
|
|||
8
testdata/d2compiler/TestCompile/root_sequence.exp.json
generated
vendored
8
testdata/d2compiler/TestCompile/root_sequence.exp.json
generated
vendored
|
|
@ -43,14 +43,14 @@
|
|||
"root": {
|
||||
"id": "",
|
||||
"id_val": "",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"attributes": {
|
||||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
|
|||
24
testdata/d2compiler/TestCompile/self-referencing.exp.json
generated
vendored
24
testdata/d2compiler/TestCompile/self-referencing.exp.json
generated
vendored
|
|
@ -56,14 +56,14 @@
|
|||
"root": {
|
||||
"id": "",
|
||||
"id_val": "",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"attributes": {
|
||||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -83,10 +83,6 @@
|
|||
"index": 0,
|
||||
"minWidth": 0,
|
||||
"minHeight": 0,
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"isCurve": false,
|
||||
"src_arrow": false,
|
||||
"dst_arrow": true,
|
||||
|
|
@ -99,6 +95,10 @@
|
|||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -118,10 +118,6 @@
|
|||
{
|
||||
"id": "x",
|
||||
"id_val": "x",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -168,6 +164,10 @@
|
|||
"label": {
|
||||
"value": "x"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
|
|||
56
testdata/d2compiler/TestCompile/sequence-timestamp.exp.json
generated
vendored
56
testdata/d2compiler/TestCompile/sequence-timestamp.exp.json
generated
vendored
|
|
@ -227,14 +227,14 @@
|
|||
"root": {
|
||||
"id": "",
|
||||
"id_val": "",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"attributes": {
|
||||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -254,10 +254,6 @@
|
|||
"index": 0,
|
||||
"minWidth": 0,
|
||||
"minHeight": 0,
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"isCurve": false,
|
||||
"src_arrow": false,
|
||||
"dst_arrow": true,
|
||||
|
|
@ -270,6 +266,10 @@
|
|||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -289,10 +289,6 @@
|
|||
{
|
||||
"id": "a",
|
||||
"id_val": "a",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -370,6 +366,10 @@
|
|||
"label": {
|
||||
"value": "a"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -387,10 +387,6 @@
|
|||
{
|
||||
"id": "b",
|
||||
"id_val": "b",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -437,6 +433,10 @@
|
|||
"label": {
|
||||
"value": "b"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -454,10 +454,6 @@
|
|||
{
|
||||
"id": "\"04:20,11:20\"",
|
||||
"id_val": "04:20,11:20",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -484,6 +480,10 @@
|
|||
"label": {
|
||||
"value": "04:20,11:20"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -501,10 +501,6 @@
|
|||
{
|
||||
"id": "loop through each table",
|
||||
"id_val": "loop through each table",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -531,6 +527,10 @@
|
|||
"label": {
|
||||
"value": "loop through each table"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -548,10 +548,6 @@
|
|||
{
|
||||
"id": "\"start_time = datetime.datetime.now\"",
|
||||
"id_val": "start_time = datetime.datetime.now",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -589,6 +585,10 @@
|
|||
"label": {
|
||||
"value": "start_time = datetime.datetime.now"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
|
|||
80
testdata/d2compiler/TestCompile/sequence_container.exp.json
generated
vendored
80
testdata/d2compiler/TestCompile/sequence_container.exp.json
generated
vendored
|
|
@ -252,14 +252,14 @@
|
|||
"root": {
|
||||
"id": "",
|
||||
"id_val": "",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"attributes": {
|
||||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -279,10 +279,6 @@
|
|||
"index": 1,
|
||||
"minWidth": 0,
|
||||
"minHeight": 0,
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"isCurve": false,
|
||||
"src_arrow": false,
|
||||
"dst_arrow": true,
|
||||
|
|
@ -295,6 +291,10 @@
|
|||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -313,10 +313,6 @@
|
|||
"index": 0,
|
||||
"minWidth": 0,
|
||||
"minHeight": 0,
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"isCurve": false,
|
||||
"src_arrow": false,
|
||||
"dst_arrow": true,
|
||||
|
|
@ -329,6 +325,10 @@
|
|||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -348,10 +348,6 @@
|
|||
{
|
||||
"id": "x",
|
||||
"id_val": "x",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -442,6 +438,10 @@
|
|||
"label": {
|
||||
"value": "x"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -459,10 +459,6 @@
|
|||
{
|
||||
"id": "y",
|
||||
"id_val": "y",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -553,6 +549,10 @@
|
|||
"label": {
|
||||
"value": "y"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -570,10 +570,6 @@
|
|||
{
|
||||
"id": "q",
|
||||
"id_val": "q",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -664,6 +660,10 @@
|
|||
"label": {
|
||||
"value": "q"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -681,10 +681,6 @@
|
|||
{
|
||||
"id": "j",
|
||||
"id_val": "j",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -775,6 +771,10 @@
|
|||
"label": {
|
||||
"value": "j"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -792,10 +792,6 @@
|
|||
{
|
||||
"id": "y",
|
||||
"id_val": "y",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -886,6 +882,10 @@
|
|||
"label": {
|
||||
"value": "y"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -903,10 +903,6 @@
|
|||
{
|
||||
"id": "p",
|
||||
"id_val": "p",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -997,6 +993,10 @@
|
|||
"label": {
|
||||
"value": "p"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -1014,10 +1014,6 @@
|
|||
{
|
||||
"id": "ok",
|
||||
"id_val": "ok",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -1044,6 +1040,10 @@
|
|||
"label": {
|
||||
"value": "ok"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
|
|||
80
testdata/d2compiler/TestCompile/sequence_container_2.exp.json
generated
vendored
80
testdata/d2compiler/TestCompile/sequence_container_2.exp.json
generated
vendored
|
|
@ -230,14 +230,14 @@
|
|||
"root": {
|
||||
"id": "",
|
||||
"id_val": "",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"attributes": {
|
||||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -257,10 +257,6 @@
|
|||
"index": 0,
|
||||
"minWidth": 0,
|
||||
"minHeight": 0,
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"isCurve": false,
|
||||
"src_arrow": false,
|
||||
"dst_arrow": true,
|
||||
|
|
@ -273,6 +269,10 @@
|
|||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -292,10 +292,6 @@
|
|||
{
|
||||
"id": "x",
|
||||
"id_val": "x",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -386,6 +382,10 @@
|
|||
"label": {
|
||||
"value": "x"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -403,10 +403,6 @@
|
|||
{
|
||||
"id": "y",
|
||||
"id_val": "y",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -497,6 +493,10 @@
|
|||
"label": {
|
||||
"value": "y"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -514,10 +514,6 @@
|
|||
{
|
||||
"id": "q",
|
||||
"id_val": "q",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -608,6 +604,10 @@
|
|||
"label": {
|
||||
"value": "q"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -625,10 +625,6 @@
|
|||
{
|
||||
"id": "ok",
|
||||
"id_val": "ok",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -655,6 +651,10 @@
|
|||
"label": {
|
||||
"value": "ok"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -672,10 +672,6 @@
|
|||
{
|
||||
"id": "j",
|
||||
"id_val": "j",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -724,6 +720,10 @@
|
|||
"label": {
|
||||
"value": "j"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -741,10 +741,6 @@
|
|||
{
|
||||
"id": "y",
|
||||
"id_val": "y",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -793,6 +789,10 @@
|
|||
"label": {
|
||||
"value": "y"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -810,10 +810,6 @@
|
|||
{
|
||||
"id": "p",
|
||||
"id_val": "p",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -862,6 +858,10 @@
|
|||
"label": {
|
||||
"value": "p"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -879,10 +879,6 @@
|
|||
{
|
||||
"id": "meow",
|
||||
"id_val": "meow",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -909,6 +905,10 @@
|
|||
"label": {
|
||||
"value": "meow"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
|
|||
40
testdata/d2compiler/TestCompile/sequence_grouped_note.exp.json
generated
vendored
40
testdata/d2compiler/TestCompile/sequence_grouped_note.exp.json
generated
vendored
|
|
@ -152,14 +152,14 @@
|
|||
"root": {
|
||||
"id": "",
|
||||
"id_val": "",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"attributes": {
|
||||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -179,10 +179,6 @@
|
|||
{
|
||||
"id": "a",
|
||||
"id_val": "a",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -209,6 +205,10 @@
|
|||
"label": {
|
||||
"value": "a"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -226,10 +226,6 @@
|
|||
{
|
||||
"id": "d",
|
||||
"id_val": "d",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -287,6 +283,10 @@
|
|||
"label": {
|
||||
"value": "d"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -304,10 +304,6 @@
|
|||
{
|
||||
"id": "choo",
|
||||
"id_val": "choo",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -334,6 +330,10 @@
|
|||
"label": {
|
||||
"value": "choo"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -351,10 +351,6 @@
|
|||
{
|
||||
"id": "this note",
|
||||
"id_val": "this note",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -392,6 +388,10 @@
|
|||
"label": {
|
||||
"value": "this note"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
|
|||
88
testdata/d2compiler/TestCompile/sequence_scoping.exp.json
generated
vendored
88
testdata/d2compiler/TestCompile/sequence_scoping.exp.json
generated
vendored
|
|
@ -340,14 +340,14 @@
|
|||
"root": {
|
||||
"id": "",
|
||||
"id_val": "",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"attributes": {
|
||||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -367,10 +367,6 @@
|
|||
"index": 0,
|
||||
"minWidth": 0,
|
||||
"minHeight": 0,
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"isCurve": false,
|
||||
"src_arrow": false,
|
||||
"dst_arrow": true,
|
||||
|
|
@ -383,6 +379,10 @@
|
|||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -401,10 +401,6 @@
|
|||
"index": 0,
|
||||
"minWidth": 0,
|
||||
"minHeight": 0,
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"isCurve": false,
|
||||
"src_arrow": false,
|
||||
"dst_arrow": true,
|
||||
|
|
@ -417,6 +413,10 @@
|
|||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -435,10 +435,6 @@
|
|||
"index": 0,
|
||||
"minWidth": 0,
|
||||
"minHeight": 0,
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"isCurve": false,
|
||||
"src_arrow": false,
|
||||
"dst_arrow": true,
|
||||
|
|
@ -451,6 +447,10 @@
|
|||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -470,10 +470,6 @@
|
|||
{
|
||||
"id": "x",
|
||||
"id_val": "x",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -500,6 +496,10 @@
|
|||
"label": {
|
||||
"value": "x"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -517,10 +517,6 @@
|
|||
{
|
||||
"id": "a",
|
||||
"id_val": "a",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -598,6 +594,10 @@
|
|||
"label": {
|
||||
"value": "a"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -615,10 +615,6 @@
|
|||
{
|
||||
"id": "b",
|
||||
"id_val": "b",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -769,6 +765,10 @@
|
|||
"label": {
|
||||
"value": "b"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -786,10 +786,6 @@
|
|||
{
|
||||
"id": "group",
|
||||
"id_val": "group",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -816,6 +812,10 @@
|
|||
"label": {
|
||||
"value": "group"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -833,10 +833,6 @@
|
|||
{
|
||||
"id": "t1",
|
||||
"id_val": "t1",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -874,6 +870,10 @@
|
|||
"label": {
|
||||
"value": "t1"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -891,10 +891,6 @@
|
|||
{
|
||||
"id": "t1",
|
||||
"id_val": "t1",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -1005,6 +1001,10 @@
|
|||
"label": {
|
||||
"value": "t1"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -1022,10 +1022,6 @@
|
|||
{
|
||||
"id": "t2",
|
||||
"id_val": "t2",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -1074,6 +1070,10 @@
|
|||
"label": {
|
||||
"value": "t2"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
|
|||
16
testdata/d2compiler/TestCompile/set_direction.exp.json
generated
vendored
16
testdata/d2compiler/TestCompile/set_direction.exp.json
generated
vendored
|
|
@ -72,14 +72,14 @@
|
|||
"root": {
|
||||
"id": "",
|
||||
"id_val": "",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"attributes": {
|
||||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -99,10 +99,6 @@
|
|||
{
|
||||
"id": "x",
|
||||
"id_val": "x",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -129,6 +125,10 @@
|
|||
"label": {
|
||||
"value": "x"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
|
|||
16
testdata/d2compiler/TestCompile/single_dimension_on_circle.exp.json
generated
vendored
16
testdata/d2compiler/TestCompile/single_dimension_on_circle.exp.json
generated
vendored
|
|
@ -106,14 +106,14 @@
|
|||
"root": {
|
||||
"id": "",
|
||||
"id_val": "",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"attributes": {
|
||||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -133,10 +133,6 @@
|
|||
{
|
||||
"id": "hey",
|
||||
"id_val": "hey",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -163,6 +159,10 @@
|
|||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"height": {
|
||||
"value": "230"
|
||||
|
|
|
|||
32
testdata/d2compiler/TestCompile/sql-regression.exp.json
generated
vendored
32
testdata/d2compiler/TestCompile/sql-regression.exp.json
generated
vendored
|
|
@ -209,14 +209,14 @@
|
|||
"root": {
|
||||
"id": "",
|
||||
"id_val": "",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"attributes": {
|
||||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -236,10 +236,6 @@
|
|||
{
|
||||
"id": "a",
|
||||
"id_val": "a",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -266,6 +262,10 @@
|
|||
"label": {
|
||||
"value": "a"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {
|
||||
"fill": {
|
||||
"value": "lemonchiffon"
|
||||
|
|
@ -287,10 +287,6 @@
|
|||
{
|
||||
"id": "b",
|
||||
"id_val": "b",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -349,6 +345,10 @@
|
|||
"label": {
|
||||
"value": "b"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -366,10 +366,6 @@
|
|||
{
|
||||
"id": "d",
|
||||
"id_val": "d",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -396,6 +392,10 @@
|
|||
"label": {
|
||||
"value": "d"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
|
|||
16
testdata/d2compiler/TestCompile/sql_paren.exp.json
generated
vendored
16
testdata/d2compiler/TestCompile/sql_paren.exp.json
generated
vendored
|
|
@ -148,14 +148,14 @@
|
|||
"root": {
|
||||
"id": "",
|
||||
"id_val": "",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"attributes": {
|
||||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -175,10 +175,6 @@
|
|||
{
|
||||
"id": "_shape_",
|
||||
"id_val": "_shape_",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -265,6 +261,10 @@
|
|||
"label": {
|
||||
"value": "shape"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
|
|||
16
testdata/d2compiler/TestCompile/stroke-width.exp.json
generated
vendored
16
testdata/d2compiler/TestCompile/stroke-width.exp.json
generated
vendored
|
|
@ -79,14 +79,14 @@
|
|||
"root": {
|
||||
"id": "",
|
||||
"id_val": "",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"attributes": {
|
||||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -106,10 +106,6 @@
|
|||
{
|
||||
"id": "hey",
|
||||
"id_val": "hey",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -136,6 +132,10 @@
|
|||
"label": {
|
||||
"value": "hey"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {
|
||||
"strokeWidth": {
|
||||
"value": "0"
|
||||
|
|
|
|||
32
testdata/d2compiler/TestCompile/table_connection_attr.exp.json
generated
vendored
32
testdata/d2compiler/TestCompile/table_connection_attr.exp.json
generated
vendored
|
|
@ -293,14 +293,14 @@
|
|||
"root": {
|
||||
"id": "",
|
||||
"id_val": "",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"attributes": {
|
||||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -322,10 +322,6 @@
|
|||
"minHeight": 0,
|
||||
"srcTableColumnIndex": 0,
|
||||
"dstTableColumnIndex": 0,
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"isCurve": false,
|
||||
"src_arrow": false,
|
||||
"dst_arrow": true,
|
||||
|
|
@ -338,6 +334,10 @@
|
|||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {
|
||||
"animated": {
|
||||
"value": "true"
|
||||
|
|
@ -361,10 +361,6 @@
|
|||
{
|
||||
"id": "x",
|
||||
"id_val": "x",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -454,6 +450,10 @@
|
|||
"label": {
|
||||
"value": "x"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -471,10 +471,6 @@
|
|||
{
|
||||
"id": "a",
|
||||
"id_val": "a",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -564,6 +560,10 @@
|
|||
"label": {
|
||||
"value": "a"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
|
|||
16
testdata/d2compiler/TestCompile/table_style.exp.json
generated
vendored
16
testdata/d2compiler/TestCompile/table_style.exp.json
generated
vendored
|
|
@ -145,14 +145,14 @@
|
|||
"root": {
|
||||
"id": "",
|
||||
"id_val": "",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"attributes": {
|
||||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -172,10 +172,6 @@
|
|||
{
|
||||
"id": "IUserProperties",
|
||||
"id_val": "IUserProperties",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -234,6 +230,10 @@
|
|||
"label": {
|
||||
"value": "IUserProperties"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {
|
||||
"opacity": {
|
||||
"value": "0.4"
|
||||
|
|
|
|||
16
testdata/d2compiler/TestCompile/table_style_map.exp.json
generated
vendored
16
testdata/d2compiler/TestCompile/table_style_map.exp.json
generated
vendored
|
|
@ -196,14 +196,14 @@
|
|||
"root": {
|
||||
"id": "",
|
||||
"id_val": "",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"attributes": {
|
||||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -223,10 +223,6 @@
|
|||
{
|
||||
"id": "IUserProperties",
|
||||
"id_val": "IUserProperties",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -285,6 +281,10 @@
|
|||
"label": {
|
||||
"value": "IUserProperties"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {
|
||||
"opacity": {
|
||||
"value": "0.4"
|
||||
|
|
|
|||
32
testdata/d2compiler/TestCompile/text-transform.exp.json
generated
vendored
32
testdata/d2compiler/TestCompile/text-transform.exp.json
generated
vendored
|
|
@ -277,14 +277,14 @@
|
|||
"root": {
|
||||
"id": "",
|
||||
"id_val": "",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"attributes": {
|
||||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -304,10 +304,6 @@
|
|||
"index": 0,
|
||||
"minWidth": 0,
|
||||
"minHeight": 0,
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"isCurve": false,
|
||||
"src_arrow": false,
|
||||
"dst_arrow": true,
|
||||
|
|
@ -320,6 +316,10 @@
|
|||
"label": {
|
||||
"value": "hi"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {
|
||||
"textTransform": {
|
||||
"value": "capitalize"
|
||||
|
|
@ -343,10 +343,6 @@
|
|||
{
|
||||
"id": "x",
|
||||
"id_val": "x",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -415,6 +411,10 @@
|
|||
"label": {
|
||||
"value": "x"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {
|
||||
"textTransform": {
|
||||
"value": "uppercase"
|
||||
|
|
@ -436,10 +436,6 @@
|
|||
{
|
||||
"id": "y",
|
||||
"id_val": "y",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -508,6 +504,10 @@
|
|||
"label": {
|
||||
"value": "y"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {
|
||||
"textTransform": {
|
||||
"value": "lowercase"
|
||||
|
|
|
|||
48
testdata/d2compiler/TestCompile/underscore_connection.exp.json
generated
vendored
48
testdata/d2compiler/TestCompile/underscore_connection.exp.json
generated
vendored
|
|
@ -129,14 +129,14 @@
|
|||
"root": {
|
||||
"id": "",
|
||||
"id_val": "",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"attributes": {
|
||||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -156,10 +156,6 @@
|
|||
"index": 0,
|
||||
"minWidth": 0,
|
||||
"minHeight": 0,
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"isCurve": false,
|
||||
"src_arrow": false,
|
||||
"dst_arrow": true,
|
||||
|
|
@ -172,6 +168,10 @@
|
|||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -191,10 +191,6 @@
|
|||
{
|
||||
"id": "a",
|
||||
"id_val": "a",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -221,6 +217,10 @@
|
|||
"label": {
|
||||
"value": "a"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -238,10 +238,6 @@
|
|||
{
|
||||
"id": "c",
|
||||
"id_val": "c",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -332,6 +328,10 @@
|
|||
"label": {
|
||||
"value": "c"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -349,10 +349,6 @@
|
|||
{
|
||||
"id": "d",
|
||||
"id_val": "d",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -401,6 +397,10 @@
|
|||
"label": {
|
||||
"value": "d"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -418,10 +418,6 @@
|
|||
{
|
||||
"id": "b",
|
||||
"id_val": "b",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -470,6 +466,10 @@
|
|||
"label": {
|
||||
"value": "b"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
|
|||
32
testdata/d2compiler/TestCompile/underscore_edge.exp.json
generated
vendored
32
testdata/d2compiler/TestCompile/underscore_edge.exp.json
generated
vendored
|
|
@ -107,14 +107,14 @@
|
|||
"root": {
|
||||
"id": "",
|
||||
"id_val": "",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"attributes": {
|
||||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -134,10 +134,6 @@
|
|||
"index": 0,
|
||||
"minWidth": 0,
|
||||
"minHeight": 0,
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"isCurve": false,
|
||||
"src_arrow": false,
|
||||
"dst_arrow": true,
|
||||
|
|
@ -150,6 +146,10 @@
|
|||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -169,10 +169,6 @@
|
|||
{
|
||||
"id": "x",
|
||||
"id_val": "x",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -230,6 +226,10 @@
|
|||
"label": {
|
||||
"value": "x"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -247,10 +247,6 @@
|
|||
{
|
||||
"id": "y",
|
||||
"id_val": "y",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -288,6 +284,10 @@
|
|||
"label": {
|
||||
"value": "y"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
|
|||
48
testdata/d2compiler/TestCompile/underscore_edge_chain.exp.json
generated
vendored
48
testdata/d2compiler/TestCompile/underscore_edge_chain.exp.json
generated
vendored
|
|
@ -166,14 +166,14 @@
|
|||
"root": {
|
||||
"id": "",
|
||||
"id_val": "",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"attributes": {
|
||||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -193,10 +193,6 @@
|
|||
"index": 0,
|
||||
"minWidth": 0,
|
||||
"minHeight": 0,
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"isCurve": false,
|
||||
"src_arrow": false,
|
||||
"dst_arrow": true,
|
||||
|
|
@ -209,6 +205,10 @@
|
|||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -227,10 +227,6 @@
|
|||
"index": 0,
|
||||
"minWidth": 0,
|
||||
"minHeight": 0,
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"isCurve": false,
|
||||
"src_arrow": false,
|
||||
"dst_arrow": true,
|
||||
|
|
@ -243,6 +239,10 @@
|
|||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -262,10 +262,6 @@
|
|||
{
|
||||
"id": "x",
|
||||
"id_val": "x",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -354,6 +350,10 @@
|
|||
"label": {
|
||||
"value": "x"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -371,10 +371,6 @@
|
|||
{
|
||||
"id": "y",
|
||||
"id_val": "y",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -412,6 +408,10 @@
|
|||
"label": {
|
||||
"value": "y"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -429,10 +429,6 @@
|
|||
{
|
||||
"id": "z",
|
||||
"id_val": "z",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -470,6 +466,10 @@
|
|||
"label": {
|
||||
"value": "z"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
|
|||
48
testdata/d2compiler/TestCompile/underscore_edge_existing.exp.json
generated
vendored
48
testdata/d2compiler/TestCompile/underscore_edge_existing.exp.json
generated
vendored
|
|
@ -173,14 +173,14 @@
|
|||
"root": {
|
||||
"id": "",
|
||||
"id_val": "",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"attributes": {
|
||||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -200,10 +200,6 @@
|
|||
"index": 0,
|
||||
"minWidth": 0,
|
||||
"minHeight": 0,
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"isCurve": false,
|
||||
"src_arrow": false,
|
||||
"dst_arrow": true,
|
||||
|
|
@ -216,6 +212,10 @@
|
|||
"label": {
|
||||
"value": "Can you imagine how life could be improved if we could do away with"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -234,10 +234,6 @@
|
|||
"index": 1,
|
||||
"minWidth": 0,
|
||||
"minHeight": 0,
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"isCurve": false,
|
||||
"src_arrow": false,
|
||||
"dst_arrow": true,
|
||||
|
|
@ -250,6 +246,10 @@
|
|||
"label": {
|
||||
"value": "Well, it's garish, ugly, and derelicts have used it for a toilet."
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -269,10 +269,6 @@
|
|||
{
|
||||
"id": "a",
|
||||
"id_val": "a",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -330,6 +326,10 @@
|
|||
"label": {
|
||||
"value": "a"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -347,10 +347,6 @@
|
|||
{
|
||||
"id": "b",
|
||||
"id_val": "b",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -408,6 +404,10 @@
|
|||
"label": {
|
||||
"value": "b"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -425,10 +425,6 @@
|
|||
{
|
||||
"id": "x",
|
||||
"id_val": "x",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -455,6 +451,10 @@
|
|||
"label": {
|
||||
"value": "x"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
|
|||
40
testdata/d2compiler/TestCompile/underscore_edge_index.exp.json
generated
vendored
40
testdata/d2compiler/TestCompile/underscore_edge_index.exp.json
generated
vendored
|
|
@ -178,14 +178,14 @@
|
|||
"root": {
|
||||
"id": "",
|
||||
"id_val": "",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"attributes": {
|
||||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -205,10 +205,6 @@
|
|||
"index": 0,
|
||||
"minWidth": 0,
|
||||
"minHeight": 0,
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"isCurve": false,
|
||||
"src_arrow": false,
|
||||
"dst_arrow": true,
|
||||
|
|
@ -224,6 +220,10 @@
|
|||
"label": {
|
||||
"value": "Well, it's garish, ugly, and derelicts have used it for a toilet."
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -243,10 +243,6 @@
|
|||
{
|
||||
"id": "a",
|
||||
"id_val": "a",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -273,6 +269,10 @@
|
|||
"label": {
|
||||
"value": "a"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -290,10 +290,6 @@
|
|||
{
|
||||
"id": "b",
|
||||
"id_val": "b",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -320,6 +316,10 @@
|
|||
"label": {
|
||||
"value": "b"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -337,10 +337,6 @@
|
|||
{
|
||||
"id": "x",
|
||||
"id_val": "x",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -367,6 +363,10 @@
|
|||
"label": {
|
||||
"value": "x"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
|
|||
40
testdata/d2compiler/TestCompile/underscore_edge_nested.exp.json
generated
vendored
40
testdata/d2compiler/TestCompile/underscore_edge_nested.exp.json
generated
vendored
|
|
@ -147,14 +147,14 @@
|
|||
"root": {
|
||||
"id": "",
|
||||
"id_val": "",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"attributes": {
|
||||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -174,10 +174,6 @@
|
|||
"index": 0,
|
||||
"minWidth": 0,
|
||||
"minHeight": 0,
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"isCurve": false,
|
||||
"src_arrow": false,
|
||||
"dst_arrow": true,
|
||||
|
|
@ -190,6 +186,10 @@
|
|||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -209,10 +209,6 @@
|
|||
{
|
||||
"id": "x",
|
||||
"id_val": "x",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -239,6 +235,10 @@
|
|||
"label": {
|
||||
"value": "x"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -256,10 +256,6 @@
|
|||
{
|
||||
"id": "y",
|
||||
"id_val": "y",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -317,6 +313,10 @@
|
|||
"label": {
|
||||
"value": "y"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -334,10 +334,6 @@
|
|||
{
|
||||
"id": "z",
|
||||
"id_val": "z",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -386,6 +382,10 @@
|
|||
"label": {
|
||||
"value": "z"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
|
|||
24
testdata/d2compiler/TestCompile/underscore_parent_create.exp.json
generated
vendored
24
testdata/d2compiler/TestCompile/underscore_parent_create.exp.json
generated
vendored
|
|
@ -73,14 +73,14 @@
|
|||
"root": {
|
||||
"id": "",
|
||||
"id_val": "",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"attributes": {
|
||||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -100,10 +100,6 @@
|
|||
{
|
||||
"id": "x",
|
||||
"id_val": "x",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -130,6 +126,10 @@
|
|||
"label": {
|
||||
"value": "x"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -147,10 +147,6 @@
|
|||
{
|
||||
"id": "y",
|
||||
"id_val": "y",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -188,6 +184,10 @@
|
|||
"label": {
|
||||
"value": "y"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
|
|||
32
testdata/d2compiler/TestCompile/underscore_parent_not_root.exp.json
generated
vendored
32
testdata/d2compiler/TestCompile/underscore_parent_not_root.exp.json
generated
vendored
|
|
@ -102,14 +102,14 @@
|
|||
"root": {
|
||||
"id": "",
|
||||
"id_val": "",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"attributes": {
|
||||
"label": {
|
||||
"value": ""
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -129,10 +129,6 @@
|
|||
{
|
||||
"id": "x",
|
||||
"id_val": "x",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -159,6 +155,10 @@
|
|||
"label": {
|
||||
"value": "x"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -176,10 +176,6 @@
|
|||
{
|
||||
"id": "y",
|
||||
"id_val": "y",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -206,6 +202,10 @@
|
|||
"label": {
|
||||
"value": "y"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
@ -223,10 +223,6 @@
|
|||
{
|
||||
"id": "z",
|
||||
"id_val": "z",
|
||||
"label_dimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
|
|
@ -264,6 +260,10 @@
|
|||
"label": {
|
||||
"value": "z"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue