Merge branch 'terrastruct:master' into master
This commit is contained in:
commit
d8525f5225
19 changed files with 2638 additions and 59 deletions
|
|
@ -1,11 +1,13 @@
|
|||
#### Features 🚀
|
||||
|
||||
- Many non-Latin languages (e.g. Chinese, Japanese, Korean) are usable now that multi-byte characters are measured correctly. [#817](https://github.com/terrastruct/d2/pull/817)
|
||||
- Fix duplicate success logs in watch mode. [830](https://github.com/terrastruct/d2/pull/830)
|
||||
- Dimensions can be set on containers (layout engine dependent). [#845](https://github.com/terrastruct/d2/pull/845)
|
||||
|
||||
#### Improvements 🧹
|
||||
|
||||
- Cleaner watch mode logs without timestamps. [830](https://github.com/terrastruct/d2/pull/830)
|
||||
- Cleaner watch mode logs without timestamps. [#830](https://github.com/terrastruct/d2/pull/830)
|
||||
- Remove duplicate success logs in watch mode. [#830](https://github.com/terrastruct/d2/pull/830)
|
||||
- CLI reports when a feature is incompatible with layout engine, instead of silently ignoring. [#845](https://github.com/terrastruct/d2/pull/845)
|
||||
- `near` key set to direct parent or ancestor throws an appropriate error message. [#851](https://github.com/terrastruct/d2/pull/851)
|
||||
- Dimensions and positions are able to be set from API. [#853](https://github.com/terrastruct/d2/pull/853)
|
||||
|
||||
|
|
|
|||
|
|
@ -592,14 +592,6 @@ 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 {
|
||||
case d2target.ShapeSQLTable, d2target.ShapeClass:
|
||||
default:
|
||||
if len(obj.Children) > 0 && (f.Name == "width" || f.Name == "height") {
|
||||
c.errorf(f.LastPrimaryKey(), fmt.Sprintf("%s cannot be used on container: %s", f.Name, obj.AbsID()))
|
||||
}
|
||||
}
|
||||
|
||||
switch obj.Attributes.Shape.Value {
|
||||
case d2target.ShapeCircle, d2target.ShapeSquare:
|
||||
checkEqual := (keyword == "width" && obj.Attributes.Height != nil) || (keyword == "height" && obj.Attributes.Width != nil)
|
||||
|
|
|
|||
|
|
@ -163,8 +163,7 @@ d2/testdata/d2compiler/TestCompile/equal_dimensions_on_circle.d2:4:2: width and
|
|||
},
|
||||
},
|
||||
{
|
||||
name: "no_dimensions_on_containers",
|
||||
|
||||
name: "dimensions_on_containers",
|
||||
text: `
|
||||
containers: {
|
||||
circle container: {
|
||||
|
|
@ -211,13 +210,6 @@ containers: {
|
|||
}
|
||||
}
|
||||
`,
|
||||
expErr: `d2/testdata/d2compiler/TestCompile/no_dimensions_on_containers.d2:5:3: width cannot be used on container: containers.circle container
|
||||
d2/testdata/d2compiler/TestCompile/no_dimensions_on_containers.d2:15:3: width cannot be used on container: containers.diamond container
|
||||
d2/testdata/d2compiler/TestCompile/no_dimensions_on_containers.d2:16:3: height cannot be used on container: containers.diamond container
|
||||
d2/testdata/d2compiler/TestCompile/no_dimensions_on_containers.d2:25:3: width cannot be used on container: containers.oval container
|
||||
d2/testdata/d2compiler/TestCompile/no_dimensions_on_containers.d2:26:3: height cannot be used on container: containers.oval container
|
||||
d2/testdata/d2compiler/TestCompile/no_dimensions_on_containers.d2:36:3: width cannot be used on container: containers.hexagon container
|
||||
d2/testdata/d2compiler/TestCompile/no_dimensions_on_containers.d2:37:3: height cannot be used on container: containers.hexagon container`,
|
||||
},
|
||||
{
|
||||
name: "dimension_with_style",
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ import (
|
|||
_ "embed"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"math"
|
||||
"strings"
|
||||
|
||||
"github.com/dop251/goja"
|
||||
|
|
@ -102,6 +103,9 @@ type elkOpts struct {
|
|||
ForceNodeModelOrder bool `json:"elk.layered.crossingMinimization.forceNodeModelOrder,omitempty"`
|
||||
ConsiderModelOrder string `json:"elk.layered.considerModelOrder.strategy,omitempty"`
|
||||
|
||||
NodeSizeConstraints string `json:"elk.nodeSize.constraints,omitempty"`
|
||||
NodeSizeMinimum string `json:"elk.nodeSize.minimum,omitempty"`
|
||||
|
||||
ConfigurableOpts
|
||||
}
|
||||
|
||||
|
|
@ -173,15 +177,17 @@ func Layout(ctx context.Context, g *d2graph.Graph, opts *ConfigurableOpts) (err
|
|||
|
||||
walk(g.Root, nil, func(obj, parent *d2graph.Object) {
|
||||
height := obj.Height
|
||||
width := obj.Width
|
||||
if obj.LabelWidth != nil && obj.LabelHeight != nil {
|
||||
if obj.Attributes.Shape.Value == d2target.ShapeImage || obj.Attributes.Icon != nil {
|
||||
height += float64(*obj.LabelHeight) + label.PADDING
|
||||
}
|
||||
width = go2.Max(width, float64(*obj.LabelWidth))
|
||||
}
|
||||
|
||||
n := &ELKNode{
|
||||
ID: obj.AbsID(),
|
||||
Width: obj.Width,
|
||||
Width: width,
|
||||
Height: height,
|
||||
}
|
||||
|
||||
|
|
@ -192,6 +198,8 @@ func Layout(ctx context.Context, g *d2graph.Graph, opts *ConfigurableOpts) (err
|
|||
EdgeEdgeBetweenLayersSpacing: 50,
|
||||
HierarchyHandling: "INCLUDE_CHILDREN",
|
||||
ConsiderModelOrder: "NODES_AND_EDGES",
|
||||
// Why is it (height, width)? I have no clue, but it works.
|
||||
NodeSizeMinimum: fmt.Sprintf("(%d, %d)", int(math.Ceil(height)), int(math.Ceil(width))),
|
||||
ConfigurableOpts: ConfigurableOpts{
|
||||
NodeSpacing: opts.NodeSpacing,
|
||||
EdgeNodeSpacing: opts.EdgeNodeSpacing,
|
||||
|
|
@ -199,6 +207,12 @@ func Layout(ctx context.Context, g *d2graph.Graph, opts *ConfigurableOpts) (err
|
|||
Padding: opts.Padding,
|
||||
},
|
||||
}
|
||||
// Only set if specified.
|
||||
// There's a bug where if it's the node label dimensions that set the NodeSizeMinimum,
|
||||
// then suddenly it's reversed back to (width, height). I must be missing something
|
||||
if obj.Attributes.Width != nil || obj.Attributes.Height != nil {
|
||||
n.LayoutOptions.NodeSizeConstraints = "MINIMUM_SIZE"
|
||||
}
|
||||
|
||||
if n.LayoutOptions.Padding == DefaultOpts.Padding {
|
||||
// Default
|
||||
|
|
|
|||
11
d2layouts/d2layoutfeatures/d2layoutfeatures.go
Normal file
11
d2layouts/d2layoutfeatures/d2layoutfeatures.go
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
package d2layoutfeatures
|
||||
|
||||
// When this is true, objects can set ther `near` key to another object
|
||||
// When this is false, objects can only set `near` to constants
|
||||
const NEAR_OBJECT = "near_object"
|
||||
|
||||
// When this is true, containers can have dimensions set
|
||||
const CONTAINER_DIMENSIONS = "container_dimensions"
|
||||
|
||||
// When this is true, objects can specify their `top` and `left` keywords
|
||||
const TOP_LEFT = "top_left"
|
||||
|
|
@ -1864,6 +1864,12 @@ func DeleteIDDeltas(g *d2graph.Graph, key string) (deltas map[string]string, err
|
|||
conflictNewIDs := make(map[*d2graph.Object]string)
|
||||
conflictOldIDs := make(map[*d2graph.Object]string)
|
||||
if mk.Key != nil {
|
||||
ida := d2graph.Key(mk.Key)
|
||||
// Deleting a reserved field cannot possibly have any deltas
|
||||
if _, ok := d2graph.ReservedKeywords[ida[len(ida)-1]]; ok {
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
var ok bool
|
||||
obj, ok = g.Root.HasChild(d2graph.Key(mk.Key))
|
||||
if !ok {
|
||||
|
|
|
|||
|
|
@ -4895,7 +4895,30 @@ x.y.z.w.e.p.l -> x.y.z.1.2.3.4
|
|||
"x.x": "x"
|
||||
}`,
|
||||
},
|
||||
{
|
||||
name: "nested-height",
|
||||
|
||||
text: `x: {
|
||||
a -> b
|
||||
height: 200
|
||||
}
|
||||
`,
|
||||
key: `x.height`,
|
||||
|
||||
exp: `null`,
|
||||
},
|
||||
{
|
||||
name: "edge-style",
|
||||
|
||||
text: `x <-> y: {
|
||||
target-arrowhead: circle
|
||||
source-arrowhead: diamond
|
||||
}
|
||||
`,
|
||||
key: `(x <-> y)[0].target-arrowhead`,
|
||||
|
||||
exp: `null`,
|
||||
},
|
||||
{
|
||||
name: "only-reserved",
|
||||
text: `guitar: {
|
||||
|
|
|
|||
|
|
@ -77,6 +77,8 @@ type PluginInfo struct {
|
|||
Type string `json:"type"`
|
||||
// If Type == binary then this contains the absolute path to the binary.
|
||||
Path string `json:"path"`
|
||||
|
||||
Features []PluginFeature `json:"features"`
|
||||
}
|
||||
|
||||
const binaryPrefix = "d2plugin-"
|
||||
|
|
|
|||
|
|
@ -67,6 +67,7 @@ func (p dagrePlugin) Info(ctx context.Context) (*PluginInfo, error) {
|
|||
return &PluginInfo{
|
||||
Name: "dagre",
|
||||
Type: "bundled",
|
||||
Features: []PluginFeature{},
|
||||
ShortHelp: "The directed graph layout library Dagre",
|
||||
LongHelp: fmt.Sprintf(`dagre is a directed graph layout library for JavaScript.
|
||||
See https://d2lang.com/tour/dagre for more.
|
||||
|
|
|
|||
|
|
@ -85,8 +85,11 @@ func (p elkPlugin) Info(ctx context.Context) (*PluginInfo, error) {
|
|||
f.AddToOpts(opts)
|
||||
}
|
||||
return &PluginInfo{
|
||||
Name: "elk",
|
||||
Type: "bundled",
|
||||
Name: "elk",
|
||||
Type: "bundled",
|
||||
Features: []PluginFeature{
|
||||
CONTAINER_DIMENSIONS,
|
||||
},
|
||||
ShortHelp: "Eclipse Layout Kernel (ELK) with the Layered algorithm.",
|
||||
LongHelp: fmt.Sprintf(`ELK is a layout engine offered by Eclipse.
|
||||
Originally written in Java, it has been ported to Javascript and cross-compiled into D2.
|
||||
|
|
|
|||
54
d2plugin/plugin_features.go
Normal file
54
d2plugin/plugin_features.go
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
package d2plugin
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"oss.terrastruct.com/d2/d2graph"
|
||||
)
|
||||
|
||||
type PluginFeature string
|
||||
|
||||
// When this is true, objects can set ther `near` key to another object
|
||||
// When this is false, objects can only set `near` to constants
|
||||
const NEAR_OBJECT PluginFeature = "near_object"
|
||||
|
||||
// When this is true, containers can have dimensions set
|
||||
const CONTAINER_DIMENSIONS PluginFeature = "container_dimensions"
|
||||
|
||||
// When this is true, objects can specify their `top` and `left` keywords
|
||||
const TOP_LEFT PluginFeature = "top_left"
|
||||
|
||||
func FeatureSupportCheck(info *PluginInfo, g *d2graph.Graph) error {
|
||||
// Older version of plugin. Skip checking.
|
||||
if info.Features == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
featureMap := make(map[PluginFeature]struct{}, len(info.Features))
|
||||
for _, f := range info.Features {
|
||||
featureMap[f] = struct{}{}
|
||||
}
|
||||
|
||||
for _, obj := range g.Objects {
|
||||
if obj.Attributes.Top != nil || obj.Attributes.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 _, 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 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)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
|
@ -1767,6 +1767,30 @@ class.height: 512
|
|||
users.height: 512
|
||||
code.height: 512
|
||||
package.height: 512
|
||||
`,
|
||||
},
|
||||
{
|
||||
name: "container_dimensions",
|
||||
script: `a: {
|
||||
width: 500
|
||||
b -> c
|
||||
b.width: 400
|
||||
c.width: 600
|
||||
}
|
||||
|
||||
b: {
|
||||
width: 700
|
||||
b -> c
|
||||
e: {
|
||||
height: 300
|
||||
}
|
||||
}
|
||||
|
||||
c: {
|
||||
width: 200
|
||||
height: 300
|
||||
a
|
||||
}
|
||||
`,
|
||||
},
|
||||
{
|
||||
|
|
|
|||
473
e2etests/testdata/stable/container_dimensions/dagre/board.exp.json
generated
vendored
Normal file
473
e2etests/testdata/stable/container_dimensions/dagre/board.exp.json
generated
vendored
Normal file
|
|
@ -0,0 +1,473 @@
|
|||
{
|
||||
"name": "",
|
||||
"fontFamily": "SourceSansPro",
|
||||
"shapes": [
|
||||
{
|
||||
"id": "a",
|
||||
"type": "rectangle",
|
||||
"pos": {
|
||||
"x": 0,
|
||||
"y": 41
|
||||
},
|
||||
"width": 680,
|
||||
"height": 575,
|
||||
"opacity": 1,
|
||||
"strokeDash": 0,
|
||||
"strokeWidth": 2,
|
||||
"borderRadius": 0,
|
||||
"fill": "#E3E9FD",
|
||||
"stroke": "#0D32B2",
|
||||
"shadow": false,
|
||||
"3d": false,
|
||||
"multiple": false,
|
||||
"double-border": false,
|
||||
"tooltip": "",
|
||||
"link": "",
|
||||
"icon": null,
|
||||
"iconPosition": "",
|
||||
"blend": false,
|
||||
"fields": null,
|
||||
"methods": null,
|
||||
"columns": null,
|
||||
"label": "a",
|
||||
"fontSize": 28,
|
||||
"fontFamily": "DEFAULT",
|
||||
"language": "",
|
||||
"color": "#0A0F25",
|
||||
"italic": false,
|
||||
"bold": false,
|
||||
"underline": false,
|
||||
"labelWidth": 12,
|
||||
"labelHeight": 36,
|
||||
"labelPosition": "OUTSIDE_TOP_CENTER",
|
||||
"zIndex": 0,
|
||||
"level": 1
|
||||
},
|
||||
{
|
||||
"id": "a.b",
|
||||
"type": "rectangle",
|
||||
"pos": {
|
||||
"x": 140,
|
||||
"y": 73
|
||||
},
|
||||
"width": 400,
|
||||
"height": 61,
|
||||
"opacity": 1,
|
||||
"strokeDash": 0,
|
||||
"strokeWidth": 2,
|
||||
"borderRadius": 0,
|
||||
"fill": "#EDF0FD",
|
||||
"stroke": "#0D32B2",
|
||||
"shadow": false,
|
||||
"3d": false,
|
||||
"multiple": false,
|
||||
"double-border": false,
|
||||
"tooltip": "",
|
||||
"link": "",
|
||||
"icon": null,
|
||||
"iconPosition": "",
|
||||
"blend": false,
|
||||
"fields": null,
|
||||
"methods": null,
|
||||
"columns": null,
|
||||
"label": "b",
|
||||
"fontSize": 16,
|
||||
"fontFamily": "DEFAULT",
|
||||
"language": "",
|
||||
"color": "#0A0F25",
|
||||
"italic": false,
|
||||
"bold": true,
|
||||
"underline": false,
|
||||
"labelWidth": 8,
|
||||
"labelHeight": 21,
|
||||
"labelPosition": "INSIDE_MIDDLE_CENTER",
|
||||
"zIndex": 0,
|
||||
"level": 2
|
||||
},
|
||||
{
|
||||
"id": "a.c",
|
||||
"type": "rectangle",
|
||||
"pos": {
|
||||
"x": 40,
|
||||
"y": 406
|
||||
},
|
||||
"width": 600,
|
||||
"height": 61,
|
||||
"opacity": 1,
|
||||
"strokeDash": 0,
|
||||
"strokeWidth": 2,
|
||||
"borderRadius": 0,
|
||||
"fill": "#EDF0FD",
|
||||
"stroke": "#0D32B2",
|
||||
"shadow": false,
|
||||
"3d": false,
|
||||
"multiple": false,
|
||||
"double-border": false,
|
||||
"tooltip": "",
|
||||
"link": "",
|
||||
"icon": null,
|
||||
"iconPosition": "",
|
||||
"blend": false,
|
||||
"fields": null,
|
||||
"methods": null,
|
||||
"columns": null,
|
||||
"label": "c",
|
||||
"fontSize": 16,
|
||||
"fontFamily": "DEFAULT",
|
||||
"language": "",
|
||||
"color": "#0A0F25",
|
||||
"italic": false,
|
||||
"bold": true,
|
||||
"underline": false,
|
||||
"labelWidth": 8,
|
||||
"labelHeight": 21,
|
||||
"labelPosition": "INSIDE_MIDDLE_CENTER",
|
||||
"zIndex": 0,
|
||||
"level": 2
|
||||
},
|
||||
{
|
||||
"id": "b",
|
||||
"type": "rectangle",
|
||||
"pos": {
|
||||
"x": 853,
|
||||
"y": 41
|
||||
},
|
||||
"width": 241,
|
||||
"height": 575,
|
||||
"opacity": 1,
|
||||
"strokeDash": 0,
|
||||
"strokeWidth": 2,
|
||||
"borderRadius": 0,
|
||||
"fill": "#E3E9FD",
|
||||
"stroke": "#0D32B2",
|
||||
"shadow": false,
|
||||
"3d": false,
|
||||
"multiple": false,
|
||||
"double-border": false,
|
||||
"tooltip": "",
|
||||
"link": "",
|
||||
"icon": null,
|
||||
"iconPosition": "",
|
||||
"blend": false,
|
||||
"fields": null,
|
||||
"methods": null,
|
||||
"columns": null,
|
||||
"label": "b",
|
||||
"fontSize": 28,
|
||||
"fontFamily": "DEFAULT",
|
||||
"language": "",
|
||||
"color": "#0A0F25",
|
||||
"italic": false,
|
||||
"bold": false,
|
||||
"underline": false,
|
||||
"labelWidth": 13,
|
||||
"labelHeight": 36,
|
||||
"labelPosition": "OUTSIDE_TOP_CENTER",
|
||||
"zIndex": 0,
|
||||
"level": 1
|
||||
},
|
||||
{
|
||||
"id": "b.b",
|
||||
"type": "rectangle",
|
||||
"pos": {
|
||||
"x": 893,
|
||||
"y": 70
|
||||
},
|
||||
"width": 53,
|
||||
"height": 66,
|
||||
"opacity": 1,
|
||||
"strokeDash": 0,
|
||||
"strokeWidth": 2,
|
||||
"borderRadius": 0,
|
||||
"fill": "#EDF0FD",
|
||||
"stroke": "#0D32B2",
|
||||
"shadow": false,
|
||||
"3d": false,
|
||||
"multiple": false,
|
||||
"double-border": false,
|
||||
"tooltip": "",
|
||||
"link": "",
|
||||
"icon": null,
|
||||
"iconPosition": "",
|
||||
"blend": false,
|
||||
"fields": null,
|
||||
"methods": null,
|
||||
"columns": null,
|
||||
"label": "b",
|
||||
"fontSize": 16,
|
||||
"fontFamily": "DEFAULT",
|
||||
"language": "",
|
||||
"color": "#0A0F25",
|
||||
"italic": false,
|
||||
"bold": true,
|
||||
"underline": false,
|
||||
"labelWidth": 8,
|
||||
"labelHeight": 21,
|
||||
"labelPosition": "INSIDE_MIDDLE_CENTER",
|
||||
"zIndex": 0,
|
||||
"level": 2
|
||||
},
|
||||
{
|
||||
"id": "b.c",
|
||||
"type": "rectangle",
|
||||
"pos": {
|
||||
"x": 893,
|
||||
"y": 403
|
||||
},
|
||||
"width": 53,
|
||||
"height": 66,
|
||||
"opacity": 1,
|
||||
"strokeDash": 0,
|
||||
"strokeWidth": 2,
|
||||
"borderRadius": 0,
|
||||
"fill": "#EDF0FD",
|
||||
"stroke": "#0D32B2",
|
||||
"shadow": false,
|
||||
"3d": false,
|
||||
"multiple": false,
|
||||
"double-border": false,
|
||||
"tooltip": "",
|
||||
"link": "",
|
||||
"icon": null,
|
||||
"iconPosition": "",
|
||||
"blend": false,
|
||||
"fields": null,
|
||||
"methods": null,
|
||||
"columns": null,
|
||||
"label": "c",
|
||||
"fontSize": 16,
|
||||
"fontFamily": "DEFAULT",
|
||||
"language": "",
|
||||
"color": "#0A0F25",
|
||||
"italic": false,
|
||||
"bold": true,
|
||||
"underline": false,
|
||||
"labelWidth": 8,
|
||||
"labelHeight": 21,
|
||||
"labelPosition": "INSIDE_MIDDLE_CENTER",
|
||||
"zIndex": 0,
|
||||
"level": 2
|
||||
},
|
||||
{
|
||||
"id": "b.e",
|
||||
"type": "rectangle",
|
||||
"pos": {
|
||||
"x": 1006,
|
||||
"y": 286
|
||||
},
|
||||
"width": 48,
|
||||
"height": 300,
|
||||
"opacity": 1,
|
||||
"strokeDash": 0,
|
||||
"strokeWidth": 2,
|
||||
"borderRadius": 0,
|
||||
"fill": "#EDF0FD",
|
||||
"stroke": "#0D32B2",
|
||||
"shadow": false,
|
||||
"3d": false,
|
||||
"multiple": false,
|
||||
"double-border": false,
|
||||
"tooltip": "",
|
||||
"link": "",
|
||||
"icon": null,
|
||||
"iconPosition": "",
|
||||
"blend": false,
|
||||
"fields": null,
|
||||
"methods": null,
|
||||
"columns": null,
|
||||
"label": "e",
|
||||
"fontSize": 16,
|
||||
"fontFamily": "DEFAULT",
|
||||
"language": "",
|
||||
"color": "#0A0F25",
|
||||
"italic": false,
|
||||
"bold": true,
|
||||
"underline": false,
|
||||
"labelWidth": 8,
|
||||
"labelHeight": 21,
|
||||
"labelPosition": "INSIDE_MIDDLE_CENTER",
|
||||
"zIndex": 0,
|
||||
"level": 2
|
||||
},
|
||||
{
|
||||
"id": "c",
|
||||
"type": "rectangle",
|
||||
"pos": {
|
||||
"x": 700,
|
||||
"y": 41
|
||||
},
|
||||
"width": 133,
|
||||
"height": 125,
|
||||
"opacity": 1,
|
||||
"strokeDash": 0,
|
||||
"strokeWidth": 2,
|
||||
"borderRadius": 0,
|
||||
"fill": "#E3E9FD",
|
||||
"stroke": "#0D32B2",
|
||||
"shadow": false,
|
||||
"3d": false,
|
||||
"multiple": false,
|
||||
"double-border": false,
|
||||
"tooltip": "",
|
||||
"link": "",
|
||||
"icon": null,
|
||||
"iconPosition": "",
|
||||
"blend": false,
|
||||
"fields": null,
|
||||
"methods": null,
|
||||
"columns": null,
|
||||
"label": "c",
|
||||
"fontSize": 28,
|
||||
"fontFamily": "DEFAULT",
|
||||
"language": "",
|
||||
"color": "#0A0F25",
|
||||
"italic": false,
|
||||
"bold": false,
|
||||
"underline": false,
|
||||
"labelWidth": 12,
|
||||
"labelHeight": 36,
|
||||
"labelPosition": "OUTSIDE_TOP_CENTER",
|
||||
"zIndex": 0,
|
||||
"level": 1
|
||||
},
|
||||
{
|
||||
"id": "c.a",
|
||||
"type": "rectangle",
|
||||
"pos": {
|
||||
"x": 740,
|
||||
"y": 70
|
||||
},
|
||||
"width": 53,
|
||||
"height": 66,
|
||||
"opacity": 1,
|
||||
"strokeDash": 0,
|
||||
"strokeWidth": 2,
|
||||
"borderRadius": 0,
|
||||
"fill": "#EDF0FD",
|
||||
"stroke": "#0D32B2",
|
||||
"shadow": false,
|
||||
"3d": false,
|
||||
"multiple": false,
|
||||
"double-border": false,
|
||||
"tooltip": "",
|
||||
"link": "",
|
||||
"icon": null,
|
||||
"iconPosition": "",
|
||||
"blend": false,
|
||||
"fields": null,
|
||||
"methods": null,
|
||||
"columns": null,
|
||||
"label": "a",
|
||||
"fontSize": 16,
|
||||
"fontFamily": "DEFAULT",
|
||||
"language": "",
|
||||
"color": "#0A0F25",
|
||||
"italic": false,
|
||||
"bold": true,
|
||||
"underline": false,
|
||||
"labelWidth": 8,
|
||||
"labelHeight": 21,
|
||||
"labelPosition": "INSIDE_MIDDLE_CENTER",
|
||||
"zIndex": 0,
|
||||
"level": 2
|
||||
}
|
||||
],
|
||||
"connections": [
|
||||
{
|
||||
"id": "a.(b -> c)[0]",
|
||||
"src": "a.b",
|
||||
"srcArrow": "none",
|
||||
"srcLabel": "",
|
||||
"dst": "a.c",
|
||||
"dstArrow": "triangle",
|
||||
"dstLabel": "",
|
||||
"opacity": 1,
|
||||
"strokeDash": 0,
|
||||
"strokeWidth": 2,
|
||||
"stroke": "#0D32B2",
|
||||
"label": "",
|
||||
"fontSize": 16,
|
||||
"fontFamily": "DEFAULT",
|
||||
"language": "",
|
||||
"color": "#676C7E",
|
||||
"italic": true,
|
||||
"bold": false,
|
||||
"underline": false,
|
||||
"labelWidth": 0,
|
||||
"labelHeight": 0,
|
||||
"labelPosition": "",
|
||||
"labelPercentage": 0,
|
||||
"route": [
|
||||
{
|
||||
"x": 340,
|
||||
"y": 135
|
||||
},
|
||||
{
|
||||
"x": 340,
|
||||
"y": 176.2
|
||||
},
|
||||
{
|
||||
"x": 340,
|
||||
"y": 270.4
|
||||
},
|
||||
{
|
||||
"x": 340,
|
||||
"y": 406
|
||||
}
|
||||
],
|
||||
"isCurve": true,
|
||||
"animated": false,
|
||||
"tooltip": "",
|
||||
"icon": null,
|
||||
"zIndex": 0
|
||||
},
|
||||
{
|
||||
"id": "b.(b -> c)[0]",
|
||||
"src": "b.b",
|
||||
"srcArrow": "none",
|
||||
"srcLabel": "",
|
||||
"dst": "b.c",
|
||||
"dstArrow": "triangle",
|
||||
"dstLabel": "",
|
||||
"opacity": 1,
|
||||
"strokeDash": 0,
|
||||
"strokeWidth": 2,
|
||||
"stroke": "#0D32B2",
|
||||
"label": "",
|
||||
"fontSize": 16,
|
||||
"fontFamily": "DEFAULT",
|
||||
"language": "",
|
||||
"color": "#676C7E",
|
||||
"italic": true,
|
||||
"bold": false,
|
||||
"underline": false,
|
||||
"labelWidth": 0,
|
||||
"labelHeight": 0,
|
||||
"labelPosition": "",
|
||||
"labelPercentage": 0,
|
||||
"route": [
|
||||
{
|
||||
"x": 919.5,
|
||||
"y": 136.5
|
||||
},
|
||||
{
|
||||
"x": 919.5,
|
||||
"y": 176.5
|
||||
},
|
||||
{
|
||||
"x": 919.5,
|
||||
"y": 269.9
|
||||
},
|
||||
{
|
||||
"x": 919.5,
|
||||
"y": 403.5
|
||||
}
|
||||
],
|
||||
"isCurve": true,
|
||||
"animated": false,
|
||||
"tooltip": "",
|
||||
"icon": null,
|
||||
"zIndex": 0
|
||||
}
|
||||
]
|
||||
}
|
||||
59
e2etests/testdata/stable/container_dimensions/dagre/sketch.exp.svg
vendored
Normal file
59
e2etests/testdata/stable/container_dimensions/dagre/sketch.exp.svg
vendored
Normal file
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 651 KiB |
455
e2etests/testdata/stable/container_dimensions/elk/board.exp.json
generated
vendored
Normal file
455
e2etests/testdata/stable/container_dimensions/elk/board.exp.json
generated
vendored
Normal file
|
|
@ -0,0 +1,455 @@
|
|||
{
|
||||
"name": "",
|
||||
"fontFamily": "SourceSansPro",
|
||||
"shapes": [
|
||||
{
|
||||
"id": "a",
|
||||
"type": "rectangle",
|
||||
"pos": {
|
||||
"x": 12,
|
||||
"y": 134
|
||||
},
|
||||
"width": 700,
|
||||
"height": 292,
|
||||
"opacity": 1,
|
||||
"strokeDash": 0,
|
||||
"strokeWidth": 2,
|
||||
"borderRadius": 0,
|
||||
"fill": "#E3E9FD",
|
||||
"stroke": "#0D32B2",
|
||||
"shadow": false,
|
||||
"3d": false,
|
||||
"multiple": false,
|
||||
"double-border": false,
|
||||
"tooltip": "",
|
||||
"link": "",
|
||||
"icon": null,
|
||||
"iconPosition": "",
|
||||
"blend": false,
|
||||
"fields": null,
|
||||
"methods": null,
|
||||
"columns": null,
|
||||
"label": "a",
|
||||
"fontSize": 28,
|
||||
"fontFamily": "DEFAULT",
|
||||
"language": "",
|
||||
"color": "#0A0F25",
|
||||
"italic": false,
|
||||
"bold": false,
|
||||
"underline": false,
|
||||
"labelWidth": 12,
|
||||
"labelHeight": 36,
|
||||
"labelPosition": "INSIDE_TOP_CENTER",
|
||||
"zIndex": 0,
|
||||
"level": 1
|
||||
},
|
||||
{
|
||||
"id": "a.b",
|
||||
"type": "rectangle",
|
||||
"pos": {
|
||||
"x": 162,
|
||||
"y": 184
|
||||
},
|
||||
"width": 400,
|
||||
"height": 61,
|
||||
"opacity": 1,
|
||||
"strokeDash": 0,
|
||||
"strokeWidth": 2,
|
||||
"borderRadius": 0,
|
||||
"fill": "#EDF0FD",
|
||||
"stroke": "#0D32B2",
|
||||
"shadow": false,
|
||||
"3d": false,
|
||||
"multiple": false,
|
||||
"double-border": false,
|
||||
"tooltip": "",
|
||||
"link": "",
|
||||
"icon": null,
|
||||
"iconPosition": "",
|
||||
"blend": false,
|
||||
"fields": null,
|
||||
"methods": null,
|
||||
"columns": null,
|
||||
"label": "b",
|
||||
"fontSize": 16,
|
||||
"fontFamily": "DEFAULT",
|
||||
"language": "",
|
||||
"color": "#0A0F25",
|
||||
"italic": false,
|
||||
"bold": true,
|
||||
"underline": false,
|
||||
"labelWidth": 8,
|
||||
"labelHeight": 21,
|
||||
"labelPosition": "INSIDE_MIDDLE_CENTER",
|
||||
"zIndex": 0,
|
||||
"level": 2
|
||||
},
|
||||
{
|
||||
"id": "a.c",
|
||||
"type": "rectangle",
|
||||
"pos": {
|
||||
"x": 62,
|
||||
"y": 315
|
||||
},
|
||||
"width": 600,
|
||||
"height": 61,
|
||||
"opacity": 1,
|
||||
"strokeDash": 0,
|
||||
"strokeWidth": 2,
|
||||
"borderRadius": 0,
|
||||
"fill": "#EDF0FD",
|
||||
"stroke": "#0D32B2",
|
||||
"shadow": false,
|
||||
"3d": false,
|
||||
"multiple": false,
|
||||
"double-border": false,
|
||||
"tooltip": "",
|
||||
"link": "",
|
||||
"icon": null,
|
||||
"iconPosition": "",
|
||||
"blend": false,
|
||||
"fields": null,
|
||||
"methods": null,
|
||||
"columns": null,
|
||||
"label": "c",
|
||||
"fontSize": 16,
|
||||
"fontFamily": "DEFAULT",
|
||||
"language": "",
|
||||
"color": "#0A0F25",
|
||||
"italic": false,
|
||||
"bold": true,
|
||||
"underline": false,
|
||||
"labelWidth": 8,
|
||||
"labelHeight": 21,
|
||||
"labelPosition": "INSIDE_MIDDLE_CENTER",
|
||||
"zIndex": 0,
|
||||
"level": 2
|
||||
},
|
||||
{
|
||||
"id": "b",
|
||||
"type": "rectangle",
|
||||
"pos": {
|
||||
"x": 732,
|
||||
"y": 12
|
||||
},
|
||||
"width": 700,
|
||||
"height": 536,
|
||||
"opacity": 1,
|
||||
"strokeDash": 0,
|
||||
"strokeWidth": 2,
|
||||
"borderRadius": 0,
|
||||
"fill": "#E3E9FD",
|
||||
"stroke": "#0D32B2",
|
||||
"shadow": false,
|
||||
"3d": false,
|
||||
"multiple": false,
|
||||
"double-border": false,
|
||||
"tooltip": "",
|
||||
"link": "",
|
||||
"icon": null,
|
||||
"iconPosition": "",
|
||||
"blend": false,
|
||||
"fields": null,
|
||||
"methods": null,
|
||||
"columns": null,
|
||||
"label": "b",
|
||||
"fontSize": 28,
|
||||
"fontFamily": "DEFAULT",
|
||||
"language": "",
|
||||
"color": "#0A0F25",
|
||||
"italic": false,
|
||||
"bold": false,
|
||||
"underline": false,
|
||||
"labelWidth": 13,
|
||||
"labelHeight": 36,
|
||||
"labelPosition": "INSIDE_TOP_CENTER",
|
||||
"zIndex": 0,
|
||||
"level": 1
|
||||
},
|
||||
{
|
||||
"id": "b.b",
|
||||
"type": "rectangle",
|
||||
"pos": {
|
||||
"x": 782,
|
||||
"y": 296
|
||||
},
|
||||
"width": 53,
|
||||
"height": 66,
|
||||
"opacity": 1,
|
||||
"strokeDash": 0,
|
||||
"strokeWidth": 2,
|
||||
"borderRadius": 0,
|
||||
"fill": "#EDF0FD",
|
||||
"stroke": "#0D32B2",
|
||||
"shadow": false,
|
||||
"3d": false,
|
||||
"multiple": false,
|
||||
"double-border": false,
|
||||
"tooltip": "",
|
||||
"link": "",
|
||||
"icon": null,
|
||||
"iconPosition": "",
|
||||
"blend": false,
|
||||
"fields": null,
|
||||
"methods": null,
|
||||
"columns": null,
|
||||
"label": "b",
|
||||
"fontSize": 16,
|
||||
"fontFamily": "DEFAULT",
|
||||
"language": "",
|
||||
"color": "#0A0F25",
|
||||
"italic": false,
|
||||
"bold": true,
|
||||
"underline": false,
|
||||
"labelWidth": 8,
|
||||
"labelHeight": 21,
|
||||
"labelPosition": "INSIDE_MIDDLE_CENTER",
|
||||
"zIndex": 0,
|
||||
"level": 2
|
||||
},
|
||||
{
|
||||
"id": "b.c",
|
||||
"type": "rectangle",
|
||||
"pos": {
|
||||
"x": 782,
|
||||
"y": 432
|
||||
},
|
||||
"width": 53,
|
||||
"height": 66,
|
||||
"opacity": 1,
|
||||
"strokeDash": 0,
|
||||
"strokeWidth": 2,
|
||||
"borderRadius": 0,
|
||||
"fill": "#EDF0FD",
|
||||
"stroke": "#0D32B2",
|
||||
"shadow": false,
|
||||
"3d": false,
|
||||
"multiple": false,
|
||||
"double-border": false,
|
||||
"tooltip": "",
|
||||
"link": "",
|
||||
"icon": null,
|
||||
"iconPosition": "",
|
||||
"blend": false,
|
||||
"fields": null,
|
||||
"methods": null,
|
||||
"columns": null,
|
||||
"label": "c",
|
||||
"fontSize": 16,
|
||||
"fontFamily": "DEFAULT",
|
||||
"language": "",
|
||||
"color": "#0A0F25",
|
||||
"italic": false,
|
||||
"bold": true,
|
||||
"underline": false,
|
||||
"labelWidth": 8,
|
||||
"labelHeight": 21,
|
||||
"labelPosition": "INSIDE_MIDDLE_CENTER",
|
||||
"zIndex": 0,
|
||||
"level": 2
|
||||
},
|
||||
{
|
||||
"id": "b.e",
|
||||
"type": "rectangle",
|
||||
"pos": {
|
||||
"x": 855,
|
||||
"y": 62
|
||||
},
|
||||
"width": 48,
|
||||
"height": 300,
|
||||
"opacity": 1,
|
||||
"strokeDash": 0,
|
||||
"strokeWidth": 2,
|
||||
"borderRadius": 0,
|
||||
"fill": "#EDF0FD",
|
||||
"stroke": "#0D32B2",
|
||||
"shadow": false,
|
||||
"3d": false,
|
||||
"multiple": false,
|
||||
"double-border": false,
|
||||
"tooltip": "",
|
||||
"link": "",
|
||||
"icon": null,
|
||||
"iconPosition": "",
|
||||
"blend": false,
|
||||
"fields": null,
|
||||
"methods": null,
|
||||
"columns": null,
|
||||
"label": "e",
|
||||
"fontSize": 16,
|
||||
"fontFamily": "DEFAULT",
|
||||
"language": "",
|
||||
"color": "#0A0F25",
|
||||
"italic": false,
|
||||
"bold": true,
|
||||
"underline": false,
|
||||
"labelWidth": 8,
|
||||
"labelHeight": 21,
|
||||
"labelPosition": "INSIDE_MIDDLE_CENTER",
|
||||
"zIndex": 0,
|
||||
"level": 2
|
||||
},
|
||||
{
|
||||
"id": "c",
|
||||
"type": "rectangle",
|
||||
"pos": {
|
||||
"x": 1452,
|
||||
"y": 130
|
||||
},
|
||||
"width": 200,
|
||||
"height": 300,
|
||||
"opacity": 1,
|
||||
"strokeDash": 0,
|
||||
"strokeWidth": 2,
|
||||
"borderRadius": 0,
|
||||
"fill": "#E3E9FD",
|
||||
"stroke": "#0D32B2",
|
||||
"shadow": false,
|
||||
"3d": false,
|
||||
"multiple": false,
|
||||
"double-border": false,
|
||||
"tooltip": "",
|
||||
"link": "",
|
||||
"icon": null,
|
||||
"iconPosition": "",
|
||||
"blend": false,
|
||||
"fields": null,
|
||||
"methods": null,
|
||||
"columns": null,
|
||||
"label": "c",
|
||||
"fontSize": 28,
|
||||
"fontFamily": "DEFAULT",
|
||||
"language": "",
|
||||
"color": "#0A0F25",
|
||||
"italic": false,
|
||||
"bold": false,
|
||||
"underline": false,
|
||||
"labelWidth": 12,
|
||||
"labelHeight": 36,
|
||||
"labelPosition": "INSIDE_TOP_CENTER",
|
||||
"zIndex": 0,
|
||||
"level": 1
|
||||
},
|
||||
{
|
||||
"id": "c.a",
|
||||
"type": "rectangle",
|
||||
"pos": {
|
||||
"x": 1502,
|
||||
"y": 180
|
||||
},
|
||||
"width": 53,
|
||||
"height": 66,
|
||||
"opacity": 1,
|
||||
"strokeDash": 0,
|
||||
"strokeWidth": 2,
|
||||
"borderRadius": 0,
|
||||
"fill": "#EDF0FD",
|
||||
"stroke": "#0D32B2",
|
||||
"shadow": false,
|
||||
"3d": false,
|
||||
"multiple": false,
|
||||
"double-border": false,
|
||||
"tooltip": "",
|
||||
"link": "",
|
||||
"icon": null,
|
||||
"iconPosition": "",
|
||||
"blend": false,
|
||||
"fields": null,
|
||||
"methods": null,
|
||||
"columns": null,
|
||||
"label": "a",
|
||||
"fontSize": 16,
|
||||
"fontFamily": "DEFAULT",
|
||||
"language": "",
|
||||
"color": "#0A0F25",
|
||||
"italic": false,
|
||||
"bold": true,
|
||||
"underline": false,
|
||||
"labelWidth": 8,
|
||||
"labelHeight": 21,
|
||||
"labelPosition": "INSIDE_MIDDLE_CENTER",
|
||||
"zIndex": 0,
|
||||
"level": 2
|
||||
}
|
||||
],
|
||||
"connections": [
|
||||
{
|
||||
"id": "a.(b -> c)[0]",
|
||||
"src": "a.b",
|
||||
"srcArrow": "none",
|
||||
"srcLabel": "",
|
||||
"dst": "a.c",
|
||||
"dstArrow": "triangle",
|
||||
"dstLabel": "",
|
||||
"opacity": 1,
|
||||
"strokeDash": 0,
|
||||
"strokeWidth": 2,
|
||||
"stroke": "#0D32B2",
|
||||
"label": "",
|
||||
"fontSize": 16,
|
||||
"fontFamily": "DEFAULT",
|
||||
"language": "",
|
||||
"color": "#676C7E",
|
||||
"italic": true,
|
||||
"bold": false,
|
||||
"underline": false,
|
||||
"labelWidth": 0,
|
||||
"labelHeight": 0,
|
||||
"labelPosition": "",
|
||||
"labelPercentage": 0,
|
||||
"route": [
|
||||
{
|
||||
"x": 362,
|
||||
"y": 245
|
||||
},
|
||||
{
|
||||
"x": 362,
|
||||
"y": 315
|
||||
}
|
||||
],
|
||||
"animated": false,
|
||||
"tooltip": "",
|
||||
"icon": null,
|
||||
"zIndex": 0
|
||||
},
|
||||
{
|
||||
"id": "b.(b -> c)[0]",
|
||||
"src": "b.b",
|
||||
"srcArrow": "none",
|
||||
"srcLabel": "",
|
||||
"dst": "b.c",
|
||||
"dstArrow": "triangle",
|
||||
"dstLabel": "",
|
||||
"opacity": 1,
|
||||
"strokeDash": 0,
|
||||
"strokeWidth": 2,
|
||||
"stroke": "#0D32B2",
|
||||
"label": "",
|
||||
"fontSize": 16,
|
||||
"fontFamily": "DEFAULT",
|
||||
"language": "",
|
||||
"color": "#676C7E",
|
||||
"italic": true,
|
||||
"bold": false,
|
||||
"underline": false,
|
||||
"labelWidth": 0,
|
||||
"labelHeight": 0,
|
||||
"labelPosition": "",
|
||||
"labelPercentage": 0,
|
||||
"route": [
|
||||
{
|
||||
"x": 808.5,
|
||||
"y": 362
|
||||
},
|
||||
{
|
||||
"x": 808.5,
|
||||
"y": 432
|
||||
}
|
||||
],
|
||||
"animated": false,
|
||||
"tooltip": "",
|
||||
"icon": null,
|
||||
"zIndex": 0
|
||||
}
|
||||
]
|
||||
}
|
||||
59
e2etests/testdata/stable/container_dimensions/elk/sketch.exp.svg
vendored
Normal file
59
e2etests/testdata/stable/container_dimensions/elk/sketch.exp.svg
vendored
Normal file
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 651 KiB |
12
main.go
12
main.go
|
|
@ -270,7 +270,17 @@ func compile(ctx context.Context, ms *xmain.State, plugin d2plugin.Plugin, sketc
|
|||
if sketch {
|
||||
opts.FontFamily = go2.Pointer(d2fonts.HandDrawn)
|
||||
}
|
||||
diagram, _, err := d2lib.Compile(ctx, string(input), opts)
|
||||
diagram, g, err := d2lib.Compile(ctx, string(input), opts)
|
||||
if err != nil {
|
||||
return nil, false, err
|
||||
}
|
||||
|
||||
pluginInfo, err := plugin.Info(ctx)
|
||||
if err != nil {
|
||||
return nil, false, err
|
||||
}
|
||||
|
||||
err = d2plugin.FeatureSupportCheck(pluginInfo, g)
|
||||
if err != nil {
|
||||
return nil, false, err
|
||||
}
|
||||
|
|
|
|||
1435
testdata/d2compiler/TestCompile/dimensions_on_containers.exp.json
generated
vendored
Normal file
1435
testdata/d2compiler/TestCompile/dimensions_on_containers.exp.json
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
36
testdata/d2compiler/TestCompile/no_dimensions_on_containers.exp.json
generated
vendored
36
testdata/d2compiler/TestCompile/no_dimensions_on_containers.exp.json
generated
vendored
|
|
@ -1,36 +0,0 @@
|
|||
{
|
||||
"graph": null,
|
||||
"err": {
|
||||
"ioerr": null,
|
||||
"errs": [
|
||||
{
|
||||
"range": "d2/testdata/d2compiler/TestCompile/no_dimensions_on_containers.d2,4:2:54-4:12:64",
|
||||
"errmsg": "d2/testdata/d2compiler/TestCompile/no_dimensions_on_containers.d2:5:3: width cannot be used on container: containers.circle container"
|
||||
},
|
||||
{
|
||||
"range": "d2/testdata/d2compiler/TestCompile/no_dimensions_on_containers.d2,14:2:173-14:12:183",
|
||||
"errmsg": "d2/testdata/d2compiler/TestCompile/no_dimensions_on_containers.d2:15:3: width cannot be used on container: containers.diamond container"
|
||||
},
|
||||
{
|
||||
"range": "d2/testdata/d2compiler/TestCompile/no_dimensions_on_containers.d2,15:2:186-15:13:197",
|
||||
"errmsg": "d2/testdata/d2compiler/TestCompile/no_dimensions_on_containers.d2:16:3: height cannot be used on container: containers.diamond container"
|
||||
},
|
||||
{
|
||||
"range": "d2/testdata/d2compiler/TestCompile/no_dimensions_on_containers.d2,24:2:284-24:12:294",
|
||||
"errmsg": "d2/testdata/d2compiler/TestCompile/no_dimensions_on_containers.d2:25:3: width cannot be used on container: containers.oval container"
|
||||
},
|
||||
{
|
||||
"range": "d2/testdata/d2compiler/TestCompile/no_dimensions_on_containers.d2,25:2:297-25:13:308",
|
||||
"errmsg": "d2/testdata/d2compiler/TestCompile/no_dimensions_on_containers.d2:26:3: height cannot be used on container: containers.oval container"
|
||||
},
|
||||
{
|
||||
"range": "d2/testdata/d2compiler/TestCompile/no_dimensions_on_containers.d2,35:2:417-35:12:427",
|
||||
"errmsg": "d2/testdata/d2compiler/TestCompile/no_dimensions_on_containers.d2:36:3: width cannot be used on container: containers.hexagon container"
|
||||
},
|
||||
{
|
||||
"range": "d2/testdata/d2compiler/TestCompile/no_dimensions_on_containers.d2,36:2:430-36:13:441",
|
||||
"errmsg": "d2/testdata/d2compiler/TestCompile/no_dimensions_on_containers.d2:37:3: height cannot be used on container: containers.hexagon container"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue