From 1bc5d90d227006c93e388e2c8d0fc1e6b53f7e96 Mon Sep 17 00:00:00 2001 From: Alexander Wang Date: Thu, 23 Feb 2023 08:49:02 -0800 Subject: [PATCH 1/6] add failing compiler test --- d2compiler/compile_test.go | 15 ++ d2oracle/edit_test.go | 17 ++ .../nil_scope_obj_regression.exp.json | 250 ++++++++++++++++++ 3 files changed, 282 insertions(+) create mode 100644 testdata/d2compiler/TestCompile/nil_scope_obj_regression.exp.json diff --git a/d2compiler/compile_test.go b/d2compiler/compile_test.go index 1347435c4..3deef1e5e 100644 --- a/d2compiler/compile_test.go +++ b/d2compiler/compile_test.go @@ -1378,6 +1378,21 @@ x -> y: { } }, }, + { + name: "nil_scope_obj_regression", + + text: `a +b: { + _.a +} +`, + assertions: func(t *testing.T, g *d2graph.Graph) { + tassert.Equal(t, "a", g.Objects[0].ID) + for _, ref := range g.Objects[0].References { + tassert.NotNil(t, ref.ScopeObj) + } + }, + }, { name: "path_link", diff --git a/d2oracle/edit_test.go b/d2oracle/edit_test.go index f4c3d0ce4..9b84e15ed 100644 --- a/d2oracle/edit_test.go +++ b/d2oracle/edit_test.go @@ -3309,6 +3309,23 @@ d exp: `a: { _.b -> c -> _.b } +`, + }, + { + name: "container_multiple_refs_with_underscore", + + text: `a +b: { + _.a +} +`, + key: `a`, + newKey: `b.a`, + + exp: `b.a +b: { + a +} `, }, } diff --git a/testdata/d2compiler/TestCompile/nil_scope_obj_regression.exp.json b/testdata/d2compiler/TestCompile/nil_scope_obj_regression.exp.json new file mode 100644 index 000000000..00ce55a57 --- /dev/null +++ b/testdata/d2compiler/TestCompile/nil_scope_obj_regression.exp.json @@ -0,0 +1,250 @@ +{ + "graph": { + "name": "", + "ast": { + "range": "d2/testdata/d2compiler/TestCompile/nil_scope_obj_regression.d2,0:0:0-4:0:15", + "nodes": [ + { + "map_key": { + "range": "d2/testdata/d2compiler/TestCompile/nil_scope_obj_regression.d2,0:0:0-0:1:1", + "key": { + "range": "d2/testdata/d2compiler/TestCompile/nil_scope_obj_regression.d2,0:0:0-0:1:1", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile/nil_scope_obj_regression.d2,0:0:0-0:1:1", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + }, + { + "map_key": { + "range": "d2/testdata/d2compiler/TestCompile/nil_scope_obj_regression.d2,1:0:2-3:1:14", + "key": { + "range": "d2/testdata/d2compiler/TestCompile/nil_scope_obj_regression.d2,1:0:2-1:1:3", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile/nil_scope_obj_regression.d2,1:0:2-1:1:3", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "d2/testdata/d2compiler/TestCompile/nil_scope_obj_regression.d2,1:3:5-3:0:13", + "nodes": [ + { + "map_key": { + "range": "d2/testdata/d2compiler/TestCompile/nil_scope_obj_regression.d2,2:2:9-2:5:12", + "key": { + "range": "d2/testdata/d2compiler/TestCompile/nil_scope_obj_regression.d2,2:2:9-2:5:12", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile/nil_scope_obj_regression.d2,2:2:9-2:3:10", + "value": [ + { + "string": "_", + "raw_string": "_" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile/nil_scope_obj_regression.d2,2:4:11-2:5:12", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + } + ] + } + } + } + } + ] + }, + "root": { + "id": "", + "id_val": "", + "label_dimensions": { + "width": 0, + "height": 0 + }, + "attributes": { + "label": { + "value": "" + }, + "style": {}, + "near_key": null, + "shape": { + "value": "" + }, + "direction": { + "value": "" + }, + "constraint": { + "value": "" + } + }, + "zIndex": 0 + }, + "edges": null, + "objects": [ + { + "id": "a", + "id_val": "a", + "label_dimensions": { + "width": 0, + "height": 0 + }, + "references": [ + { + "key": { + "range": "d2/testdata/d2compiler/TestCompile/nil_scope_obj_regression.d2,0:0:0-0:1:1", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile/nil_scope_obj_regression.d2,0:0:0-0:1:1", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": -1 + }, + { + "key": { + "range": "d2/testdata/d2compiler/TestCompile/nil_scope_obj_regression.d2,2:2:9-2:5:12", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile/nil_scope_obj_regression.d2,2:2:9-2:3:10", + "value": [ + { + "string": "_", + "raw_string": "_" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile/nil_scope_obj_regression.d2,2:4:11-2:5:12", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "key_path_index": 1, + "map_key_edge_index": -1 + } + ], + "attributes": { + "label": { + "value": "a" + }, + "style": {}, + "near_key": null, + "shape": { + "value": "rectangle" + }, + "direction": { + "value": "" + }, + "constraint": { + "value": "" + } + }, + "zIndex": 0 + }, + { + "id": "b", + "id_val": "b", + "label_dimensions": { + "width": 0, + "height": 0 + }, + "references": [ + { + "key": { + "range": "d2/testdata/d2compiler/TestCompile/nil_scope_obj_regression.d2,1:0:2-1:1:3", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile/nil_scope_obj_regression.d2,1:0:2-1:1:3", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": -1 + } + ], + "attributes": { + "label": { + "value": "b" + }, + "style": {}, + "near_key": null, + "shape": { + "value": "rectangle" + }, + "direction": { + "value": "" + }, + "constraint": { + "value": "" + } + }, + "zIndex": 0 + } + ] + }, + "err": null +} From fa9f402f8cc0b384b972fc7401c40879bbfec6a4 Mon Sep 17 00:00:00 2001 From: Alexander Wang Date: Thu, 23 Feb 2023 09:46:28 -0800 Subject: [PATCH 2/6] ensure --- d2compiler/compile.go | 23 +- d2graph/d2graph.go | 14 +- d2oracle/edit_test.go | 3 +- .../TestCompile2/boards/recursive.exp.json | 300 ++++++++++++++++++ .../TestCompile2/boards/root.exp.json | 100 ++++++ ...ner_multiple_refs_with_underscore.exp.json | 185 +++++++++++ 6 files changed, 614 insertions(+), 11 deletions(-) create mode 100644 testdata/d2oracle/TestMove/container_multiple_refs_with_underscore.exp.json diff --git a/d2compiler/compile.go b/d2compiler/compile.go index 7bed57db9..01fbde588 100644 --- a/d2compiler/compile.go +++ b/d2compiler/compile.go @@ -63,6 +63,7 @@ func (c *compiler) compileBoard(g *d2graph.Graph, ir *d2ir.Map) *d2graph.Graph { ir = ir.Copy(nil).(*d2ir.Map) // c.preprocessSeqDiagrams(ir) c.compileMap(g.Root, ir) + // c.resolveUnderscoreRefs(g.Root, ir) if len(c.err.Errors) == 0 { c.validateKeys(g.Root, ir) } @@ -111,6 +112,18 @@ func (c *compiler) errorf(n d2ast.Node, f string, v ...interface{}) { c.err.Errors = append(c.err.Errors, d2parser.Errorf(n, f, v...).(d2ast.Error)) } +// func (c *compiler) resolveUnderscoreRefs(obj *d2graph.Object, m *d2ir.Map) { +// for _, f := range m.Fields { +// } +// +// for _, obj := range g.Objects { +// for _, ref := range obj.References { +// if ref.ScopeObj == nil { +// } +// } +// } +// } + func (c *compiler) compileMap(obj *d2graph.Object, m *d2ir.Map) { shape := m.GetField("shape") if shape != nil { @@ -189,7 +202,13 @@ func (c *compiler) compileField(obj *d2graph.Object, f *d2ir.Field) { } } scopeObjIDA := d2ir.IDA(fr.Context.ScopeMap) - scopeObj, _ := obj.Graph.Root.HasChildIDVal(scopeObjIDA) + // spew.Dump("==========") + // println("\033[1;31m--- DEBUG:", "=======================", "\033[m") + // for _, o := range obj.Graph.Root.ChildrenArray { + // println("\033[1;31m--- DEBUG:", o.AbsID(), "\033[m") + // } + scopeObj := obj.Graph.Root.EnsureChildIDVal(scopeObjIDA) + // spew.Dump(obj.AbsID(), scopeObjIDA, scopeObj == nil) obj.References = append(obj.References, d2graph.Reference{ Key: fr.KeyPath, KeyPathIndex: fr.KeyPathIndex(), @@ -427,7 +446,7 @@ func (c *compiler) compileEdge(obj *d2graph.Object, e *d2ir.Edge) { edge.Attributes.Label.MapKey = e.LastPrimaryKey() for _, er := range e.References { scopeObjIDA := d2ir.IDA(er.Context.ScopeMap) - scopeObj, _ := edge.Src.Graph.Root.HasChildIDVal(scopeObjIDA) + scopeObj := edge.Src.Graph.Root.EnsureChildIDVal(scopeObjIDA) edge.References = append(edge.References, d2graph.EdgeReference{ Edge: er.Context.Edge, MapKey: er.Context.Key, diff --git a/d2graph/d2graph.go b/d2graph/d2graph.go index ae3bfc74d..a19487ee2 100644 --- a/d2graph/d2graph.go +++ b/d2graph/d2graph.go @@ -560,15 +560,15 @@ func (obj *Object) HasChild(ids []string) (*Object, bool) { return child, true } -// Keep in sync with HasChild. -func (obj *Object) HasChildIDVal(ids []string) (*Object, bool) { +// Keep in sync with EnsureChild. +func (obj *Object) EnsureChildIDVal(ids []string) *Object { if len(ids) == 0 { - return obj, true + return obj } if len(ids) == 1 && ids[0] != "style" { _, ok := ReservedKeywords[ids[0]] if ok { - return obj, true + return obj } } @@ -583,13 +583,13 @@ func (obj *Object) HasChildIDVal(ids []string) (*Object, bool) { } } if child == nil { - return nil, false + child = obj.newObject(id) } if len(ids) >= 1 { - return child.HasChildIDVal(ids) + return child.EnsureChildIDVal(ids) } - return child, true + return child } func (obj *Object) HasEdge(mk *d2ast.Key) (*Edge, bool) { diff --git a/d2oracle/edit_test.go b/d2oracle/edit_test.go index 9b84e15ed..0050b7f91 100644 --- a/d2oracle/edit_test.go +++ b/d2oracle/edit_test.go @@ -3322,8 +3322,7 @@ b: { key: `a`, newKey: `b.a`, - exp: `b.a -b: { + exp: `b: { a } `, diff --git a/testdata/d2compiler/TestCompile2/boards/recursive.exp.json b/testdata/d2compiler/TestCompile2/boards/recursive.exp.json index 4496b0752..805ca96fe 100644 --- a/testdata/d2compiler/TestCompile2/boards/recursive.exp.json +++ b/testdata/d2compiler/TestCompile2/boards/recursive.exp.json @@ -740,6 +740,56 @@ } }, "zIndex": 0 + }, + { + "id": "layers", + "id_val": "layers", + "label_dimensions": { + "width": 0, + "height": 0 + }, + "attributes": { + "label": { + "value": "layers" + }, + "style": {}, + "near_key": null, + "shape": { + "value": "rectangle" + }, + "direction": { + "value": "" + }, + "constraint": { + "value": "" + } + }, + "zIndex": 0 + }, + { + "id": "one", + "id_val": "one", + "label_dimensions": { + "width": 0, + "height": 0 + }, + "attributes": { + "label": { + "value": "one" + }, + "style": {}, + "near_key": null, + "shape": { + "value": "rectangle" + }, + "direction": { + "value": "" + }, + "constraint": { + "value": "" + } + }, + "zIndex": 0 } ] }, @@ -1112,6 +1162,56 @@ } }, "zIndex": 0 + }, + { + "id": "layers", + "id_val": "layers", + "label_dimensions": { + "width": 0, + "height": 0 + }, + "attributes": { + "label": { + "value": "layers" + }, + "style": {}, + "near_key": null, + "shape": { + "value": "rectangle" + }, + "direction": { + "value": "" + }, + "constraint": { + "value": "" + } + }, + "zIndex": 0 + }, + { + "id": "two", + "id_val": "two", + "label_dimensions": { + "width": 0, + "height": 0 + }, + "attributes": { + "label": { + "value": "two" + }, + "style": {}, + "near_key": null, + "shape": { + "value": "rectangle" + }, + "direction": { + "value": "" + }, + "constraint": { + "value": "" + } + }, + "zIndex": 0 } ], "steps": [ @@ -1484,6 +1584,106 @@ } }, "zIndex": 0 + }, + { + "id": "layers", + "id_val": "layers", + "label_dimensions": { + "width": 0, + "height": 0 + }, + "attributes": { + "label": { + "value": "layers" + }, + "style": {}, + "near_key": null, + "shape": { + "value": "rectangle" + }, + "direction": { + "value": "" + }, + "constraint": { + "value": "" + } + }, + "zIndex": 0 + }, + { + "id": "two", + "id_val": "two", + "label_dimensions": { + "width": 0, + "height": 0 + }, + "attributes": { + "label": { + "value": "two" + }, + "style": {}, + "near_key": null, + "shape": { + "value": "rectangle" + }, + "direction": { + "value": "" + }, + "constraint": { + "value": "" + } + }, + "zIndex": 0 + }, + { + "id": "steps", + "id_val": "steps", + "label_dimensions": { + "width": 0, + "height": 0 + }, + "attributes": { + "label": { + "value": "steps" + }, + "style": {}, + "near_key": null, + "shape": { + "value": "rectangle" + }, + "direction": { + "value": "" + }, + "constraint": { + "value": "" + } + }, + "zIndex": 0 + }, + { + "id": "seinfeld", + "id_val": "seinfeld", + "label_dimensions": { + "width": 0, + "height": 0 + }, + "attributes": { + "label": { + "value": "seinfeld" + }, + "style": {}, + "near_key": null, + "shape": { + "value": "rectangle" + }, + "direction": { + "value": "" + }, + "constraint": { + "value": "" + } + }, + "zIndex": 0 } ] }, @@ -1856,6 +2056,106 @@ } }, "zIndex": 0 + }, + { + "id": "layers", + "id_val": "layers", + "label_dimensions": { + "width": 0, + "height": 0 + }, + "attributes": { + "label": { + "value": "layers" + }, + "style": {}, + "near_key": null, + "shape": { + "value": "rectangle" + }, + "direction": { + "value": "" + }, + "constraint": { + "value": "" + } + }, + "zIndex": 0 + }, + { + "id": "two", + "id_val": "two", + "label_dimensions": { + "width": 0, + "height": 0 + }, + "attributes": { + "label": { + "value": "two" + }, + "style": {}, + "near_key": null, + "shape": { + "value": "rectangle" + }, + "direction": { + "value": "" + }, + "constraint": { + "value": "" + } + }, + "zIndex": 0 + }, + { + "id": "steps", + "id_val": "steps", + "label_dimensions": { + "width": 0, + "height": 0 + }, + "attributes": { + "label": { + "value": "steps" + }, + "style": {}, + "near_key": null, + "shape": { + "value": "rectangle" + }, + "direction": { + "value": "" + }, + "constraint": { + "value": "" + } + }, + "zIndex": 0 + }, + { + "id": "missoula", + "id_val": "missoula", + "label_dimensions": { + "width": 0, + "height": 0 + }, + "attributes": { + "label": { + "value": "missoula" + }, + "style": {}, + "near_key": null, + "shape": { + "value": "rectangle" + }, + "direction": { + "value": "" + }, + "constraint": { + "value": "" + } + }, + "zIndex": 0 } ] } diff --git a/testdata/d2compiler/TestCompile2/boards/root.exp.json b/testdata/d2compiler/TestCompile2/boards/root.exp.json index 7efd58eac..7d49aad12 100644 --- a/testdata/d2compiler/TestCompile2/boards/root.exp.json +++ b/testdata/d2compiler/TestCompile2/boards/root.exp.json @@ -474,6 +474,56 @@ } }, "zIndex": 0 + }, + { + "id": "layers", + "id_val": "layers", + "label_dimensions": { + "width": 0, + "height": 0 + }, + "attributes": { + "label": { + "value": "layers" + }, + "style": {}, + "near_key": null, + "shape": { + "value": "rectangle" + }, + "direction": { + "value": "" + }, + "constraint": { + "value": "" + } + }, + "zIndex": 0 + }, + { + "id": "one", + "id_val": "one", + "label_dimensions": { + "width": 0, + "height": 0 + }, + "attributes": { + "label": { + "value": "one" + }, + "style": {}, + "near_key": null, + "shape": { + "value": "rectangle" + }, + "direction": { + "value": "" + }, + "constraint": { + "value": "" + } + }, + "zIndex": 0 } ] }, @@ -713,6 +763,56 @@ } }, "zIndex": 0 + }, + { + "id": "layers", + "id_val": "layers", + "label_dimensions": { + "width": 0, + "height": 0 + }, + "attributes": { + "label": { + "value": "layers" + }, + "style": {}, + "near_key": null, + "shape": { + "value": "rectangle" + }, + "direction": { + "value": "" + }, + "constraint": { + "value": "" + } + }, + "zIndex": 0 + }, + { + "id": "two", + "id_val": "two", + "label_dimensions": { + "width": 0, + "height": 0 + }, + "attributes": { + "label": { + "value": "two" + }, + "style": {}, + "near_key": null, + "shape": { + "value": "rectangle" + }, + "direction": { + "value": "" + }, + "constraint": { + "value": "" + } + }, + "zIndex": 0 } ] } diff --git a/testdata/d2oracle/TestMove/container_multiple_refs_with_underscore.exp.json b/testdata/d2oracle/TestMove/container_multiple_refs_with_underscore.exp.json new file mode 100644 index 000000000..ef29483a3 --- /dev/null +++ b/testdata/d2oracle/TestMove/container_multiple_refs_with_underscore.exp.json @@ -0,0 +1,185 @@ +{ + "graph": { + "name": "", + "ast": { + "range": "d2/testdata/d2oracle/TestMove/container_multiple_refs_with_underscore.d2,0:0:0-3:0:11", + "nodes": [ + { + "map_key": { + "range": "d2/testdata/d2oracle/TestMove/container_multiple_refs_with_underscore.d2,0:0:0-2:1:10", + "key": { + "range": "d2/testdata/d2oracle/TestMove/container_multiple_refs_with_underscore.d2,0:0:0-0:1:1", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestMove/container_multiple_refs_with_underscore.d2,0:0:0-0:1:1", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "d2/testdata/d2oracle/TestMove/container_multiple_refs_with_underscore.d2,0:3:3-2:0:9", + "nodes": [ + { + "map_key": { + "range": "d2/testdata/d2oracle/TestMove/container_multiple_refs_with_underscore.d2,1:2:7-1:3:8", + "key": { + "range": "d2/testdata/d2oracle/TestMove/container_multiple_refs_with_underscore.d2,1:2:7-1:3:8", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestMove/container_multiple_refs_with_underscore.d2,1:2:7-1:3:8", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + } + ] + } + } + } + } + ] + }, + "root": { + "id": "", + "id_val": "", + "label_dimensions": { + "width": 0, + "height": 0 + }, + "attributes": { + "label": { + "value": "" + }, + "style": {}, + "near_key": null, + "shape": { + "value": "" + }, + "direction": { + "value": "" + }, + "constraint": { + "value": "" + } + }, + "zIndex": 0 + }, + "edges": null, + "objects": [ + { + "id": "b", + "id_val": "b", + "label_dimensions": { + "width": 0, + "height": 0 + }, + "references": [ + { + "key": { + "range": "d2/testdata/d2oracle/TestMove/container_multiple_refs_with_underscore.d2,0:0:0-0:1:1", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestMove/container_multiple_refs_with_underscore.d2,0:0:0-0:1:1", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": -1 + } + ], + "attributes": { + "label": { + "value": "b" + }, + "style": {}, + "near_key": null, + "shape": { + "value": "rectangle" + }, + "direction": { + "value": "" + }, + "constraint": { + "value": "" + } + }, + "zIndex": 0 + }, + { + "id": "a", + "id_val": "a", + "label_dimensions": { + "width": 0, + "height": 0 + }, + "references": [ + { + "key": { + "range": "d2/testdata/d2oracle/TestMove/container_multiple_refs_with_underscore.d2,1:2:7-1:3:8", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestMove/container_multiple_refs_with_underscore.d2,1:2:7-1:3:8", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": -1 + } + ], + "attributes": { + "label": { + "value": "a" + }, + "style": {}, + "near_key": null, + "shape": { + "value": "rectangle" + }, + "direction": { + "value": "" + }, + "constraint": { + "value": "" + } + }, + "zIndex": 0 + } + ] + }, + "err": "" +} From 6594ffc904cc5db862d36be305dcb771b0c7aba7 Mon Sep 17 00:00:00 2001 From: Alexander Wang Date: Thu, 23 Feb 2023 09:47:04 -0800 Subject: [PATCH 3/6] cleanup --- d2compiler/compile.go | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/d2compiler/compile.go b/d2compiler/compile.go index 01fbde588..8c08f58b2 100644 --- a/d2compiler/compile.go +++ b/d2compiler/compile.go @@ -63,7 +63,6 @@ func (c *compiler) compileBoard(g *d2graph.Graph, ir *d2ir.Map) *d2graph.Graph { ir = ir.Copy(nil).(*d2ir.Map) // c.preprocessSeqDiagrams(ir) c.compileMap(g.Root, ir) - // c.resolveUnderscoreRefs(g.Root, ir) if len(c.err.Errors) == 0 { c.validateKeys(g.Root, ir) } @@ -112,18 +111,6 @@ func (c *compiler) errorf(n d2ast.Node, f string, v ...interface{}) { c.err.Errors = append(c.err.Errors, d2parser.Errorf(n, f, v...).(d2ast.Error)) } -// func (c *compiler) resolveUnderscoreRefs(obj *d2graph.Object, m *d2ir.Map) { -// for _, f := range m.Fields { -// } -// -// for _, obj := range g.Objects { -// for _, ref := range obj.References { -// if ref.ScopeObj == nil { -// } -// } -// } -// } - func (c *compiler) compileMap(obj *d2graph.Object, m *d2ir.Map) { shape := m.GetField("shape") if shape != nil { @@ -202,13 +189,7 @@ func (c *compiler) compileField(obj *d2graph.Object, f *d2ir.Field) { } } scopeObjIDA := d2ir.IDA(fr.Context.ScopeMap) - // spew.Dump("==========") - // println("\033[1;31m--- DEBUG:", "=======================", "\033[m") - // for _, o := range obj.Graph.Root.ChildrenArray { - // println("\033[1;31m--- DEBUG:", o.AbsID(), "\033[m") - // } scopeObj := obj.Graph.Root.EnsureChildIDVal(scopeObjIDA) - // spew.Dump(obj.AbsID(), scopeObjIDA, scopeObj == nil) obj.References = append(obj.References, d2graph.Reference{ Key: fr.KeyPath, KeyPathIndex: fr.KeyPathIndex(), From f6f68518f8accc395bf04540536fc37453c81e4f Mon Sep 17 00:00:00 2001 From: Alexander Wang Date: Mon, 27 Feb 2023 10:35:26 -0800 Subject: [PATCH 4/6] tests --- .../complex-layers/dagre/board.exp.json | 1213 ++++++++++++++++- .../stable/complex-layers/elk/board.exp.json | 1085 ++++++++++++++- 2 files changed, 2210 insertions(+), 88 deletions(-) diff --git a/e2etests/testdata/stable/complex-layers/dagre/board.exp.json b/e2etests/testdata/stable/complex-layers/dagre/board.exp.json index fd8602b3c..6d4672a8b 100644 --- a/e2etests/testdata/stable/complex-layers/dagre/board.exp.json +++ b/e2etests/testdata/stable/complex-layers/dagre/board.exp.json @@ -177,7 +177,7 @@ "type": "rectangle", "pos": { "x": 0, - "y": 0 + "y": 50 }, "width": 88, "height": 66, @@ -213,12 +213,94 @@ "zIndex": 0, "level": 1 }, + { + "id": "layers", + "type": "rectangle", + "pos": { + "x": 128, + "y": 41 + }, + "width": 183, + "height": 125, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B4", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "layers", + "fontSize": 28, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 67, + "labelHeight": 36, + "labelPosition": "OUTSIDE_TOP_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "layers.window", + "type": "rectangle", + "pos": { + "x": 168, + "y": 70 + }, + "width": 103, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B5", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "window", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 58, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 2 + }, { "id": "glass", "type": "rectangle", "pos": { - "x": 148, - "y": 0 + "x": 351, + "y": 50 }, "width": 81, "height": 66, @@ -306,7 +388,7 @@ "type": "rectangle", "pos": { "x": 0, - "y": 0 + "y": 50 }, "width": 104, "height": 66, @@ -342,12 +424,94 @@ "zIndex": 0, "level": 1 }, + { + "id": "layers", + "type": "rectangle", + "pos": { + "x": 144, + "y": 41 + }, + "width": 155, + "height": 125, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B4", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "layers", + "fontSize": 28, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 67, + "labelHeight": 36, + "labelPosition": "OUTSIDE_TOP_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "layers.roof", + "type": "rectangle", + "pos": { + "x": 184, + "y": 70 + }, + "width": 75, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B5", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "roof", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 30, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 2 + }, { "id": "starlink", "type": "rectangle", "pos": { - "x": 164, - "y": 0 + "x": 339, + "y": 50 }, "width": 101, "height": 66, @@ -387,8 +551,8 @@ "id": "utility hookup", "type": "rectangle", "pos": { - "x": 325, - "y": 0 + "x": 500, + "y": 50 }, "width": 146, "height": 66, @@ -476,7 +640,7 @@ "type": "rectangle", "pos": { "x": 0, - "y": 0 + "y": 50 }, "width": 81, "height": 66, @@ -512,12 +676,94 @@ "zIndex": 0, "level": 1 }, + { + "id": "layers", + "type": "rectangle", + "pos": { + "x": 121, + "y": 41 + }, + "width": 174, + "height": 125, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B4", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "layers", + "fontSize": 28, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 67, + "labelHeight": 36, + "labelPosition": "OUTSIDE_TOP_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "layers.garage", + "type": "rectangle", + "pos": { + "x": 161, + "y": 70 + }, + "width": 94, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B5", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "garage", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 49, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 2 + }, { "id": "vehicles", "type": "rectangle", "pos": { - "x": 141, - "y": 0 + "x": 335, + "y": 50 }, "width": 103, "height": 66, @@ -654,7 +900,7 @@ "y": 41 }, "width": 361, - "height": 125, + "height": 425, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, @@ -692,7 +938,7 @@ "type": "rectangle", "pos": { "x": 40, - "y": 70 + "y": 220 }, "width": 110, "height": 66, @@ -728,12 +974,217 @@ "zIndex": 0, "level": 2 }, + { + "id": "layers", + "type": "rectangle", + "pos": { + "x": 381, + "y": 41 + }, + "width": 359, + "height": 425, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B4", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "layers", + "fontSize": 28, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 67, + "labelHeight": 36, + "labelPosition": "OUTSIDE_TOP_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "layers.repair", + "type": "rectangle", + "pos": { + "x": 401, + "y": 106 + }, + "width": 319, + "height": 330, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B5", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "repair", + "fontSize": 24, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 60, + "labelHeight": 31, + "labelPosition": "OUTSIDE_TOP_CENTER", + "zIndex": 0, + "level": 2 + }, + { + "id": "layers.repair.steps", + "type": "rectangle", + "pos": { + "x": 421, + "y": 169 + }, + "width": 279, + "height": 235, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B6", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "steps", + "fontSize": 20, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 45, + "labelHeight": 26, + "labelPosition": "OUTSIDE_TOP_CENTER", + "zIndex": 0, + "level": 3 + }, + { + "id": "layers.repair.steps.1", + "type": "rectangle", + "pos": { + "x": 441, + "y": 230 + }, + "width": 239, + "height": 140, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "N7", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "1", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 7, + "labelHeight": 21, + "labelPosition": "OUTSIDE_TOP_CENTER", + "zIndex": 0, + "level": 4 + }, + { + "id": "layers.repair.steps.1.find contractors", + "type": "rectangle", + "pos": { + "x": 481, + "y": 267 + }, + "width": 159, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "N7", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "find contractors", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 114, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 5 + }, { "id": "find contractors.facebook", "type": "rectangle", "pos": { "x": 210, - "y": 70 + "y": 220 }, "width": 111, "height": 66, @@ -820,8 +1271,8 @@ "id": "find contractors", "type": "rectangle", "pos": { - "x": 0, - "y": 0 + "x": 253, + "y": 150 }, "width": 159, "height": 66, @@ -857,12 +1308,176 @@ "zIndex": 0, "level": 1 }, + { + "id": "layers", + "type": "rectangle", + "pos": { + "x": 0, + "y": 41 + }, + "width": 213, + "height": 325, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B4", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "layers", + "fontSize": 28, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 67, + "labelHeight": 36, + "labelPosition": "OUTSIDE_TOP_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "layers.repair", + "type": "rectangle", + "pos": { + "x": 20, + "y": 106 + }, + "width": 173, + "height": 230, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B5", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "repair", + "fontSize": 24, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 60, + "labelHeight": 31, + "labelPosition": "OUTSIDE_TOP_CENTER", + "zIndex": 0, + "level": 2 + }, + { + "id": "layers.repair.steps", + "type": "rectangle", + "pos": { + "x": 40, + "y": 169 + }, + "width": 133, + "height": 135, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B6", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "steps", + "fontSize": 20, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 45, + "labelHeight": 26, + "labelPosition": "OUTSIDE_TOP_CENTER", + "zIndex": 0, + "level": 3 + }, + { + "id": "layers.repair.steps.2", + "type": "rectangle", + "pos": { + "x": 80, + "y": 204 + }, + "width": 53, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "N7", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "2", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 8, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 4 + }, { "id": "solicit quotes", "type": "rectangle", "pos": { - "x": 10, - "y": 166 + "x": 263, + "y": 466 }, "width": 140, "height": 66, @@ -926,20 +1541,44 @@ "labelPercentage": 0, "route": [ { - "x": 79.5, - "y": 66 + "x": 332.5, + "y": 216 }, { - "x": 79.5, - "y": 106 + "x": 332.5, + "y": 256 }, { - "x": 79.5, - "y": 126 + "x": 332.5, + "y": 276 }, { - "x": 79.5, - "y": 166 + "x": 332.5, + "y": 291 + }, + { + "x": 332.5, + "y": 306 + }, + { + "x": 332.5, + "y": 326 + }, + { + "x": 332.5, + "y": 341 + }, + { + "x": 332.5, + "y": 356 + }, + { + "x": 332.5, + "y": 426 + }, + { + "x": 332.5, + "y": 466 } ], "isCurve": true, @@ -998,8 +1637,8 @@ "id": "obtain quotes", "type": "rectangle", "pos": { - "x": 0, - "y": 0 + "x": 253, + "y": 150 }, "width": 143, "height": 66, @@ -1035,12 +1674,176 @@ "zIndex": 0, "level": 1 }, + { + "id": "layers", + "type": "rectangle", + "pos": { + "x": 0, + "y": 41 + }, + "width": 213, + "height": 325, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B4", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "layers", + "fontSize": 28, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 67, + "labelHeight": 36, + "labelPosition": "OUTSIDE_TOP_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "layers.repair", + "type": "rectangle", + "pos": { + "x": 20, + "y": 106 + }, + "width": 173, + "height": 230, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B5", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "repair", + "fontSize": 24, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 60, + "labelHeight": 31, + "labelPosition": "OUTSIDE_TOP_CENTER", + "zIndex": 0, + "level": 2 + }, + { + "id": "layers.repair.steps", + "type": "rectangle", + "pos": { + "x": 40, + "y": 169 + }, + "width": 133, + "height": 135, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B6", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "steps", + "fontSize": 20, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 45, + "labelHeight": 26, + "labelPosition": "OUTSIDE_TOP_CENTER", + "zIndex": 0, + "level": 3 + }, + { + "id": "layers.repair.steps.3", + "type": "rectangle", + "pos": { + "x": 80, + "y": 204 + }, + "width": 53, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "N7", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "3", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 8, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 4 + }, { "id": "negotiate", "type": "rectangle", "pos": { - "x": 16, - "y": 166 + "x": 269, + "y": 466 }, "width": 112, "height": 66, @@ -1104,20 +1907,44 @@ "labelPercentage": 0, "route": [ { - "x": 71.5, - "y": 66 + "x": 324.5, + "y": 216 }, { - "x": 71.5, - "y": 106 + "x": 324.5, + "y": 256 }, { - "x": 71.5, - "y": 126 + "x": 324.5, + "y": 276 }, { - "x": 71.5, - "y": 166 + "x": 324.5, + "y": 291 + }, + { + "x": 324.5, + "y": 306 + }, + { + "x": 324.5, + "y": 326 + }, + { + "x": 324.5, + "y": 341 + }, + { + "x": 324.5, + "y": 356 + }, + { + "x": 324.5, + "y": 426 + }, + { + "x": 324.5, + "y": 466 } ], "isCurve": true, @@ -1176,8 +2003,8 @@ "id": "negotiate", "type": "rectangle", "pos": { - "x": 28, - "y": 0 + "x": 254, + "y": 150 }, "width": 112, "height": 66, @@ -1214,11 +2041,175 @@ "level": 1 }, { - "id": "book the best bid", + "id": "layers", "type": "rectangle", "pos": { "x": 0, - "y": 166 + "y": 41 + }, + "width": 214, + "height": 325, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B4", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "layers", + "fontSize": 28, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 67, + "labelHeight": 36, + "labelPosition": "OUTSIDE_TOP_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "layers.repair", + "type": "rectangle", + "pos": { + "x": 20, + "y": 106 + }, + "width": 174, + "height": 230, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B5", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "repair", + "fontSize": 24, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 60, + "labelHeight": 31, + "labelPosition": "OUTSIDE_TOP_CENTER", + "zIndex": 0, + "level": 2 + }, + { + "id": "layers.repair.steps", + "type": "rectangle", + "pos": { + "x": 40, + "y": 169 + }, + "width": 134, + "height": 135, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B6", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "steps", + "fontSize": 20, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 45, + "labelHeight": 26, + "labelPosition": "OUTSIDE_TOP_CENTER", + "zIndex": 0, + "level": 3 + }, + { + "id": "layers.repair.steps.4", + "type": "rectangle", + "pos": { + "x": 80, + "y": 204 + }, + "width": 54, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "N7", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "4", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 9, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 4 + }, + { + "id": "book the best bid", + "type": "rectangle", + "pos": { + "x": 227, + "y": 466 }, "width": 167, "height": 66, @@ -1282,20 +2273,44 @@ "labelPercentage": 0, "route": [ { - "x": 83.5, - "y": 66 + "x": 310, + "y": 216 }, { - "x": 83.5, - "y": 106 + "x": 310, + "y": 256 }, { - "x": 83.5, - "y": 126 + "x": 310, + "y": 276 }, { - "x": 83.5, - "y": 166 + "x": 310, + "y": 291 + }, + { + "x": 310, + "y": 306 + }, + { + "x": 310, + "y": 326 + }, + { + "x": 310, + "y": 341 + }, + { + "x": 310, + "y": 356 + }, + { + "x": 310, + "y": 426 + }, + { + "x": 310, + "y": 466 } ], "isCurve": true, @@ -1359,7 +2374,7 @@ "type": "rectangle", "pos": { "x": 0, - "y": 0 + "y": 50 }, "width": 103, "height": 66, @@ -1400,7 +2415,7 @@ "type": "rectangle", "pos": { "x": 163, - "y": 0 + "y": 50 }, "width": 75, "height": 66, @@ -1441,7 +2456,7 @@ "type": "rectangle", "pos": { "x": 298, - "y": 0 + "y": 50 }, "width": 94, "height": 66, @@ -1482,7 +2497,7 @@ "type": "rectangle", "pos": { "x": 452, - "y": 0 + "y": 50 }, "width": 88, "height": 66, @@ -1518,12 +2533,94 @@ "zIndex": 0, "level": 1 }, + { + "id": "scenarios", + "type": "rectangle", + "pos": { + "x": 580, + "y": 41 + }, + "width": 167, + "height": 125, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B4", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "scenarios", + "fontSize": 28, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 111, + "labelHeight": 36, + "labelPosition": "OUTSIDE_TOP_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "scenarios.storm", + "type": "rectangle", + "pos": { + "x": 620, + "y": 70 + }, + "width": 87, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B5", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "storm", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 42, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 2 + }, { "id": "rain", "type": "rectangle", "pos": { - "x": 600, - "y": 0 + "x": 787, + "y": 50 }, "width": 73, "height": 66, @@ -1563,8 +2660,8 @@ "id": "thunder", "type": "rectangle", "pos": { - "x": 733, - "y": 0 + "x": 920, + "y": 50 }, "width": 103, "height": 66, diff --git a/e2etests/testdata/stable/complex-layers/elk/board.exp.json b/e2etests/testdata/stable/complex-layers/elk/board.exp.json index 148a3ee4d..16bc4c68d 100644 --- a/e2etests/testdata/stable/complex-layers/elk/board.exp.json +++ b/e2etests/testdata/stable/complex-layers/elk/board.exp.json @@ -177,7 +177,7 @@ "type": "rectangle", "pos": { "x": 12, - "y": 12 + "y": 62 }, "width": 88, "height": 66, @@ -214,12 +214,94 @@ "level": 1 }, { - "id": "glass", + "id": "layers", "type": "rectangle", "pos": { "x": 120, "y": 12 }, + "width": 203, + "height": 166, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B4", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "layers", + "fontSize": 28, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 67, + "labelHeight": 36, + "labelPosition": "INSIDE_TOP_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "layers.window", + "type": "rectangle", + "pos": { + "x": 170, + "y": 62 + }, + "width": 103, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B5", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "window", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 58, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 2 + }, + { + "id": "glass", + "type": "rectangle", + "pos": { + "x": 343, + "y": 62 + }, "width": 81, "height": 66, "opacity": 1, @@ -306,7 +388,7 @@ "type": "rectangle", "pos": { "x": 12, - "y": 12 + "y": 62 }, "width": 104, "height": 66, @@ -343,12 +425,94 @@ "level": 1 }, { - "id": "starlink", + "id": "layers", "type": "rectangle", "pos": { "x": 136, "y": 12 }, + "width": 175, + "height": 166, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B4", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "layers", + "fontSize": 28, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 67, + "labelHeight": 36, + "labelPosition": "INSIDE_TOP_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "layers.roof", + "type": "rectangle", + "pos": { + "x": 186, + "y": 62 + }, + "width": 75, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B5", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "roof", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 30, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 2 + }, + { + "id": "starlink", + "type": "rectangle", + "pos": { + "x": 331, + "y": 62 + }, "width": 101, "height": 66, "opacity": 1, @@ -387,8 +551,8 @@ "id": "utility hookup", "type": "rectangle", "pos": { - "x": 257, - "y": 12 + "x": 452, + "y": 62 }, "width": 146, "height": 66, @@ -476,7 +640,7 @@ "type": "rectangle", "pos": { "x": 12, - "y": 12 + "y": 62 }, "width": 81, "height": 66, @@ -513,12 +677,94 @@ "level": 1 }, { - "id": "vehicles", + "id": "layers", "type": "rectangle", "pos": { "x": 113, "y": 12 }, + "width": 194, + "height": 166, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B4", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "layers", + "fontSize": 28, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 67, + "labelHeight": 36, + "labelPosition": "INSIDE_TOP_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "layers.garage", + "type": "rectangle", + "pos": { + "x": 163, + "y": 62 + }, + "width": 94, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B5", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "garage", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 49, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 2 + }, + { + "id": "vehicles", + "type": "rectangle", + "pos": { + "x": 327, + "y": 62 + }, "width": 103, "height": 66, "opacity": 1, @@ -651,7 +897,7 @@ "type": "rectangle", "pos": { "x": 12, - "y": 12 + "y": 162 }, "width": 341, "height": 166, @@ -692,7 +938,7 @@ "type": "rectangle", "pos": { "x": 62, - "y": 62 + "y": 212 }, "width": 110, "height": 66, @@ -728,12 +974,217 @@ "zIndex": 0, "level": 2 }, + { + "id": "layers", + "type": "rectangle", + "pos": { + "x": 373, + "y": 12 + }, + "width": 559, + "height": 466, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B4", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "layers", + "fontSize": 28, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 67, + "labelHeight": 36, + "labelPosition": "INSIDE_TOP_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "layers.repair", + "type": "rectangle", + "pos": { + "x": 423, + "y": 62 + }, + "width": 459, + "height": 366, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B5", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "repair", + "fontSize": 24, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 60, + "labelHeight": 31, + "labelPosition": "INSIDE_TOP_CENTER", + "zIndex": 0, + "level": 2 + }, + { + "id": "layers.repair.steps", + "type": "rectangle", + "pos": { + "x": 473, + "y": 112 + }, + "width": 359, + "height": 266, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B6", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "steps", + "fontSize": 20, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 45, + "labelHeight": 26, + "labelPosition": "INSIDE_TOP_CENTER", + "zIndex": 0, + "level": 3 + }, + { + "id": "layers.repair.steps.1", + "type": "rectangle", + "pos": { + "x": 523, + "y": 162 + }, + "width": 259, + "height": 166, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "N7", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "1", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 7, + "labelHeight": 21, + "labelPosition": "INSIDE_TOP_CENTER", + "zIndex": 0, + "level": 4 + }, + { + "id": "layers.repair.steps.1.find contractors", + "type": "rectangle", + "pos": { + "x": 573, + "y": 212 + }, + "width": 159, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "N7", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "find contractors", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 114, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 5 + }, { "id": "find contractors.facebook", "type": "rectangle", "pos": { "x": 192, - "y": 62 + "y": 212 }, "width": 111, "height": 66, @@ -821,7 +1272,7 @@ "type": "rectangle", "pos": { "x": 12, - "y": 12 + "y": 312 }, "width": 159, "height": 66, @@ -857,12 +1308,176 @@ "zIndex": 0, "level": 1 }, + { + "id": "layers", + "type": "rectangle", + "pos": { + "x": 191, + "y": 12 + }, + "width": 353, + "height": 366, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B4", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "layers", + "fontSize": 28, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 67, + "labelHeight": 36, + "labelPosition": "INSIDE_TOP_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "layers.repair", + "type": "rectangle", + "pos": { + "x": 241, + "y": 62 + }, + "width": 253, + "height": 266, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B5", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "repair", + "fontSize": 24, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 60, + "labelHeight": 31, + "labelPosition": "INSIDE_TOP_CENTER", + "zIndex": 0, + "level": 2 + }, + { + "id": "layers.repair.steps", + "type": "rectangle", + "pos": { + "x": 291, + "y": 112 + }, + "width": 153, + "height": 166, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B6", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "steps", + "fontSize": 20, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 45, + "labelHeight": 26, + "labelPosition": "INSIDE_TOP_CENTER", + "zIndex": 0, + "level": 3 + }, + { + "id": "layers.repair.steps.2", + "type": "rectangle", + "pos": { + "x": 341, + "y": 162 + }, + "width": 53, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "N7", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "2", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 8, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 4 + }, { "id": "solicit quotes", "type": "rectangle", "pos": { "x": 21, - "y": 148 + "y": 448 }, "width": 140, "height": 66, @@ -927,11 +1542,11 @@ "route": [ { "x": 91.5, - "y": 78 + "y": 378 }, { "x": 91.5, - "y": 148 + "y": 448 } ], "animated": false, @@ -990,7 +1605,7 @@ "type": "rectangle", "pos": { "x": 12, - "y": 12 + "y": 312 }, "width": 143, "height": 66, @@ -1026,12 +1641,176 @@ "zIndex": 0, "level": 1 }, + { + "id": "layers", + "type": "rectangle", + "pos": { + "x": 175, + "y": 12 + }, + "width": 353, + "height": 366, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B4", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "layers", + "fontSize": 28, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 67, + "labelHeight": 36, + "labelPosition": "INSIDE_TOP_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "layers.repair", + "type": "rectangle", + "pos": { + "x": 225, + "y": 62 + }, + "width": 253, + "height": 266, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B5", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "repair", + "fontSize": 24, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 60, + "labelHeight": 31, + "labelPosition": "INSIDE_TOP_CENTER", + "zIndex": 0, + "level": 2 + }, + { + "id": "layers.repair.steps", + "type": "rectangle", + "pos": { + "x": 275, + "y": 112 + }, + "width": 153, + "height": 166, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B6", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "steps", + "fontSize": 20, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 45, + "labelHeight": 26, + "labelPosition": "INSIDE_TOP_CENTER", + "zIndex": 0, + "level": 3 + }, + { + "id": "layers.repair.steps.3", + "type": "rectangle", + "pos": { + "x": 325, + "y": 162 + }, + "width": 53, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "N7", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "3", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 8, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 4 + }, { "id": "negotiate", "type": "rectangle", "pos": { "x": 27, - "y": 148 + "y": 448 }, "width": 112, "height": 66, @@ -1096,11 +1875,11 @@ "route": [ { "x": 83.5, - "y": 78 + "y": 378 }, { "x": 83.5, - "y": 148 + "y": 448 } ], "animated": false, @@ -1159,7 +1938,7 @@ "type": "rectangle", "pos": { "x": 39, - "y": 12 + "y": 312 }, "width": 112, "height": 66, @@ -1195,12 +1974,176 @@ "zIndex": 0, "level": 1 }, + { + "id": "layers", + "type": "rectangle", + "pos": { + "x": 171, + "y": 12 + }, + "width": 354, + "height": 366, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B4", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "layers", + "fontSize": 28, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 67, + "labelHeight": 36, + "labelPosition": "INSIDE_TOP_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "layers.repair", + "type": "rectangle", + "pos": { + "x": 221, + "y": 62 + }, + "width": 254, + "height": 266, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B5", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "repair", + "fontSize": 24, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 60, + "labelHeight": 31, + "labelPosition": "INSIDE_TOP_CENTER", + "zIndex": 0, + "level": 2 + }, + { + "id": "layers.repair.steps", + "type": "rectangle", + "pos": { + "x": 271, + "y": 112 + }, + "width": 154, + "height": 166, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B6", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "steps", + "fontSize": 20, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 45, + "labelHeight": 26, + "labelPosition": "INSIDE_TOP_CENTER", + "zIndex": 0, + "level": 3 + }, + { + "id": "layers.repair.steps.4", + "type": "rectangle", + "pos": { + "x": 321, + "y": 162 + }, + "width": 54, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "N7", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "4", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 9, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 4 + }, { "id": "book the best bid", "type": "rectangle", "pos": { "x": 12, - "y": 148 + "y": 448 }, "width": 167, "height": 66, @@ -1265,11 +2208,11 @@ "route": [ { "x": 95.5, - "y": 78 + "y": 378 }, { "x": 95.5, - "y": 148 + "y": 448 } ], "animated": false, @@ -1332,7 +2275,7 @@ "type": "rectangle", "pos": { "x": 12, - "y": 12 + "y": 62 }, "width": 103, "height": 66, @@ -1373,7 +2316,7 @@ "type": "rectangle", "pos": { "x": 135, - "y": 12 + "y": 62 }, "width": 75, "height": 66, @@ -1414,7 +2357,7 @@ "type": "rectangle", "pos": { "x": 230, - "y": 12 + "y": 62 }, "width": 94, "height": 66, @@ -1455,7 +2398,7 @@ "type": "rectangle", "pos": { "x": 344, - "y": 12 + "y": 62 }, "width": 88, "height": 66, @@ -1492,12 +2435,94 @@ "level": 1 }, { - "id": "rain", + "id": "scenarios", "type": "rectangle", "pos": { "x": 452, "y": 12 }, + "width": 187, + "height": 166, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B4", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "scenarios", + "fontSize": 28, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 111, + "labelHeight": 36, + "labelPosition": "INSIDE_TOP_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "scenarios.storm", + "type": "rectangle", + "pos": { + "x": 502, + "y": 62 + }, + "width": 87, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B5", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "storm", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 42, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 2 + }, + { + "id": "rain", + "type": "rectangle", + "pos": { + "x": 659, + "y": 62 + }, "width": 73, "height": 66, "opacity": 1, @@ -1536,8 +2561,8 @@ "id": "thunder", "type": "rectangle", "pos": { - "x": 545, - "y": 12 + "x": 752, + "y": 62 }, "width": 103, "height": 66, From 903bf7e20603c0ac1187e907d4c9528947d45882 Mon Sep 17 00:00:00 2001 From: Anmol Sethi Date: Mon, 27 Feb 2023 11:43:05 -0800 Subject: [PATCH 5/6] Ignore BoardKeywords in d2graph and change d2ir.IDA to return from nearest board --- d2graph/d2graph.go | 10 + d2ir/d2ir.go | 3 +- .../d2sketch/testdata/animated/sketch.exp.svg | 2 +- .../testdata/animated_dark/sketch.exp.svg | 2 +- .../complex-layers/dagre/board.exp.json | 1213 +---------------- .../stable/complex-layers/elk/board.exp.json | 1085 +-------------- .../TestCompile2/boards/recursive.exp.json | 300 ---- .../TestCompile2/boards/root.exp.json | 100 -- 8 files changed, 102 insertions(+), 2613 deletions(-) diff --git a/d2graph/d2graph.go b/d2graph/d2graph.go index a19487ee2..cf98b5c79 100644 --- a/d2graph/d2graph.go +++ b/d2graph/d2graph.go @@ -575,6 +575,16 @@ func (obj *Object) EnsureChildIDVal(ids []string) *Object { id := ids[0] ids = ids[1:] + // Any IDA with layers.layer or whatever is an IR IDA. + // Such IDA's are resolved from our board root. + // See https://github.com/terrastruct/d2/pull/876 + if _, ok := BoardKeywords[id]; ok { + if len(ids) == 0 { + return nil + } + return obj.EnsureChildIDVal(ids[1:]) + } + var child *Object for _, ch2 := range obj.ChildrenArray { if ch2.IDVal == id { diff --git a/d2ir/d2ir.go b/d2ir/d2ir.go index 9f37917e3..b105e4e72 100644 --- a/d2ir/d2ir.go +++ b/d2ir/d2ir.go @@ -1027,11 +1027,12 @@ func parentPrimaryKey(n Node) *d2ast.Key { return nil } +// IDA returns the absolute path to n from the nearest board root. func IDA(n Node) (ida []string) { for { f, ok := n.(*Field) if ok { - if f.Root() { + if f.Root() || NodeBoardKind(f) != "" { reverseIDA(ida) return ida } diff --git a/d2renderers/d2sketch/testdata/animated/sketch.exp.svg b/d2renderers/d2sketch/testdata/animated/sketch.exp.svg index b5c982c3f..4f34dadef 100644 --- a/d2renderers/d2sketch/testdata/animated/sketch.exp.svg +++ b/d2renderers/d2sketch/testdata/animated/sketch.exp.svg @@ -30,7 +30,7 @@ mix-blend-mode: multiply; opacity: 0.5; } -.fill-N1{fill:#0A0F25;}.fill-N2{fill:#676C7E;}.fill-N3{fill:#9499AB;}.fill-N4{fill:#CFD2DD;}.fill-N5{fill:#DEE1EB;}.fill-N6{fill:#EEF1F8;}.fill-N7{fill:#FFFFFF;}.fill-B1{fill:#0D32B2;}.fill-B2{fill:#0D32B2;}.fill-B3{fill:#E3E9FD;}.fill-B4{fill:#E3E9FD;}.fill-B5{fill:#EDF0FD;}.fill-B6{fill:#F7F8FE;}.fill-AA2{fill:#4A6FF3;}.fill-AA4{fill:#EDF0FD;}.fill-AA5{fill:#F7F8FE;}.fill-AB4{fill:#EDF0FD;}.fill-AB5{fill:#F7F8FE;}.stroke-N1{stroke:#0A0F25;}.stroke-N2{stroke:#676C7E;}.stroke-N3{stroke:#9499AB;}.stroke-N4{stroke:#CFD2DD;}.stroke-N5{stroke:#DEE1EB;}.stroke-N6{stroke:#EEF1F8;}.stroke-N7{stroke:#FFFFFF;}.stroke-B1{stroke:#0D32B2;}.stroke-B2{stroke:#0D32B2;}.stroke-B3{stroke:#E3E9FD;}.stroke-B4{stroke:#E3E9FD;}.stroke-B5{stroke:#EDF0FD;}.stroke-B6{stroke:#F7F8FE;}.stroke-AA2{stroke:#4A6FF3;}.stroke-AA4{stroke:#EDF0FD;}.stroke-AA5{stroke:#F7F8FE;}.stroke-AB4{stroke:#EDF0FD;}.stroke-AB5{stroke:#F7F8FE;}.background-color-N1{background-color:#0A0F25;}.background-color-N2{background-color:#676C7E;}.background-color-N3{background-color:#9499AB;}.background-color-N4{background-color:#CFD2DD;}.background-color-N5{background-color:#DEE1EB;}.background-color-N6{background-color:#EEF1F8;}.background-color-N7{background-color:#FFFFFF;}.background-color-B1{background-color:#0D32B2;}.background-color-B2{background-color:#0D32B2;}.background-color-B3{background-color:#E3E9FD;}.background-color-B4{background-color:#E3E9FD;}.background-color-B5{background-color:#EDF0FD;}.background-color-B6{background-color:#F7F8FE;}.background-color-AA2{background-color:#4A6FF3;}.background-color-AA4{background-color:#EDF0FD;}.background-color-AA5{background-color:#F7F8FE;}.background-color-AB4{background-color:#EDF0FD;}.background-color-AB5{background-color:#F7F8FE;}.color-N1{color:#0A0F25;}.color-N2{color:#676C7E;}.color-N3{color:#9499AB;}.color-N4{color:#CFD2DD;}.color-N5{color:#DEE1EB;}.color-N6{color:#EEF1F8;}.color-N7{color:#FFFFFF;}.color-B1{color:#0D32B2;}.color-B2{color:#0D32B2;}.color-B3{color:#E3E9FD;}.color-B4{color:#E3E9FD;}.color-B5{color:#EDF0FD;}.color-B6{color:#F7F8FE;}.color-AA2{color:#4A6FF3;}.color-AA4{color:#EDF0FD;}.color-AA5{color:#F7F8FE;}.color-AB4{color:#EDF0FD;}.color-AB5{color:#F7F8FE;}.appendix text.text{fill:#0A0F25}.md{--color-fg-default:#0A0F25;--color-fg-muted:#676C7E;--color-fg-subtle:#9499AB;--color-canvas-default:#FFFFFF;--color-canvas-subtle:#EEF1F8;--color-border-default:#0D32B2;--color-border-muted:#0D32B2;--color-neutral-muted:#EEF1F8;--color-accent-fg:#0D32B2;--color-accent-emphasis:#0D32B2;--color-attention-subtle:#676C7E;--color-danger-fg:red;}.sketch-overlay-B1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B2{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B3{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-AA4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-N2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-N3{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N4{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N7{fill:url(#streaks-bright);mix-blend-mode:darken}]]>wintersummertreessnowsun +.fill-N1{fill:#0A0F25;}.fill-N2{fill:#676C7E;}.fill-N3{fill:#9499AB;}.fill-N4{fill:#CFD2DD;}.fill-N5{fill:#DEE1EB;}.fill-N6{fill:#EEF1F8;}.fill-N7{fill:#FFFFFF;}.fill-B1{fill:#0D32B2;}.fill-B2{fill:#0D32B2;}.fill-B3{fill:#E3E9FD;}.fill-B4{fill:#E3E9FD;}.fill-B5{fill:#EDF0FD;}.fill-B6{fill:#F7F8FE;}.fill-AA2{fill:#4A6FF3;}.fill-AA4{fill:#EDF0FD;}.fill-AA5{fill:#F7F8FE;}.fill-AB4{fill:#EDF0FD;}.fill-AB5{fill:#F7F8FE;}.stroke-N1{stroke:#0A0F25;}.stroke-N2{stroke:#676C7E;}.stroke-N3{stroke:#9499AB;}.stroke-N4{stroke:#CFD2DD;}.stroke-N5{stroke:#DEE1EB;}.stroke-N6{stroke:#EEF1F8;}.stroke-N7{stroke:#FFFFFF;}.stroke-B1{stroke:#0D32B2;}.stroke-B2{stroke:#0D32B2;}.stroke-B3{stroke:#E3E9FD;}.stroke-B4{stroke:#E3E9FD;}.stroke-B5{stroke:#EDF0FD;}.stroke-B6{stroke:#F7F8FE;}.stroke-AA2{stroke:#4A6FF3;}.stroke-AA4{stroke:#EDF0FD;}.stroke-AA5{stroke:#F7F8FE;}.stroke-AB4{stroke:#EDF0FD;}.stroke-AB5{stroke:#F7F8FE;}.background-color-N1{background-color:#0A0F25;}.background-color-N2{background-color:#676C7E;}.background-color-N3{background-color:#9499AB;}.background-color-N4{background-color:#CFD2DD;}.background-color-N5{background-color:#DEE1EB;}.background-color-N6{background-color:#EEF1F8;}.background-color-N7{background-color:#FFFFFF;}.background-color-B1{background-color:#0D32B2;}.background-color-B2{background-color:#0D32B2;}.background-color-B3{background-color:#E3E9FD;}.background-color-B4{background-color:#E3E9FD;}.background-color-B5{background-color:#EDF0FD;}.background-color-B6{background-color:#F7F8FE;}.background-color-AA2{background-color:#4A6FF3;}.background-color-AA4{background-color:#EDF0FD;}.background-color-AA5{background-color:#F7F8FE;}.background-color-AB4{background-color:#EDF0FD;}.background-color-AB5{background-color:#F7F8FE;}.color-N1{color:#0A0F25;}.color-N2{color:#676C7E;}.color-N3{color:#9499AB;}.color-N4{color:#CFD2DD;}.color-N5{color:#DEE1EB;}.color-N6{color:#EEF1F8;}.color-N7{color:#FFFFFF;}.color-B1{color:#0D32B2;}.color-B2{color:#0D32B2;}.color-B3{color:#E3E9FD;}.color-B4{color:#E3E9FD;}.color-B5{color:#EDF0FD;}.color-B6{color:#F7F8FE;}.color-AA2{color:#4A6FF3;}.color-AA4{color:#EDF0FD;}.color-AA5{color:#F7F8FE;}.color-AB4{color:#EDF0FD;}.color-AB5{color:#F7F8FE;}.appendix text.text{fill:#0A0F25}.md{--color-fg-default:#0A0F25;--color-fg-muted:#676C7E;--color-fg-subtle:#9499AB;--color-canvas-default:#FFFFFF;--color-canvas-subtle:#EEF1F8;--color-border-default:#0D32B2;--color-border-muted:#0D32B2;--color-neutral-muted:#EEF1F8;--color-accent-fg:#0D32B2;--color-accent-emphasis:#0D32B2;--color-attention-subtle:#676C7E;--color-danger-fg:red;}.sketch-overlay-B1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B2{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B3{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-AA4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-N2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-N3{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N4{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N7{fill:url(#streaks-bright);mix-blend-mode:darken}]]>wintersummertreessnowsun \ No newline at end of file diff --git a/d2renderers/d2sketch/testdata/animated_dark/sketch.exp.svg b/d2renderers/d2sketch/testdata/animated_dark/sketch.exp.svg index d5dbfaf35..87ddf699b 100644 --- a/d2renderers/d2sketch/testdata/animated_dark/sketch.exp.svg +++ b/d2renderers/d2sketch/testdata/animated_dark/sketch.exp.svg @@ -30,7 +30,7 @@ mix-blend-mode: multiply; opacity: 0.5; } -.fill-N1{fill:#CDD6F4;}.fill-N2{fill:#BAC2DE;}.fill-N3{fill:#A6ADC8;}.fill-N4{fill:#585B70;}.fill-N5{fill:#45475A;}.fill-N6{fill:#313244;}.fill-N7{fill:#1E1E2E;}.fill-B1{fill:#CBA6f7;}.fill-B2{fill:#CBA6f7;}.fill-B3{fill:#6C7086;}.fill-B4{fill:#585B70;}.fill-B5{fill:#45475A;}.fill-B6{fill:#313244;}.fill-AA2{fill:#f38BA8;}.fill-AA4{fill:#45475A;}.fill-AA5{fill:#313244;}.fill-AB4{fill:#45475A;}.fill-AB5{fill:#313244;}.stroke-N1{stroke:#CDD6F4;}.stroke-N2{stroke:#BAC2DE;}.stroke-N3{stroke:#A6ADC8;}.stroke-N4{stroke:#585B70;}.stroke-N5{stroke:#45475A;}.stroke-N6{stroke:#313244;}.stroke-N7{stroke:#1E1E2E;}.stroke-B1{stroke:#CBA6f7;}.stroke-B2{stroke:#CBA6f7;}.stroke-B3{stroke:#6C7086;}.stroke-B4{stroke:#585B70;}.stroke-B5{stroke:#45475A;}.stroke-B6{stroke:#313244;}.stroke-AA2{stroke:#f38BA8;}.stroke-AA4{stroke:#45475A;}.stroke-AA5{stroke:#313244;}.stroke-AB4{stroke:#45475A;}.stroke-AB5{stroke:#313244;}.background-color-N1{background-color:#CDD6F4;}.background-color-N2{background-color:#BAC2DE;}.background-color-N3{background-color:#A6ADC8;}.background-color-N4{background-color:#585B70;}.background-color-N5{background-color:#45475A;}.background-color-N6{background-color:#313244;}.background-color-N7{background-color:#1E1E2E;}.background-color-B1{background-color:#CBA6f7;}.background-color-B2{background-color:#CBA6f7;}.background-color-B3{background-color:#6C7086;}.background-color-B4{background-color:#585B70;}.background-color-B5{background-color:#45475A;}.background-color-B6{background-color:#313244;}.background-color-AA2{background-color:#f38BA8;}.background-color-AA4{background-color:#45475A;}.background-color-AA5{background-color:#313244;}.background-color-AB4{background-color:#45475A;}.background-color-AB5{background-color:#313244;}.color-N1{color:#CDD6F4;}.color-N2{color:#BAC2DE;}.color-N3{color:#A6ADC8;}.color-N4{color:#585B70;}.color-N5{color:#45475A;}.color-N6{color:#313244;}.color-N7{color:#1E1E2E;}.color-B1{color:#CBA6f7;}.color-B2{color:#CBA6f7;}.color-B3{color:#6C7086;}.color-B4{color:#585B70;}.color-B5{color:#45475A;}.color-B6{color:#313244;}.color-AA2{color:#f38BA8;}.color-AA4{color:#45475A;}.color-AA5{color:#313244;}.color-AB4{color:#45475A;}.color-AB5{color:#313244;}.appendix text.text{fill:#CDD6F4}.md{--color-fg-default:#CDD6F4;--color-fg-muted:#BAC2DE;--color-fg-subtle:#A6ADC8;--color-canvas-default:#1E1E2E;--color-canvas-subtle:#313244;--color-border-default:#CBA6f7;--color-border-muted:#CBA6f7;--color-neutral-muted:#313244;--color-accent-fg:#CBA6f7;--color-accent-emphasis:#CBA6f7;--color-attention-subtle:#BAC2DE;--color-danger-fg:red;}.sketch-overlay-B1{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-B2{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-B3{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-B4{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-B5{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B6{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-AA2{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-AA4{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-AA5{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-AB4{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-AB5{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-N1{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N2{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N3{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N4{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-N5{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-N6{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-N7{fill:url(#streaks-darker);mix-blend-mode:lighten}]]>wintersummertreessnowsun +.fill-N1{fill:#CDD6F4;}.fill-N2{fill:#BAC2DE;}.fill-N3{fill:#A6ADC8;}.fill-N4{fill:#585B70;}.fill-N5{fill:#45475A;}.fill-N6{fill:#313244;}.fill-N7{fill:#1E1E2E;}.fill-B1{fill:#CBA6f7;}.fill-B2{fill:#CBA6f7;}.fill-B3{fill:#6C7086;}.fill-B4{fill:#585B70;}.fill-B5{fill:#45475A;}.fill-B6{fill:#313244;}.fill-AA2{fill:#f38BA8;}.fill-AA4{fill:#45475A;}.fill-AA5{fill:#313244;}.fill-AB4{fill:#45475A;}.fill-AB5{fill:#313244;}.stroke-N1{stroke:#CDD6F4;}.stroke-N2{stroke:#BAC2DE;}.stroke-N3{stroke:#A6ADC8;}.stroke-N4{stroke:#585B70;}.stroke-N5{stroke:#45475A;}.stroke-N6{stroke:#313244;}.stroke-N7{stroke:#1E1E2E;}.stroke-B1{stroke:#CBA6f7;}.stroke-B2{stroke:#CBA6f7;}.stroke-B3{stroke:#6C7086;}.stroke-B4{stroke:#585B70;}.stroke-B5{stroke:#45475A;}.stroke-B6{stroke:#313244;}.stroke-AA2{stroke:#f38BA8;}.stroke-AA4{stroke:#45475A;}.stroke-AA5{stroke:#313244;}.stroke-AB4{stroke:#45475A;}.stroke-AB5{stroke:#313244;}.background-color-N1{background-color:#CDD6F4;}.background-color-N2{background-color:#BAC2DE;}.background-color-N3{background-color:#A6ADC8;}.background-color-N4{background-color:#585B70;}.background-color-N5{background-color:#45475A;}.background-color-N6{background-color:#313244;}.background-color-N7{background-color:#1E1E2E;}.background-color-B1{background-color:#CBA6f7;}.background-color-B2{background-color:#CBA6f7;}.background-color-B3{background-color:#6C7086;}.background-color-B4{background-color:#585B70;}.background-color-B5{background-color:#45475A;}.background-color-B6{background-color:#313244;}.background-color-AA2{background-color:#f38BA8;}.background-color-AA4{background-color:#45475A;}.background-color-AA5{background-color:#313244;}.background-color-AB4{background-color:#45475A;}.background-color-AB5{background-color:#313244;}.color-N1{color:#CDD6F4;}.color-N2{color:#BAC2DE;}.color-N3{color:#A6ADC8;}.color-N4{color:#585B70;}.color-N5{color:#45475A;}.color-N6{color:#313244;}.color-N7{color:#1E1E2E;}.color-B1{color:#CBA6f7;}.color-B2{color:#CBA6f7;}.color-B3{color:#6C7086;}.color-B4{color:#585B70;}.color-B5{color:#45475A;}.color-B6{color:#313244;}.color-AA2{color:#f38BA8;}.color-AA4{color:#45475A;}.color-AA5{color:#313244;}.color-AB4{color:#45475A;}.color-AB5{color:#313244;}.appendix text.text{fill:#CDD6F4}.md{--color-fg-default:#CDD6F4;--color-fg-muted:#BAC2DE;--color-fg-subtle:#A6ADC8;--color-canvas-default:#1E1E2E;--color-canvas-subtle:#313244;--color-border-default:#CBA6f7;--color-border-muted:#CBA6f7;--color-neutral-muted:#313244;--color-accent-fg:#CBA6f7;--color-accent-emphasis:#CBA6f7;--color-attention-subtle:#BAC2DE;--color-danger-fg:red;}.sketch-overlay-B1{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-B2{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-B3{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-B4{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-B5{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B6{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-AA2{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-AA4{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-AA5{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-AB4{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-AB5{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-N1{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N2{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N3{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N4{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-N5{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-N6{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-N7{fill:url(#streaks-darker);mix-blend-mode:lighten}]]>wintersummertreessnowsun \ No newline at end of file diff --git a/e2etests/testdata/stable/complex-layers/dagre/board.exp.json b/e2etests/testdata/stable/complex-layers/dagre/board.exp.json index 6d4672a8b..fd8602b3c 100644 --- a/e2etests/testdata/stable/complex-layers/dagre/board.exp.json +++ b/e2etests/testdata/stable/complex-layers/dagre/board.exp.json @@ -177,7 +177,7 @@ "type": "rectangle", "pos": { "x": 0, - "y": 50 + "y": 0 }, "width": 88, "height": 66, @@ -213,94 +213,12 @@ "zIndex": 0, "level": 1 }, - { - "id": "layers", - "type": "rectangle", - "pos": { - "x": 128, - "y": 41 - }, - "width": 183, - "height": 125, - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "borderRadius": 0, - "fill": "B4", - "stroke": "B1", - "shadow": false, - "3d": false, - "multiple": false, - "double-border": false, - "tooltip": "", - "link": "", - "icon": null, - "iconPosition": "", - "blend": false, - "fields": null, - "methods": null, - "columns": null, - "label": "layers", - "fontSize": 28, - "fontFamily": "DEFAULT", - "language": "", - "color": "N1", - "italic": false, - "bold": false, - "underline": false, - "labelWidth": 67, - "labelHeight": 36, - "labelPosition": "OUTSIDE_TOP_CENTER", - "zIndex": 0, - "level": 1 - }, - { - "id": "layers.window", - "type": "rectangle", - "pos": { - "x": 168, - "y": 70 - }, - "width": 103, - "height": 66, - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "borderRadius": 0, - "fill": "B5", - "stroke": "B1", - "shadow": false, - "3d": false, - "multiple": false, - "double-border": false, - "tooltip": "", - "link": "", - "icon": null, - "iconPosition": "", - "blend": false, - "fields": null, - "methods": null, - "columns": null, - "label": "window", - "fontSize": 16, - "fontFamily": "DEFAULT", - "language": "", - "color": "N1", - "italic": false, - "bold": true, - "underline": false, - "labelWidth": 58, - "labelHeight": 21, - "labelPosition": "INSIDE_MIDDLE_CENTER", - "zIndex": 0, - "level": 2 - }, { "id": "glass", "type": "rectangle", "pos": { - "x": 351, - "y": 50 + "x": 148, + "y": 0 }, "width": 81, "height": 66, @@ -388,7 +306,7 @@ "type": "rectangle", "pos": { "x": 0, - "y": 50 + "y": 0 }, "width": 104, "height": 66, @@ -424,94 +342,12 @@ "zIndex": 0, "level": 1 }, - { - "id": "layers", - "type": "rectangle", - "pos": { - "x": 144, - "y": 41 - }, - "width": 155, - "height": 125, - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "borderRadius": 0, - "fill": "B4", - "stroke": "B1", - "shadow": false, - "3d": false, - "multiple": false, - "double-border": false, - "tooltip": "", - "link": "", - "icon": null, - "iconPosition": "", - "blend": false, - "fields": null, - "methods": null, - "columns": null, - "label": "layers", - "fontSize": 28, - "fontFamily": "DEFAULT", - "language": "", - "color": "N1", - "italic": false, - "bold": false, - "underline": false, - "labelWidth": 67, - "labelHeight": 36, - "labelPosition": "OUTSIDE_TOP_CENTER", - "zIndex": 0, - "level": 1 - }, - { - "id": "layers.roof", - "type": "rectangle", - "pos": { - "x": 184, - "y": 70 - }, - "width": 75, - "height": 66, - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "borderRadius": 0, - "fill": "B5", - "stroke": "B1", - "shadow": false, - "3d": false, - "multiple": false, - "double-border": false, - "tooltip": "", - "link": "", - "icon": null, - "iconPosition": "", - "blend": false, - "fields": null, - "methods": null, - "columns": null, - "label": "roof", - "fontSize": 16, - "fontFamily": "DEFAULT", - "language": "", - "color": "N1", - "italic": false, - "bold": true, - "underline": false, - "labelWidth": 30, - "labelHeight": 21, - "labelPosition": "INSIDE_MIDDLE_CENTER", - "zIndex": 0, - "level": 2 - }, { "id": "starlink", "type": "rectangle", "pos": { - "x": 339, - "y": 50 + "x": 164, + "y": 0 }, "width": 101, "height": 66, @@ -551,8 +387,8 @@ "id": "utility hookup", "type": "rectangle", "pos": { - "x": 500, - "y": 50 + "x": 325, + "y": 0 }, "width": 146, "height": 66, @@ -640,7 +476,7 @@ "type": "rectangle", "pos": { "x": 0, - "y": 50 + "y": 0 }, "width": 81, "height": 66, @@ -676,94 +512,12 @@ "zIndex": 0, "level": 1 }, - { - "id": "layers", - "type": "rectangle", - "pos": { - "x": 121, - "y": 41 - }, - "width": 174, - "height": 125, - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "borderRadius": 0, - "fill": "B4", - "stroke": "B1", - "shadow": false, - "3d": false, - "multiple": false, - "double-border": false, - "tooltip": "", - "link": "", - "icon": null, - "iconPosition": "", - "blend": false, - "fields": null, - "methods": null, - "columns": null, - "label": "layers", - "fontSize": 28, - "fontFamily": "DEFAULT", - "language": "", - "color": "N1", - "italic": false, - "bold": false, - "underline": false, - "labelWidth": 67, - "labelHeight": 36, - "labelPosition": "OUTSIDE_TOP_CENTER", - "zIndex": 0, - "level": 1 - }, - { - "id": "layers.garage", - "type": "rectangle", - "pos": { - "x": 161, - "y": 70 - }, - "width": 94, - "height": 66, - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "borderRadius": 0, - "fill": "B5", - "stroke": "B1", - "shadow": false, - "3d": false, - "multiple": false, - "double-border": false, - "tooltip": "", - "link": "", - "icon": null, - "iconPosition": "", - "blend": false, - "fields": null, - "methods": null, - "columns": null, - "label": "garage", - "fontSize": 16, - "fontFamily": "DEFAULT", - "language": "", - "color": "N1", - "italic": false, - "bold": true, - "underline": false, - "labelWidth": 49, - "labelHeight": 21, - "labelPosition": "INSIDE_MIDDLE_CENTER", - "zIndex": 0, - "level": 2 - }, { "id": "vehicles", "type": "rectangle", "pos": { - "x": 335, - "y": 50 + "x": 141, + "y": 0 }, "width": 103, "height": 66, @@ -900,7 +654,7 @@ "y": 41 }, "width": 361, - "height": 425, + "height": 125, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, @@ -938,7 +692,7 @@ "type": "rectangle", "pos": { "x": 40, - "y": 220 + "y": 70 }, "width": 110, "height": 66, @@ -974,217 +728,12 @@ "zIndex": 0, "level": 2 }, - { - "id": "layers", - "type": "rectangle", - "pos": { - "x": 381, - "y": 41 - }, - "width": 359, - "height": 425, - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "borderRadius": 0, - "fill": "B4", - "stroke": "B1", - "shadow": false, - "3d": false, - "multiple": false, - "double-border": false, - "tooltip": "", - "link": "", - "icon": null, - "iconPosition": "", - "blend": false, - "fields": null, - "methods": null, - "columns": null, - "label": "layers", - "fontSize": 28, - "fontFamily": "DEFAULT", - "language": "", - "color": "N1", - "italic": false, - "bold": false, - "underline": false, - "labelWidth": 67, - "labelHeight": 36, - "labelPosition": "OUTSIDE_TOP_CENTER", - "zIndex": 0, - "level": 1 - }, - { - "id": "layers.repair", - "type": "rectangle", - "pos": { - "x": 401, - "y": 106 - }, - "width": 319, - "height": 330, - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "borderRadius": 0, - "fill": "B5", - "stroke": "B1", - "shadow": false, - "3d": false, - "multiple": false, - "double-border": false, - "tooltip": "", - "link": "", - "icon": null, - "iconPosition": "", - "blend": false, - "fields": null, - "methods": null, - "columns": null, - "label": "repair", - "fontSize": 24, - "fontFamily": "DEFAULT", - "language": "", - "color": "N1", - "italic": false, - "bold": false, - "underline": false, - "labelWidth": 60, - "labelHeight": 31, - "labelPosition": "OUTSIDE_TOP_CENTER", - "zIndex": 0, - "level": 2 - }, - { - "id": "layers.repair.steps", - "type": "rectangle", - "pos": { - "x": 421, - "y": 169 - }, - "width": 279, - "height": 235, - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "borderRadius": 0, - "fill": "B6", - "stroke": "B1", - "shadow": false, - "3d": false, - "multiple": false, - "double-border": false, - "tooltip": "", - "link": "", - "icon": null, - "iconPosition": "", - "blend": false, - "fields": null, - "methods": null, - "columns": null, - "label": "steps", - "fontSize": 20, - "fontFamily": "DEFAULT", - "language": "", - "color": "N1", - "italic": false, - "bold": false, - "underline": false, - "labelWidth": 45, - "labelHeight": 26, - "labelPosition": "OUTSIDE_TOP_CENTER", - "zIndex": 0, - "level": 3 - }, - { - "id": "layers.repair.steps.1", - "type": "rectangle", - "pos": { - "x": 441, - "y": 230 - }, - "width": 239, - "height": 140, - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "borderRadius": 0, - "fill": "N7", - "stroke": "B1", - "shadow": false, - "3d": false, - "multiple": false, - "double-border": false, - "tooltip": "", - "link": "", - "icon": null, - "iconPosition": "", - "blend": false, - "fields": null, - "methods": null, - "columns": null, - "label": "1", - "fontSize": 16, - "fontFamily": "DEFAULT", - "language": "", - "color": "N1", - "italic": false, - "bold": false, - "underline": false, - "labelWidth": 7, - "labelHeight": 21, - "labelPosition": "OUTSIDE_TOP_CENTER", - "zIndex": 0, - "level": 4 - }, - { - "id": "layers.repair.steps.1.find contractors", - "type": "rectangle", - "pos": { - "x": 481, - "y": 267 - }, - "width": 159, - "height": 66, - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "borderRadius": 0, - "fill": "N7", - "stroke": "B1", - "shadow": false, - "3d": false, - "multiple": false, - "double-border": false, - "tooltip": "", - "link": "", - "icon": null, - "iconPosition": "", - "blend": false, - "fields": null, - "methods": null, - "columns": null, - "label": "find contractors", - "fontSize": 16, - "fontFamily": "DEFAULT", - "language": "", - "color": "N1", - "italic": false, - "bold": true, - "underline": false, - "labelWidth": 114, - "labelHeight": 21, - "labelPosition": "INSIDE_MIDDLE_CENTER", - "zIndex": 0, - "level": 5 - }, { "id": "find contractors.facebook", "type": "rectangle", "pos": { "x": 210, - "y": 220 + "y": 70 }, "width": 111, "height": 66, @@ -1271,8 +820,8 @@ "id": "find contractors", "type": "rectangle", "pos": { - "x": 253, - "y": 150 + "x": 0, + "y": 0 }, "width": 159, "height": 66, @@ -1308,176 +857,12 @@ "zIndex": 0, "level": 1 }, - { - "id": "layers", - "type": "rectangle", - "pos": { - "x": 0, - "y": 41 - }, - "width": 213, - "height": 325, - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "borderRadius": 0, - "fill": "B4", - "stroke": "B1", - "shadow": false, - "3d": false, - "multiple": false, - "double-border": false, - "tooltip": "", - "link": "", - "icon": null, - "iconPosition": "", - "blend": false, - "fields": null, - "methods": null, - "columns": null, - "label": "layers", - "fontSize": 28, - "fontFamily": "DEFAULT", - "language": "", - "color": "N1", - "italic": false, - "bold": false, - "underline": false, - "labelWidth": 67, - "labelHeight": 36, - "labelPosition": "OUTSIDE_TOP_CENTER", - "zIndex": 0, - "level": 1 - }, - { - "id": "layers.repair", - "type": "rectangle", - "pos": { - "x": 20, - "y": 106 - }, - "width": 173, - "height": 230, - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "borderRadius": 0, - "fill": "B5", - "stroke": "B1", - "shadow": false, - "3d": false, - "multiple": false, - "double-border": false, - "tooltip": "", - "link": "", - "icon": null, - "iconPosition": "", - "blend": false, - "fields": null, - "methods": null, - "columns": null, - "label": "repair", - "fontSize": 24, - "fontFamily": "DEFAULT", - "language": "", - "color": "N1", - "italic": false, - "bold": false, - "underline": false, - "labelWidth": 60, - "labelHeight": 31, - "labelPosition": "OUTSIDE_TOP_CENTER", - "zIndex": 0, - "level": 2 - }, - { - "id": "layers.repair.steps", - "type": "rectangle", - "pos": { - "x": 40, - "y": 169 - }, - "width": 133, - "height": 135, - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "borderRadius": 0, - "fill": "B6", - "stroke": "B1", - "shadow": false, - "3d": false, - "multiple": false, - "double-border": false, - "tooltip": "", - "link": "", - "icon": null, - "iconPosition": "", - "blend": false, - "fields": null, - "methods": null, - "columns": null, - "label": "steps", - "fontSize": 20, - "fontFamily": "DEFAULT", - "language": "", - "color": "N1", - "italic": false, - "bold": false, - "underline": false, - "labelWidth": 45, - "labelHeight": 26, - "labelPosition": "OUTSIDE_TOP_CENTER", - "zIndex": 0, - "level": 3 - }, - { - "id": "layers.repair.steps.2", - "type": "rectangle", - "pos": { - "x": 80, - "y": 204 - }, - "width": 53, - "height": 66, - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "borderRadius": 0, - "fill": "N7", - "stroke": "B1", - "shadow": false, - "3d": false, - "multiple": false, - "double-border": false, - "tooltip": "", - "link": "", - "icon": null, - "iconPosition": "", - "blend": false, - "fields": null, - "methods": null, - "columns": null, - "label": "2", - "fontSize": 16, - "fontFamily": "DEFAULT", - "language": "", - "color": "N1", - "italic": false, - "bold": true, - "underline": false, - "labelWidth": 8, - "labelHeight": 21, - "labelPosition": "INSIDE_MIDDLE_CENTER", - "zIndex": 0, - "level": 4 - }, { "id": "solicit quotes", "type": "rectangle", "pos": { - "x": 263, - "y": 466 + "x": 10, + "y": 166 }, "width": 140, "height": 66, @@ -1541,44 +926,20 @@ "labelPercentage": 0, "route": [ { - "x": 332.5, - "y": 216 + "x": 79.5, + "y": 66 }, { - "x": 332.5, - "y": 256 + "x": 79.5, + "y": 106 }, { - "x": 332.5, - "y": 276 + "x": 79.5, + "y": 126 }, { - "x": 332.5, - "y": 291 - }, - { - "x": 332.5, - "y": 306 - }, - { - "x": 332.5, - "y": 326 - }, - { - "x": 332.5, - "y": 341 - }, - { - "x": 332.5, - "y": 356 - }, - { - "x": 332.5, - "y": 426 - }, - { - "x": 332.5, - "y": 466 + "x": 79.5, + "y": 166 } ], "isCurve": true, @@ -1637,8 +998,8 @@ "id": "obtain quotes", "type": "rectangle", "pos": { - "x": 253, - "y": 150 + "x": 0, + "y": 0 }, "width": 143, "height": 66, @@ -1674,176 +1035,12 @@ "zIndex": 0, "level": 1 }, - { - "id": "layers", - "type": "rectangle", - "pos": { - "x": 0, - "y": 41 - }, - "width": 213, - "height": 325, - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "borderRadius": 0, - "fill": "B4", - "stroke": "B1", - "shadow": false, - "3d": false, - "multiple": false, - "double-border": false, - "tooltip": "", - "link": "", - "icon": null, - "iconPosition": "", - "blend": false, - "fields": null, - "methods": null, - "columns": null, - "label": "layers", - "fontSize": 28, - "fontFamily": "DEFAULT", - "language": "", - "color": "N1", - "italic": false, - "bold": false, - "underline": false, - "labelWidth": 67, - "labelHeight": 36, - "labelPosition": "OUTSIDE_TOP_CENTER", - "zIndex": 0, - "level": 1 - }, - { - "id": "layers.repair", - "type": "rectangle", - "pos": { - "x": 20, - "y": 106 - }, - "width": 173, - "height": 230, - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "borderRadius": 0, - "fill": "B5", - "stroke": "B1", - "shadow": false, - "3d": false, - "multiple": false, - "double-border": false, - "tooltip": "", - "link": "", - "icon": null, - "iconPosition": "", - "blend": false, - "fields": null, - "methods": null, - "columns": null, - "label": "repair", - "fontSize": 24, - "fontFamily": "DEFAULT", - "language": "", - "color": "N1", - "italic": false, - "bold": false, - "underline": false, - "labelWidth": 60, - "labelHeight": 31, - "labelPosition": "OUTSIDE_TOP_CENTER", - "zIndex": 0, - "level": 2 - }, - { - "id": "layers.repair.steps", - "type": "rectangle", - "pos": { - "x": 40, - "y": 169 - }, - "width": 133, - "height": 135, - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "borderRadius": 0, - "fill": "B6", - "stroke": "B1", - "shadow": false, - "3d": false, - "multiple": false, - "double-border": false, - "tooltip": "", - "link": "", - "icon": null, - "iconPosition": "", - "blend": false, - "fields": null, - "methods": null, - "columns": null, - "label": "steps", - "fontSize": 20, - "fontFamily": "DEFAULT", - "language": "", - "color": "N1", - "italic": false, - "bold": false, - "underline": false, - "labelWidth": 45, - "labelHeight": 26, - "labelPosition": "OUTSIDE_TOP_CENTER", - "zIndex": 0, - "level": 3 - }, - { - "id": "layers.repair.steps.3", - "type": "rectangle", - "pos": { - "x": 80, - "y": 204 - }, - "width": 53, - "height": 66, - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "borderRadius": 0, - "fill": "N7", - "stroke": "B1", - "shadow": false, - "3d": false, - "multiple": false, - "double-border": false, - "tooltip": "", - "link": "", - "icon": null, - "iconPosition": "", - "blend": false, - "fields": null, - "methods": null, - "columns": null, - "label": "3", - "fontSize": 16, - "fontFamily": "DEFAULT", - "language": "", - "color": "N1", - "italic": false, - "bold": true, - "underline": false, - "labelWidth": 8, - "labelHeight": 21, - "labelPosition": "INSIDE_MIDDLE_CENTER", - "zIndex": 0, - "level": 4 - }, { "id": "negotiate", "type": "rectangle", "pos": { - "x": 269, - "y": 466 + "x": 16, + "y": 166 }, "width": 112, "height": 66, @@ -1907,44 +1104,20 @@ "labelPercentage": 0, "route": [ { - "x": 324.5, - "y": 216 + "x": 71.5, + "y": 66 }, { - "x": 324.5, - "y": 256 + "x": 71.5, + "y": 106 }, { - "x": 324.5, - "y": 276 + "x": 71.5, + "y": 126 }, { - "x": 324.5, - "y": 291 - }, - { - "x": 324.5, - "y": 306 - }, - { - "x": 324.5, - "y": 326 - }, - { - "x": 324.5, - "y": 341 - }, - { - "x": 324.5, - "y": 356 - }, - { - "x": 324.5, - "y": 426 - }, - { - "x": 324.5, - "y": 466 + "x": 71.5, + "y": 166 } ], "isCurve": true, @@ -2003,8 +1176,8 @@ "id": "negotiate", "type": "rectangle", "pos": { - "x": 254, - "y": 150 + "x": 28, + "y": 0 }, "width": 112, "height": 66, @@ -2040,176 +1213,12 @@ "zIndex": 0, "level": 1 }, - { - "id": "layers", - "type": "rectangle", - "pos": { - "x": 0, - "y": 41 - }, - "width": 214, - "height": 325, - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "borderRadius": 0, - "fill": "B4", - "stroke": "B1", - "shadow": false, - "3d": false, - "multiple": false, - "double-border": false, - "tooltip": "", - "link": "", - "icon": null, - "iconPosition": "", - "blend": false, - "fields": null, - "methods": null, - "columns": null, - "label": "layers", - "fontSize": 28, - "fontFamily": "DEFAULT", - "language": "", - "color": "N1", - "italic": false, - "bold": false, - "underline": false, - "labelWidth": 67, - "labelHeight": 36, - "labelPosition": "OUTSIDE_TOP_CENTER", - "zIndex": 0, - "level": 1 - }, - { - "id": "layers.repair", - "type": "rectangle", - "pos": { - "x": 20, - "y": 106 - }, - "width": 174, - "height": 230, - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "borderRadius": 0, - "fill": "B5", - "stroke": "B1", - "shadow": false, - "3d": false, - "multiple": false, - "double-border": false, - "tooltip": "", - "link": "", - "icon": null, - "iconPosition": "", - "blend": false, - "fields": null, - "methods": null, - "columns": null, - "label": "repair", - "fontSize": 24, - "fontFamily": "DEFAULT", - "language": "", - "color": "N1", - "italic": false, - "bold": false, - "underline": false, - "labelWidth": 60, - "labelHeight": 31, - "labelPosition": "OUTSIDE_TOP_CENTER", - "zIndex": 0, - "level": 2 - }, - { - "id": "layers.repair.steps", - "type": "rectangle", - "pos": { - "x": 40, - "y": 169 - }, - "width": 134, - "height": 135, - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "borderRadius": 0, - "fill": "B6", - "stroke": "B1", - "shadow": false, - "3d": false, - "multiple": false, - "double-border": false, - "tooltip": "", - "link": "", - "icon": null, - "iconPosition": "", - "blend": false, - "fields": null, - "methods": null, - "columns": null, - "label": "steps", - "fontSize": 20, - "fontFamily": "DEFAULT", - "language": "", - "color": "N1", - "italic": false, - "bold": false, - "underline": false, - "labelWidth": 45, - "labelHeight": 26, - "labelPosition": "OUTSIDE_TOP_CENTER", - "zIndex": 0, - "level": 3 - }, - { - "id": "layers.repair.steps.4", - "type": "rectangle", - "pos": { - "x": 80, - "y": 204 - }, - "width": 54, - "height": 66, - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "borderRadius": 0, - "fill": "N7", - "stroke": "B1", - "shadow": false, - "3d": false, - "multiple": false, - "double-border": false, - "tooltip": "", - "link": "", - "icon": null, - "iconPosition": "", - "blend": false, - "fields": null, - "methods": null, - "columns": null, - "label": "4", - "fontSize": 16, - "fontFamily": "DEFAULT", - "language": "", - "color": "N1", - "italic": false, - "bold": true, - "underline": false, - "labelWidth": 9, - "labelHeight": 21, - "labelPosition": "INSIDE_MIDDLE_CENTER", - "zIndex": 0, - "level": 4 - }, { "id": "book the best bid", "type": "rectangle", "pos": { - "x": 227, - "y": 466 + "x": 0, + "y": 166 }, "width": 167, "height": 66, @@ -2273,44 +1282,20 @@ "labelPercentage": 0, "route": [ { - "x": 310, - "y": 216 + "x": 83.5, + "y": 66 }, { - "x": 310, - "y": 256 + "x": 83.5, + "y": 106 }, { - "x": 310, - "y": 276 + "x": 83.5, + "y": 126 }, { - "x": 310, - "y": 291 - }, - { - "x": 310, - "y": 306 - }, - { - "x": 310, - "y": 326 - }, - { - "x": 310, - "y": 341 - }, - { - "x": 310, - "y": 356 - }, - { - "x": 310, - "y": 426 - }, - { - "x": 310, - "y": 466 + "x": 83.5, + "y": 166 } ], "isCurve": true, @@ -2374,7 +1359,7 @@ "type": "rectangle", "pos": { "x": 0, - "y": 50 + "y": 0 }, "width": 103, "height": 66, @@ -2415,7 +1400,7 @@ "type": "rectangle", "pos": { "x": 163, - "y": 50 + "y": 0 }, "width": 75, "height": 66, @@ -2456,7 +1441,7 @@ "type": "rectangle", "pos": { "x": 298, - "y": 50 + "y": 0 }, "width": 94, "height": 66, @@ -2497,7 +1482,7 @@ "type": "rectangle", "pos": { "x": 452, - "y": 50 + "y": 0 }, "width": 88, "height": 66, @@ -2533,94 +1518,12 @@ "zIndex": 0, "level": 1 }, - { - "id": "scenarios", - "type": "rectangle", - "pos": { - "x": 580, - "y": 41 - }, - "width": 167, - "height": 125, - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "borderRadius": 0, - "fill": "B4", - "stroke": "B1", - "shadow": false, - "3d": false, - "multiple": false, - "double-border": false, - "tooltip": "", - "link": "", - "icon": null, - "iconPosition": "", - "blend": false, - "fields": null, - "methods": null, - "columns": null, - "label": "scenarios", - "fontSize": 28, - "fontFamily": "DEFAULT", - "language": "", - "color": "N1", - "italic": false, - "bold": false, - "underline": false, - "labelWidth": 111, - "labelHeight": 36, - "labelPosition": "OUTSIDE_TOP_CENTER", - "zIndex": 0, - "level": 1 - }, - { - "id": "scenarios.storm", - "type": "rectangle", - "pos": { - "x": 620, - "y": 70 - }, - "width": 87, - "height": 66, - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "borderRadius": 0, - "fill": "B5", - "stroke": "B1", - "shadow": false, - "3d": false, - "multiple": false, - "double-border": false, - "tooltip": "", - "link": "", - "icon": null, - "iconPosition": "", - "blend": false, - "fields": null, - "methods": null, - "columns": null, - "label": "storm", - "fontSize": 16, - "fontFamily": "DEFAULT", - "language": "", - "color": "N1", - "italic": false, - "bold": true, - "underline": false, - "labelWidth": 42, - "labelHeight": 21, - "labelPosition": "INSIDE_MIDDLE_CENTER", - "zIndex": 0, - "level": 2 - }, { "id": "rain", "type": "rectangle", "pos": { - "x": 787, - "y": 50 + "x": 600, + "y": 0 }, "width": 73, "height": 66, @@ -2660,8 +1563,8 @@ "id": "thunder", "type": "rectangle", "pos": { - "x": 920, - "y": 50 + "x": 733, + "y": 0 }, "width": 103, "height": 66, diff --git a/e2etests/testdata/stable/complex-layers/elk/board.exp.json b/e2etests/testdata/stable/complex-layers/elk/board.exp.json index 16bc4c68d..148a3ee4d 100644 --- a/e2etests/testdata/stable/complex-layers/elk/board.exp.json +++ b/e2etests/testdata/stable/complex-layers/elk/board.exp.json @@ -177,7 +177,7 @@ "type": "rectangle", "pos": { "x": 12, - "y": 62 + "y": 12 }, "width": 88, "height": 66, @@ -214,94 +214,12 @@ "level": 1 }, { - "id": "layers", + "id": "glass", "type": "rectangle", "pos": { "x": 120, "y": 12 }, - "width": 203, - "height": 166, - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "borderRadius": 0, - "fill": "B4", - "stroke": "B1", - "shadow": false, - "3d": false, - "multiple": false, - "double-border": false, - "tooltip": "", - "link": "", - "icon": null, - "iconPosition": "", - "blend": false, - "fields": null, - "methods": null, - "columns": null, - "label": "layers", - "fontSize": 28, - "fontFamily": "DEFAULT", - "language": "", - "color": "N1", - "italic": false, - "bold": false, - "underline": false, - "labelWidth": 67, - "labelHeight": 36, - "labelPosition": "INSIDE_TOP_CENTER", - "zIndex": 0, - "level": 1 - }, - { - "id": "layers.window", - "type": "rectangle", - "pos": { - "x": 170, - "y": 62 - }, - "width": 103, - "height": 66, - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "borderRadius": 0, - "fill": "B5", - "stroke": "B1", - "shadow": false, - "3d": false, - "multiple": false, - "double-border": false, - "tooltip": "", - "link": "", - "icon": null, - "iconPosition": "", - "blend": false, - "fields": null, - "methods": null, - "columns": null, - "label": "window", - "fontSize": 16, - "fontFamily": "DEFAULT", - "language": "", - "color": "N1", - "italic": false, - "bold": true, - "underline": false, - "labelWidth": 58, - "labelHeight": 21, - "labelPosition": "INSIDE_MIDDLE_CENTER", - "zIndex": 0, - "level": 2 - }, - { - "id": "glass", - "type": "rectangle", - "pos": { - "x": 343, - "y": 62 - }, "width": 81, "height": 66, "opacity": 1, @@ -388,7 +306,7 @@ "type": "rectangle", "pos": { "x": 12, - "y": 62 + "y": 12 }, "width": 104, "height": 66, @@ -425,94 +343,12 @@ "level": 1 }, { - "id": "layers", + "id": "starlink", "type": "rectangle", "pos": { "x": 136, "y": 12 }, - "width": 175, - "height": 166, - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "borderRadius": 0, - "fill": "B4", - "stroke": "B1", - "shadow": false, - "3d": false, - "multiple": false, - "double-border": false, - "tooltip": "", - "link": "", - "icon": null, - "iconPosition": "", - "blend": false, - "fields": null, - "methods": null, - "columns": null, - "label": "layers", - "fontSize": 28, - "fontFamily": "DEFAULT", - "language": "", - "color": "N1", - "italic": false, - "bold": false, - "underline": false, - "labelWidth": 67, - "labelHeight": 36, - "labelPosition": "INSIDE_TOP_CENTER", - "zIndex": 0, - "level": 1 - }, - { - "id": "layers.roof", - "type": "rectangle", - "pos": { - "x": 186, - "y": 62 - }, - "width": 75, - "height": 66, - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "borderRadius": 0, - "fill": "B5", - "stroke": "B1", - "shadow": false, - "3d": false, - "multiple": false, - "double-border": false, - "tooltip": "", - "link": "", - "icon": null, - "iconPosition": "", - "blend": false, - "fields": null, - "methods": null, - "columns": null, - "label": "roof", - "fontSize": 16, - "fontFamily": "DEFAULT", - "language": "", - "color": "N1", - "italic": false, - "bold": true, - "underline": false, - "labelWidth": 30, - "labelHeight": 21, - "labelPosition": "INSIDE_MIDDLE_CENTER", - "zIndex": 0, - "level": 2 - }, - { - "id": "starlink", - "type": "rectangle", - "pos": { - "x": 331, - "y": 62 - }, "width": 101, "height": 66, "opacity": 1, @@ -551,8 +387,8 @@ "id": "utility hookup", "type": "rectangle", "pos": { - "x": 452, - "y": 62 + "x": 257, + "y": 12 }, "width": 146, "height": 66, @@ -640,7 +476,7 @@ "type": "rectangle", "pos": { "x": 12, - "y": 62 + "y": 12 }, "width": 81, "height": 66, @@ -677,94 +513,12 @@ "level": 1 }, { - "id": "layers", + "id": "vehicles", "type": "rectangle", "pos": { "x": 113, "y": 12 }, - "width": 194, - "height": 166, - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "borderRadius": 0, - "fill": "B4", - "stroke": "B1", - "shadow": false, - "3d": false, - "multiple": false, - "double-border": false, - "tooltip": "", - "link": "", - "icon": null, - "iconPosition": "", - "blend": false, - "fields": null, - "methods": null, - "columns": null, - "label": "layers", - "fontSize": 28, - "fontFamily": "DEFAULT", - "language": "", - "color": "N1", - "italic": false, - "bold": false, - "underline": false, - "labelWidth": 67, - "labelHeight": 36, - "labelPosition": "INSIDE_TOP_CENTER", - "zIndex": 0, - "level": 1 - }, - { - "id": "layers.garage", - "type": "rectangle", - "pos": { - "x": 163, - "y": 62 - }, - "width": 94, - "height": 66, - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "borderRadius": 0, - "fill": "B5", - "stroke": "B1", - "shadow": false, - "3d": false, - "multiple": false, - "double-border": false, - "tooltip": "", - "link": "", - "icon": null, - "iconPosition": "", - "blend": false, - "fields": null, - "methods": null, - "columns": null, - "label": "garage", - "fontSize": 16, - "fontFamily": "DEFAULT", - "language": "", - "color": "N1", - "italic": false, - "bold": true, - "underline": false, - "labelWidth": 49, - "labelHeight": 21, - "labelPosition": "INSIDE_MIDDLE_CENTER", - "zIndex": 0, - "level": 2 - }, - { - "id": "vehicles", - "type": "rectangle", - "pos": { - "x": 327, - "y": 62 - }, "width": 103, "height": 66, "opacity": 1, @@ -897,7 +651,7 @@ "type": "rectangle", "pos": { "x": 12, - "y": 162 + "y": 12 }, "width": 341, "height": 166, @@ -938,7 +692,7 @@ "type": "rectangle", "pos": { "x": 62, - "y": 212 + "y": 62 }, "width": 110, "height": 66, @@ -974,217 +728,12 @@ "zIndex": 0, "level": 2 }, - { - "id": "layers", - "type": "rectangle", - "pos": { - "x": 373, - "y": 12 - }, - "width": 559, - "height": 466, - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "borderRadius": 0, - "fill": "B4", - "stroke": "B1", - "shadow": false, - "3d": false, - "multiple": false, - "double-border": false, - "tooltip": "", - "link": "", - "icon": null, - "iconPosition": "", - "blend": false, - "fields": null, - "methods": null, - "columns": null, - "label": "layers", - "fontSize": 28, - "fontFamily": "DEFAULT", - "language": "", - "color": "N1", - "italic": false, - "bold": false, - "underline": false, - "labelWidth": 67, - "labelHeight": 36, - "labelPosition": "INSIDE_TOP_CENTER", - "zIndex": 0, - "level": 1 - }, - { - "id": "layers.repair", - "type": "rectangle", - "pos": { - "x": 423, - "y": 62 - }, - "width": 459, - "height": 366, - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "borderRadius": 0, - "fill": "B5", - "stroke": "B1", - "shadow": false, - "3d": false, - "multiple": false, - "double-border": false, - "tooltip": "", - "link": "", - "icon": null, - "iconPosition": "", - "blend": false, - "fields": null, - "methods": null, - "columns": null, - "label": "repair", - "fontSize": 24, - "fontFamily": "DEFAULT", - "language": "", - "color": "N1", - "italic": false, - "bold": false, - "underline": false, - "labelWidth": 60, - "labelHeight": 31, - "labelPosition": "INSIDE_TOP_CENTER", - "zIndex": 0, - "level": 2 - }, - { - "id": "layers.repair.steps", - "type": "rectangle", - "pos": { - "x": 473, - "y": 112 - }, - "width": 359, - "height": 266, - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "borderRadius": 0, - "fill": "B6", - "stroke": "B1", - "shadow": false, - "3d": false, - "multiple": false, - "double-border": false, - "tooltip": "", - "link": "", - "icon": null, - "iconPosition": "", - "blend": false, - "fields": null, - "methods": null, - "columns": null, - "label": "steps", - "fontSize": 20, - "fontFamily": "DEFAULT", - "language": "", - "color": "N1", - "italic": false, - "bold": false, - "underline": false, - "labelWidth": 45, - "labelHeight": 26, - "labelPosition": "INSIDE_TOP_CENTER", - "zIndex": 0, - "level": 3 - }, - { - "id": "layers.repair.steps.1", - "type": "rectangle", - "pos": { - "x": 523, - "y": 162 - }, - "width": 259, - "height": 166, - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "borderRadius": 0, - "fill": "N7", - "stroke": "B1", - "shadow": false, - "3d": false, - "multiple": false, - "double-border": false, - "tooltip": "", - "link": "", - "icon": null, - "iconPosition": "", - "blend": false, - "fields": null, - "methods": null, - "columns": null, - "label": "1", - "fontSize": 16, - "fontFamily": "DEFAULT", - "language": "", - "color": "N1", - "italic": false, - "bold": false, - "underline": false, - "labelWidth": 7, - "labelHeight": 21, - "labelPosition": "INSIDE_TOP_CENTER", - "zIndex": 0, - "level": 4 - }, - { - "id": "layers.repair.steps.1.find contractors", - "type": "rectangle", - "pos": { - "x": 573, - "y": 212 - }, - "width": 159, - "height": 66, - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "borderRadius": 0, - "fill": "N7", - "stroke": "B1", - "shadow": false, - "3d": false, - "multiple": false, - "double-border": false, - "tooltip": "", - "link": "", - "icon": null, - "iconPosition": "", - "blend": false, - "fields": null, - "methods": null, - "columns": null, - "label": "find contractors", - "fontSize": 16, - "fontFamily": "DEFAULT", - "language": "", - "color": "N1", - "italic": false, - "bold": true, - "underline": false, - "labelWidth": 114, - "labelHeight": 21, - "labelPosition": "INSIDE_MIDDLE_CENTER", - "zIndex": 0, - "level": 5 - }, { "id": "find contractors.facebook", "type": "rectangle", "pos": { "x": 192, - "y": 212 + "y": 62 }, "width": 111, "height": 66, @@ -1272,7 +821,7 @@ "type": "rectangle", "pos": { "x": 12, - "y": 312 + "y": 12 }, "width": 159, "height": 66, @@ -1308,176 +857,12 @@ "zIndex": 0, "level": 1 }, - { - "id": "layers", - "type": "rectangle", - "pos": { - "x": 191, - "y": 12 - }, - "width": 353, - "height": 366, - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "borderRadius": 0, - "fill": "B4", - "stroke": "B1", - "shadow": false, - "3d": false, - "multiple": false, - "double-border": false, - "tooltip": "", - "link": "", - "icon": null, - "iconPosition": "", - "blend": false, - "fields": null, - "methods": null, - "columns": null, - "label": "layers", - "fontSize": 28, - "fontFamily": "DEFAULT", - "language": "", - "color": "N1", - "italic": false, - "bold": false, - "underline": false, - "labelWidth": 67, - "labelHeight": 36, - "labelPosition": "INSIDE_TOP_CENTER", - "zIndex": 0, - "level": 1 - }, - { - "id": "layers.repair", - "type": "rectangle", - "pos": { - "x": 241, - "y": 62 - }, - "width": 253, - "height": 266, - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "borderRadius": 0, - "fill": "B5", - "stroke": "B1", - "shadow": false, - "3d": false, - "multiple": false, - "double-border": false, - "tooltip": "", - "link": "", - "icon": null, - "iconPosition": "", - "blend": false, - "fields": null, - "methods": null, - "columns": null, - "label": "repair", - "fontSize": 24, - "fontFamily": "DEFAULT", - "language": "", - "color": "N1", - "italic": false, - "bold": false, - "underline": false, - "labelWidth": 60, - "labelHeight": 31, - "labelPosition": "INSIDE_TOP_CENTER", - "zIndex": 0, - "level": 2 - }, - { - "id": "layers.repair.steps", - "type": "rectangle", - "pos": { - "x": 291, - "y": 112 - }, - "width": 153, - "height": 166, - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "borderRadius": 0, - "fill": "B6", - "stroke": "B1", - "shadow": false, - "3d": false, - "multiple": false, - "double-border": false, - "tooltip": "", - "link": "", - "icon": null, - "iconPosition": "", - "blend": false, - "fields": null, - "methods": null, - "columns": null, - "label": "steps", - "fontSize": 20, - "fontFamily": "DEFAULT", - "language": "", - "color": "N1", - "italic": false, - "bold": false, - "underline": false, - "labelWidth": 45, - "labelHeight": 26, - "labelPosition": "INSIDE_TOP_CENTER", - "zIndex": 0, - "level": 3 - }, - { - "id": "layers.repair.steps.2", - "type": "rectangle", - "pos": { - "x": 341, - "y": 162 - }, - "width": 53, - "height": 66, - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "borderRadius": 0, - "fill": "N7", - "stroke": "B1", - "shadow": false, - "3d": false, - "multiple": false, - "double-border": false, - "tooltip": "", - "link": "", - "icon": null, - "iconPosition": "", - "blend": false, - "fields": null, - "methods": null, - "columns": null, - "label": "2", - "fontSize": 16, - "fontFamily": "DEFAULT", - "language": "", - "color": "N1", - "italic": false, - "bold": true, - "underline": false, - "labelWidth": 8, - "labelHeight": 21, - "labelPosition": "INSIDE_MIDDLE_CENTER", - "zIndex": 0, - "level": 4 - }, { "id": "solicit quotes", "type": "rectangle", "pos": { "x": 21, - "y": 448 + "y": 148 }, "width": 140, "height": 66, @@ -1542,11 +927,11 @@ "route": [ { "x": 91.5, - "y": 378 + "y": 78 }, { "x": 91.5, - "y": 448 + "y": 148 } ], "animated": false, @@ -1605,7 +990,7 @@ "type": "rectangle", "pos": { "x": 12, - "y": 312 + "y": 12 }, "width": 143, "height": 66, @@ -1641,176 +1026,12 @@ "zIndex": 0, "level": 1 }, - { - "id": "layers", - "type": "rectangle", - "pos": { - "x": 175, - "y": 12 - }, - "width": 353, - "height": 366, - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "borderRadius": 0, - "fill": "B4", - "stroke": "B1", - "shadow": false, - "3d": false, - "multiple": false, - "double-border": false, - "tooltip": "", - "link": "", - "icon": null, - "iconPosition": "", - "blend": false, - "fields": null, - "methods": null, - "columns": null, - "label": "layers", - "fontSize": 28, - "fontFamily": "DEFAULT", - "language": "", - "color": "N1", - "italic": false, - "bold": false, - "underline": false, - "labelWidth": 67, - "labelHeight": 36, - "labelPosition": "INSIDE_TOP_CENTER", - "zIndex": 0, - "level": 1 - }, - { - "id": "layers.repair", - "type": "rectangle", - "pos": { - "x": 225, - "y": 62 - }, - "width": 253, - "height": 266, - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "borderRadius": 0, - "fill": "B5", - "stroke": "B1", - "shadow": false, - "3d": false, - "multiple": false, - "double-border": false, - "tooltip": "", - "link": "", - "icon": null, - "iconPosition": "", - "blend": false, - "fields": null, - "methods": null, - "columns": null, - "label": "repair", - "fontSize": 24, - "fontFamily": "DEFAULT", - "language": "", - "color": "N1", - "italic": false, - "bold": false, - "underline": false, - "labelWidth": 60, - "labelHeight": 31, - "labelPosition": "INSIDE_TOP_CENTER", - "zIndex": 0, - "level": 2 - }, - { - "id": "layers.repair.steps", - "type": "rectangle", - "pos": { - "x": 275, - "y": 112 - }, - "width": 153, - "height": 166, - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "borderRadius": 0, - "fill": "B6", - "stroke": "B1", - "shadow": false, - "3d": false, - "multiple": false, - "double-border": false, - "tooltip": "", - "link": "", - "icon": null, - "iconPosition": "", - "blend": false, - "fields": null, - "methods": null, - "columns": null, - "label": "steps", - "fontSize": 20, - "fontFamily": "DEFAULT", - "language": "", - "color": "N1", - "italic": false, - "bold": false, - "underline": false, - "labelWidth": 45, - "labelHeight": 26, - "labelPosition": "INSIDE_TOP_CENTER", - "zIndex": 0, - "level": 3 - }, - { - "id": "layers.repair.steps.3", - "type": "rectangle", - "pos": { - "x": 325, - "y": 162 - }, - "width": 53, - "height": 66, - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "borderRadius": 0, - "fill": "N7", - "stroke": "B1", - "shadow": false, - "3d": false, - "multiple": false, - "double-border": false, - "tooltip": "", - "link": "", - "icon": null, - "iconPosition": "", - "blend": false, - "fields": null, - "methods": null, - "columns": null, - "label": "3", - "fontSize": 16, - "fontFamily": "DEFAULT", - "language": "", - "color": "N1", - "italic": false, - "bold": true, - "underline": false, - "labelWidth": 8, - "labelHeight": 21, - "labelPosition": "INSIDE_MIDDLE_CENTER", - "zIndex": 0, - "level": 4 - }, { "id": "negotiate", "type": "rectangle", "pos": { "x": 27, - "y": 448 + "y": 148 }, "width": 112, "height": 66, @@ -1875,11 +1096,11 @@ "route": [ { "x": 83.5, - "y": 378 + "y": 78 }, { "x": 83.5, - "y": 448 + "y": 148 } ], "animated": false, @@ -1938,7 +1159,7 @@ "type": "rectangle", "pos": { "x": 39, - "y": 312 + "y": 12 }, "width": 112, "height": 66, @@ -1974,176 +1195,12 @@ "zIndex": 0, "level": 1 }, - { - "id": "layers", - "type": "rectangle", - "pos": { - "x": 171, - "y": 12 - }, - "width": 354, - "height": 366, - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "borderRadius": 0, - "fill": "B4", - "stroke": "B1", - "shadow": false, - "3d": false, - "multiple": false, - "double-border": false, - "tooltip": "", - "link": "", - "icon": null, - "iconPosition": "", - "blend": false, - "fields": null, - "methods": null, - "columns": null, - "label": "layers", - "fontSize": 28, - "fontFamily": "DEFAULT", - "language": "", - "color": "N1", - "italic": false, - "bold": false, - "underline": false, - "labelWidth": 67, - "labelHeight": 36, - "labelPosition": "INSIDE_TOP_CENTER", - "zIndex": 0, - "level": 1 - }, - { - "id": "layers.repair", - "type": "rectangle", - "pos": { - "x": 221, - "y": 62 - }, - "width": 254, - "height": 266, - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "borderRadius": 0, - "fill": "B5", - "stroke": "B1", - "shadow": false, - "3d": false, - "multiple": false, - "double-border": false, - "tooltip": "", - "link": "", - "icon": null, - "iconPosition": "", - "blend": false, - "fields": null, - "methods": null, - "columns": null, - "label": "repair", - "fontSize": 24, - "fontFamily": "DEFAULT", - "language": "", - "color": "N1", - "italic": false, - "bold": false, - "underline": false, - "labelWidth": 60, - "labelHeight": 31, - "labelPosition": "INSIDE_TOP_CENTER", - "zIndex": 0, - "level": 2 - }, - { - "id": "layers.repair.steps", - "type": "rectangle", - "pos": { - "x": 271, - "y": 112 - }, - "width": 154, - "height": 166, - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "borderRadius": 0, - "fill": "B6", - "stroke": "B1", - "shadow": false, - "3d": false, - "multiple": false, - "double-border": false, - "tooltip": "", - "link": "", - "icon": null, - "iconPosition": "", - "blend": false, - "fields": null, - "methods": null, - "columns": null, - "label": "steps", - "fontSize": 20, - "fontFamily": "DEFAULT", - "language": "", - "color": "N1", - "italic": false, - "bold": false, - "underline": false, - "labelWidth": 45, - "labelHeight": 26, - "labelPosition": "INSIDE_TOP_CENTER", - "zIndex": 0, - "level": 3 - }, - { - "id": "layers.repair.steps.4", - "type": "rectangle", - "pos": { - "x": 321, - "y": 162 - }, - "width": 54, - "height": 66, - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "borderRadius": 0, - "fill": "N7", - "stroke": "B1", - "shadow": false, - "3d": false, - "multiple": false, - "double-border": false, - "tooltip": "", - "link": "", - "icon": null, - "iconPosition": "", - "blend": false, - "fields": null, - "methods": null, - "columns": null, - "label": "4", - "fontSize": 16, - "fontFamily": "DEFAULT", - "language": "", - "color": "N1", - "italic": false, - "bold": true, - "underline": false, - "labelWidth": 9, - "labelHeight": 21, - "labelPosition": "INSIDE_MIDDLE_CENTER", - "zIndex": 0, - "level": 4 - }, { "id": "book the best bid", "type": "rectangle", "pos": { "x": 12, - "y": 448 + "y": 148 }, "width": 167, "height": 66, @@ -2208,11 +1265,11 @@ "route": [ { "x": 95.5, - "y": 378 + "y": 78 }, { "x": 95.5, - "y": 448 + "y": 148 } ], "animated": false, @@ -2275,7 +1332,7 @@ "type": "rectangle", "pos": { "x": 12, - "y": 62 + "y": 12 }, "width": 103, "height": 66, @@ -2316,7 +1373,7 @@ "type": "rectangle", "pos": { "x": 135, - "y": 62 + "y": 12 }, "width": 75, "height": 66, @@ -2357,7 +1414,7 @@ "type": "rectangle", "pos": { "x": 230, - "y": 62 + "y": 12 }, "width": 94, "height": 66, @@ -2398,7 +1455,7 @@ "type": "rectangle", "pos": { "x": 344, - "y": 62 + "y": 12 }, "width": 88, "height": 66, @@ -2435,94 +1492,12 @@ "level": 1 }, { - "id": "scenarios", + "id": "rain", "type": "rectangle", "pos": { "x": 452, "y": 12 }, - "width": 187, - "height": 166, - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "borderRadius": 0, - "fill": "B4", - "stroke": "B1", - "shadow": false, - "3d": false, - "multiple": false, - "double-border": false, - "tooltip": "", - "link": "", - "icon": null, - "iconPosition": "", - "blend": false, - "fields": null, - "methods": null, - "columns": null, - "label": "scenarios", - "fontSize": 28, - "fontFamily": "DEFAULT", - "language": "", - "color": "N1", - "italic": false, - "bold": false, - "underline": false, - "labelWidth": 111, - "labelHeight": 36, - "labelPosition": "INSIDE_TOP_CENTER", - "zIndex": 0, - "level": 1 - }, - { - "id": "scenarios.storm", - "type": "rectangle", - "pos": { - "x": 502, - "y": 62 - }, - "width": 87, - "height": 66, - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "borderRadius": 0, - "fill": "B5", - "stroke": "B1", - "shadow": false, - "3d": false, - "multiple": false, - "double-border": false, - "tooltip": "", - "link": "", - "icon": null, - "iconPosition": "", - "blend": false, - "fields": null, - "methods": null, - "columns": null, - "label": "storm", - "fontSize": 16, - "fontFamily": "DEFAULT", - "language": "", - "color": "N1", - "italic": false, - "bold": true, - "underline": false, - "labelWidth": 42, - "labelHeight": 21, - "labelPosition": "INSIDE_MIDDLE_CENTER", - "zIndex": 0, - "level": 2 - }, - { - "id": "rain", - "type": "rectangle", - "pos": { - "x": 659, - "y": 62 - }, "width": 73, "height": 66, "opacity": 1, @@ -2561,8 +1536,8 @@ "id": "thunder", "type": "rectangle", "pos": { - "x": 752, - "y": 62 + "x": 545, + "y": 12 }, "width": 103, "height": 66, diff --git a/testdata/d2compiler/TestCompile2/boards/recursive.exp.json b/testdata/d2compiler/TestCompile2/boards/recursive.exp.json index 805ca96fe..4496b0752 100644 --- a/testdata/d2compiler/TestCompile2/boards/recursive.exp.json +++ b/testdata/d2compiler/TestCompile2/boards/recursive.exp.json @@ -740,56 +740,6 @@ } }, "zIndex": 0 - }, - { - "id": "layers", - "id_val": "layers", - "label_dimensions": { - "width": 0, - "height": 0 - }, - "attributes": { - "label": { - "value": "layers" - }, - "style": {}, - "near_key": null, - "shape": { - "value": "rectangle" - }, - "direction": { - "value": "" - }, - "constraint": { - "value": "" - } - }, - "zIndex": 0 - }, - { - "id": "one", - "id_val": "one", - "label_dimensions": { - "width": 0, - "height": 0 - }, - "attributes": { - "label": { - "value": "one" - }, - "style": {}, - "near_key": null, - "shape": { - "value": "rectangle" - }, - "direction": { - "value": "" - }, - "constraint": { - "value": "" - } - }, - "zIndex": 0 } ] }, @@ -1162,56 +1112,6 @@ } }, "zIndex": 0 - }, - { - "id": "layers", - "id_val": "layers", - "label_dimensions": { - "width": 0, - "height": 0 - }, - "attributes": { - "label": { - "value": "layers" - }, - "style": {}, - "near_key": null, - "shape": { - "value": "rectangle" - }, - "direction": { - "value": "" - }, - "constraint": { - "value": "" - } - }, - "zIndex": 0 - }, - { - "id": "two", - "id_val": "two", - "label_dimensions": { - "width": 0, - "height": 0 - }, - "attributes": { - "label": { - "value": "two" - }, - "style": {}, - "near_key": null, - "shape": { - "value": "rectangle" - }, - "direction": { - "value": "" - }, - "constraint": { - "value": "" - } - }, - "zIndex": 0 } ], "steps": [ @@ -1584,106 +1484,6 @@ } }, "zIndex": 0 - }, - { - "id": "layers", - "id_val": "layers", - "label_dimensions": { - "width": 0, - "height": 0 - }, - "attributes": { - "label": { - "value": "layers" - }, - "style": {}, - "near_key": null, - "shape": { - "value": "rectangle" - }, - "direction": { - "value": "" - }, - "constraint": { - "value": "" - } - }, - "zIndex": 0 - }, - { - "id": "two", - "id_val": "two", - "label_dimensions": { - "width": 0, - "height": 0 - }, - "attributes": { - "label": { - "value": "two" - }, - "style": {}, - "near_key": null, - "shape": { - "value": "rectangle" - }, - "direction": { - "value": "" - }, - "constraint": { - "value": "" - } - }, - "zIndex": 0 - }, - { - "id": "steps", - "id_val": "steps", - "label_dimensions": { - "width": 0, - "height": 0 - }, - "attributes": { - "label": { - "value": "steps" - }, - "style": {}, - "near_key": null, - "shape": { - "value": "rectangle" - }, - "direction": { - "value": "" - }, - "constraint": { - "value": "" - } - }, - "zIndex": 0 - }, - { - "id": "seinfeld", - "id_val": "seinfeld", - "label_dimensions": { - "width": 0, - "height": 0 - }, - "attributes": { - "label": { - "value": "seinfeld" - }, - "style": {}, - "near_key": null, - "shape": { - "value": "rectangle" - }, - "direction": { - "value": "" - }, - "constraint": { - "value": "" - } - }, - "zIndex": 0 } ] }, @@ -2056,106 +1856,6 @@ } }, "zIndex": 0 - }, - { - "id": "layers", - "id_val": "layers", - "label_dimensions": { - "width": 0, - "height": 0 - }, - "attributes": { - "label": { - "value": "layers" - }, - "style": {}, - "near_key": null, - "shape": { - "value": "rectangle" - }, - "direction": { - "value": "" - }, - "constraint": { - "value": "" - } - }, - "zIndex": 0 - }, - { - "id": "two", - "id_val": "two", - "label_dimensions": { - "width": 0, - "height": 0 - }, - "attributes": { - "label": { - "value": "two" - }, - "style": {}, - "near_key": null, - "shape": { - "value": "rectangle" - }, - "direction": { - "value": "" - }, - "constraint": { - "value": "" - } - }, - "zIndex": 0 - }, - { - "id": "steps", - "id_val": "steps", - "label_dimensions": { - "width": 0, - "height": 0 - }, - "attributes": { - "label": { - "value": "steps" - }, - "style": {}, - "near_key": null, - "shape": { - "value": "rectangle" - }, - "direction": { - "value": "" - }, - "constraint": { - "value": "" - } - }, - "zIndex": 0 - }, - { - "id": "missoula", - "id_val": "missoula", - "label_dimensions": { - "width": 0, - "height": 0 - }, - "attributes": { - "label": { - "value": "missoula" - }, - "style": {}, - "near_key": null, - "shape": { - "value": "rectangle" - }, - "direction": { - "value": "" - }, - "constraint": { - "value": "" - } - }, - "zIndex": 0 } ] } diff --git a/testdata/d2compiler/TestCompile2/boards/root.exp.json b/testdata/d2compiler/TestCompile2/boards/root.exp.json index 7d49aad12..7efd58eac 100644 --- a/testdata/d2compiler/TestCompile2/boards/root.exp.json +++ b/testdata/d2compiler/TestCompile2/boards/root.exp.json @@ -474,56 +474,6 @@ } }, "zIndex": 0 - }, - { - "id": "layers", - "id_val": "layers", - "label_dimensions": { - "width": 0, - "height": 0 - }, - "attributes": { - "label": { - "value": "layers" - }, - "style": {}, - "near_key": null, - "shape": { - "value": "rectangle" - }, - "direction": { - "value": "" - }, - "constraint": { - "value": "" - } - }, - "zIndex": 0 - }, - { - "id": "one", - "id_val": "one", - "label_dimensions": { - "width": 0, - "height": 0 - }, - "attributes": { - "label": { - "value": "one" - }, - "style": {}, - "near_key": null, - "shape": { - "value": "rectangle" - }, - "direction": { - "value": "" - }, - "constraint": { - "value": "" - } - }, - "zIndex": 0 } ] }, @@ -763,56 +713,6 @@ } }, "zIndex": 0 - }, - { - "id": "layers", - "id_val": "layers", - "label_dimensions": { - "width": 0, - "height": 0 - }, - "attributes": { - "label": { - "value": "layers" - }, - "style": {}, - "near_key": null, - "shape": { - "value": "rectangle" - }, - "direction": { - "value": "" - }, - "constraint": { - "value": "" - } - }, - "zIndex": 0 - }, - { - "id": "two", - "id_val": "two", - "label_dimensions": { - "width": 0, - "height": 0 - }, - "attributes": { - "label": { - "value": "two" - }, - "style": {}, - "near_key": null, - "shape": { - "value": "rectangle" - }, - "direction": { - "value": "" - }, - "constraint": { - "value": "" - } - }, - "zIndex": 0 } ] } From 1143286c33c2388d8d761f74e13537745a0da6aa Mon Sep 17 00:00:00 2001 From: Alexander Wang Date: Mon, 27 Feb 2023 12:04:08 -0800 Subject: [PATCH 6/6] regen test --- d2renderers/d2sketch/testdata/animated/sketch.exp.svg | 2 +- d2renderers/d2sketch/testdata/animated_dark/sketch.exp.svg | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/d2renderers/d2sketch/testdata/animated/sketch.exp.svg b/d2renderers/d2sketch/testdata/animated/sketch.exp.svg index 4f34dadef..b5c982c3f 100644 --- a/d2renderers/d2sketch/testdata/animated/sketch.exp.svg +++ b/d2renderers/d2sketch/testdata/animated/sketch.exp.svg @@ -30,7 +30,7 @@ mix-blend-mode: multiply; opacity: 0.5; } -.fill-N1{fill:#0A0F25;}.fill-N2{fill:#676C7E;}.fill-N3{fill:#9499AB;}.fill-N4{fill:#CFD2DD;}.fill-N5{fill:#DEE1EB;}.fill-N6{fill:#EEF1F8;}.fill-N7{fill:#FFFFFF;}.fill-B1{fill:#0D32B2;}.fill-B2{fill:#0D32B2;}.fill-B3{fill:#E3E9FD;}.fill-B4{fill:#E3E9FD;}.fill-B5{fill:#EDF0FD;}.fill-B6{fill:#F7F8FE;}.fill-AA2{fill:#4A6FF3;}.fill-AA4{fill:#EDF0FD;}.fill-AA5{fill:#F7F8FE;}.fill-AB4{fill:#EDF0FD;}.fill-AB5{fill:#F7F8FE;}.stroke-N1{stroke:#0A0F25;}.stroke-N2{stroke:#676C7E;}.stroke-N3{stroke:#9499AB;}.stroke-N4{stroke:#CFD2DD;}.stroke-N5{stroke:#DEE1EB;}.stroke-N6{stroke:#EEF1F8;}.stroke-N7{stroke:#FFFFFF;}.stroke-B1{stroke:#0D32B2;}.stroke-B2{stroke:#0D32B2;}.stroke-B3{stroke:#E3E9FD;}.stroke-B4{stroke:#E3E9FD;}.stroke-B5{stroke:#EDF0FD;}.stroke-B6{stroke:#F7F8FE;}.stroke-AA2{stroke:#4A6FF3;}.stroke-AA4{stroke:#EDF0FD;}.stroke-AA5{stroke:#F7F8FE;}.stroke-AB4{stroke:#EDF0FD;}.stroke-AB5{stroke:#F7F8FE;}.background-color-N1{background-color:#0A0F25;}.background-color-N2{background-color:#676C7E;}.background-color-N3{background-color:#9499AB;}.background-color-N4{background-color:#CFD2DD;}.background-color-N5{background-color:#DEE1EB;}.background-color-N6{background-color:#EEF1F8;}.background-color-N7{background-color:#FFFFFF;}.background-color-B1{background-color:#0D32B2;}.background-color-B2{background-color:#0D32B2;}.background-color-B3{background-color:#E3E9FD;}.background-color-B4{background-color:#E3E9FD;}.background-color-B5{background-color:#EDF0FD;}.background-color-B6{background-color:#F7F8FE;}.background-color-AA2{background-color:#4A6FF3;}.background-color-AA4{background-color:#EDF0FD;}.background-color-AA5{background-color:#F7F8FE;}.background-color-AB4{background-color:#EDF0FD;}.background-color-AB5{background-color:#F7F8FE;}.color-N1{color:#0A0F25;}.color-N2{color:#676C7E;}.color-N3{color:#9499AB;}.color-N4{color:#CFD2DD;}.color-N5{color:#DEE1EB;}.color-N6{color:#EEF1F8;}.color-N7{color:#FFFFFF;}.color-B1{color:#0D32B2;}.color-B2{color:#0D32B2;}.color-B3{color:#E3E9FD;}.color-B4{color:#E3E9FD;}.color-B5{color:#EDF0FD;}.color-B6{color:#F7F8FE;}.color-AA2{color:#4A6FF3;}.color-AA4{color:#EDF0FD;}.color-AA5{color:#F7F8FE;}.color-AB4{color:#EDF0FD;}.color-AB5{color:#F7F8FE;}.appendix text.text{fill:#0A0F25}.md{--color-fg-default:#0A0F25;--color-fg-muted:#676C7E;--color-fg-subtle:#9499AB;--color-canvas-default:#FFFFFF;--color-canvas-subtle:#EEF1F8;--color-border-default:#0D32B2;--color-border-muted:#0D32B2;--color-neutral-muted:#EEF1F8;--color-accent-fg:#0D32B2;--color-accent-emphasis:#0D32B2;--color-attention-subtle:#676C7E;--color-danger-fg:red;}.sketch-overlay-B1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B2{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B3{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-AA4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-N2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-N3{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N4{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N7{fill:url(#streaks-bright);mix-blend-mode:darken}]]>wintersummertreessnowsun +.fill-N1{fill:#0A0F25;}.fill-N2{fill:#676C7E;}.fill-N3{fill:#9499AB;}.fill-N4{fill:#CFD2DD;}.fill-N5{fill:#DEE1EB;}.fill-N6{fill:#EEF1F8;}.fill-N7{fill:#FFFFFF;}.fill-B1{fill:#0D32B2;}.fill-B2{fill:#0D32B2;}.fill-B3{fill:#E3E9FD;}.fill-B4{fill:#E3E9FD;}.fill-B5{fill:#EDF0FD;}.fill-B6{fill:#F7F8FE;}.fill-AA2{fill:#4A6FF3;}.fill-AA4{fill:#EDF0FD;}.fill-AA5{fill:#F7F8FE;}.fill-AB4{fill:#EDF0FD;}.fill-AB5{fill:#F7F8FE;}.stroke-N1{stroke:#0A0F25;}.stroke-N2{stroke:#676C7E;}.stroke-N3{stroke:#9499AB;}.stroke-N4{stroke:#CFD2DD;}.stroke-N5{stroke:#DEE1EB;}.stroke-N6{stroke:#EEF1F8;}.stroke-N7{stroke:#FFFFFF;}.stroke-B1{stroke:#0D32B2;}.stroke-B2{stroke:#0D32B2;}.stroke-B3{stroke:#E3E9FD;}.stroke-B4{stroke:#E3E9FD;}.stroke-B5{stroke:#EDF0FD;}.stroke-B6{stroke:#F7F8FE;}.stroke-AA2{stroke:#4A6FF3;}.stroke-AA4{stroke:#EDF0FD;}.stroke-AA5{stroke:#F7F8FE;}.stroke-AB4{stroke:#EDF0FD;}.stroke-AB5{stroke:#F7F8FE;}.background-color-N1{background-color:#0A0F25;}.background-color-N2{background-color:#676C7E;}.background-color-N3{background-color:#9499AB;}.background-color-N4{background-color:#CFD2DD;}.background-color-N5{background-color:#DEE1EB;}.background-color-N6{background-color:#EEF1F8;}.background-color-N7{background-color:#FFFFFF;}.background-color-B1{background-color:#0D32B2;}.background-color-B2{background-color:#0D32B2;}.background-color-B3{background-color:#E3E9FD;}.background-color-B4{background-color:#E3E9FD;}.background-color-B5{background-color:#EDF0FD;}.background-color-B6{background-color:#F7F8FE;}.background-color-AA2{background-color:#4A6FF3;}.background-color-AA4{background-color:#EDF0FD;}.background-color-AA5{background-color:#F7F8FE;}.background-color-AB4{background-color:#EDF0FD;}.background-color-AB5{background-color:#F7F8FE;}.color-N1{color:#0A0F25;}.color-N2{color:#676C7E;}.color-N3{color:#9499AB;}.color-N4{color:#CFD2DD;}.color-N5{color:#DEE1EB;}.color-N6{color:#EEF1F8;}.color-N7{color:#FFFFFF;}.color-B1{color:#0D32B2;}.color-B2{color:#0D32B2;}.color-B3{color:#E3E9FD;}.color-B4{color:#E3E9FD;}.color-B5{color:#EDF0FD;}.color-B6{color:#F7F8FE;}.color-AA2{color:#4A6FF3;}.color-AA4{color:#EDF0FD;}.color-AA5{color:#F7F8FE;}.color-AB4{color:#EDF0FD;}.color-AB5{color:#F7F8FE;}.appendix text.text{fill:#0A0F25}.md{--color-fg-default:#0A0F25;--color-fg-muted:#676C7E;--color-fg-subtle:#9499AB;--color-canvas-default:#FFFFFF;--color-canvas-subtle:#EEF1F8;--color-border-default:#0D32B2;--color-border-muted:#0D32B2;--color-neutral-muted:#EEF1F8;--color-accent-fg:#0D32B2;--color-accent-emphasis:#0D32B2;--color-attention-subtle:#676C7E;--color-danger-fg:red;}.sketch-overlay-B1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B2{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B3{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-AA4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-N2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-N3{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N4{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N7{fill:url(#streaks-bright);mix-blend-mode:darken}]]>wintersummertreessnowsun \ No newline at end of file diff --git a/d2renderers/d2sketch/testdata/animated_dark/sketch.exp.svg b/d2renderers/d2sketch/testdata/animated_dark/sketch.exp.svg index 87ddf699b..d5dbfaf35 100644 --- a/d2renderers/d2sketch/testdata/animated_dark/sketch.exp.svg +++ b/d2renderers/d2sketch/testdata/animated_dark/sketch.exp.svg @@ -30,7 +30,7 @@ mix-blend-mode: multiply; opacity: 0.5; } -.fill-N1{fill:#CDD6F4;}.fill-N2{fill:#BAC2DE;}.fill-N3{fill:#A6ADC8;}.fill-N4{fill:#585B70;}.fill-N5{fill:#45475A;}.fill-N6{fill:#313244;}.fill-N7{fill:#1E1E2E;}.fill-B1{fill:#CBA6f7;}.fill-B2{fill:#CBA6f7;}.fill-B3{fill:#6C7086;}.fill-B4{fill:#585B70;}.fill-B5{fill:#45475A;}.fill-B6{fill:#313244;}.fill-AA2{fill:#f38BA8;}.fill-AA4{fill:#45475A;}.fill-AA5{fill:#313244;}.fill-AB4{fill:#45475A;}.fill-AB5{fill:#313244;}.stroke-N1{stroke:#CDD6F4;}.stroke-N2{stroke:#BAC2DE;}.stroke-N3{stroke:#A6ADC8;}.stroke-N4{stroke:#585B70;}.stroke-N5{stroke:#45475A;}.stroke-N6{stroke:#313244;}.stroke-N7{stroke:#1E1E2E;}.stroke-B1{stroke:#CBA6f7;}.stroke-B2{stroke:#CBA6f7;}.stroke-B3{stroke:#6C7086;}.stroke-B4{stroke:#585B70;}.stroke-B5{stroke:#45475A;}.stroke-B6{stroke:#313244;}.stroke-AA2{stroke:#f38BA8;}.stroke-AA4{stroke:#45475A;}.stroke-AA5{stroke:#313244;}.stroke-AB4{stroke:#45475A;}.stroke-AB5{stroke:#313244;}.background-color-N1{background-color:#CDD6F4;}.background-color-N2{background-color:#BAC2DE;}.background-color-N3{background-color:#A6ADC8;}.background-color-N4{background-color:#585B70;}.background-color-N5{background-color:#45475A;}.background-color-N6{background-color:#313244;}.background-color-N7{background-color:#1E1E2E;}.background-color-B1{background-color:#CBA6f7;}.background-color-B2{background-color:#CBA6f7;}.background-color-B3{background-color:#6C7086;}.background-color-B4{background-color:#585B70;}.background-color-B5{background-color:#45475A;}.background-color-B6{background-color:#313244;}.background-color-AA2{background-color:#f38BA8;}.background-color-AA4{background-color:#45475A;}.background-color-AA5{background-color:#313244;}.background-color-AB4{background-color:#45475A;}.background-color-AB5{background-color:#313244;}.color-N1{color:#CDD6F4;}.color-N2{color:#BAC2DE;}.color-N3{color:#A6ADC8;}.color-N4{color:#585B70;}.color-N5{color:#45475A;}.color-N6{color:#313244;}.color-N7{color:#1E1E2E;}.color-B1{color:#CBA6f7;}.color-B2{color:#CBA6f7;}.color-B3{color:#6C7086;}.color-B4{color:#585B70;}.color-B5{color:#45475A;}.color-B6{color:#313244;}.color-AA2{color:#f38BA8;}.color-AA4{color:#45475A;}.color-AA5{color:#313244;}.color-AB4{color:#45475A;}.color-AB5{color:#313244;}.appendix text.text{fill:#CDD6F4}.md{--color-fg-default:#CDD6F4;--color-fg-muted:#BAC2DE;--color-fg-subtle:#A6ADC8;--color-canvas-default:#1E1E2E;--color-canvas-subtle:#313244;--color-border-default:#CBA6f7;--color-border-muted:#CBA6f7;--color-neutral-muted:#313244;--color-accent-fg:#CBA6f7;--color-accent-emphasis:#CBA6f7;--color-attention-subtle:#BAC2DE;--color-danger-fg:red;}.sketch-overlay-B1{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-B2{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-B3{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-B4{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-B5{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B6{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-AA2{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-AA4{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-AA5{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-AB4{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-AB5{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-N1{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N2{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N3{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N4{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-N5{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-N6{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-N7{fill:url(#streaks-darker);mix-blend-mode:lighten}]]>wintersummertreessnowsun +.fill-N1{fill:#CDD6F4;}.fill-N2{fill:#BAC2DE;}.fill-N3{fill:#A6ADC8;}.fill-N4{fill:#585B70;}.fill-N5{fill:#45475A;}.fill-N6{fill:#313244;}.fill-N7{fill:#1E1E2E;}.fill-B1{fill:#CBA6f7;}.fill-B2{fill:#CBA6f7;}.fill-B3{fill:#6C7086;}.fill-B4{fill:#585B70;}.fill-B5{fill:#45475A;}.fill-B6{fill:#313244;}.fill-AA2{fill:#f38BA8;}.fill-AA4{fill:#45475A;}.fill-AA5{fill:#313244;}.fill-AB4{fill:#45475A;}.fill-AB5{fill:#313244;}.stroke-N1{stroke:#CDD6F4;}.stroke-N2{stroke:#BAC2DE;}.stroke-N3{stroke:#A6ADC8;}.stroke-N4{stroke:#585B70;}.stroke-N5{stroke:#45475A;}.stroke-N6{stroke:#313244;}.stroke-N7{stroke:#1E1E2E;}.stroke-B1{stroke:#CBA6f7;}.stroke-B2{stroke:#CBA6f7;}.stroke-B3{stroke:#6C7086;}.stroke-B4{stroke:#585B70;}.stroke-B5{stroke:#45475A;}.stroke-B6{stroke:#313244;}.stroke-AA2{stroke:#f38BA8;}.stroke-AA4{stroke:#45475A;}.stroke-AA5{stroke:#313244;}.stroke-AB4{stroke:#45475A;}.stroke-AB5{stroke:#313244;}.background-color-N1{background-color:#CDD6F4;}.background-color-N2{background-color:#BAC2DE;}.background-color-N3{background-color:#A6ADC8;}.background-color-N4{background-color:#585B70;}.background-color-N5{background-color:#45475A;}.background-color-N6{background-color:#313244;}.background-color-N7{background-color:#1E1E2E;}.background-color-B1{background-color:#CBA6f7;}.background-color-B2{background-color:#CBA6f7;}.background-color-B3{background-color:#6C7086;}.background-color-B4{background-color:#585B70;}.background-color-B5{background-color:#45475A;}.background-color-B6{background-color:#313244;}.background-color-AA2{background-color:#f38BA8;}.background-color-AA4{background-color:#45475A;}.background-color-AA5{background-color:#313244;}.background-color-AB4{background-color:#45475A;}.background-color-AB5{background-color:#313244;}.color-N1{color:#CDD6F4;}.color-N2{color:#BAC2DE;}.color-N3{color:#A6ADC8;}.color-N4{color:#585B70;}.color-N5{color:#45475A;}.color-N6{color:#313244;}.color-N7{color:#1E1E2E;}.color-B1{color:#CBA6f7;}.color-B2{color:#CBA6f7;}.color-B3{color:#6C7086;}.color-B4{color:#585B70;}.color-B5{color:#45475A;}.color-B6{color:#313244;}.color-AA2{color:#f38BA8;}.color-AA4{color:#45475A;}.color-AA5{color:#313244;}.color-AB4{color:#45475A;}.color-AB5{color:#313244;}.appendix text.text{fill:#CDD6F4}.md{--color-fg-default:#CDD6F4;--color-fg-muted:#BAC2DE;--color-fg-subtle:#A6ADC8;--color-canvas-default:#1E1E2E;--color-canvas-subtle:#313244;--color-border-default:#CBA6f7;--color-border-muted:#CBA6f7;--color-neutral-muted:#313244;--color-accent-fg:#CBA6f7;--color-accent-emphasis:#CBA6f7;--color-attention-subtle:#BAC2DE;--color-danger-fg:red;}.sketch-overlay-B1{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-B2{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-B3{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-B4{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-B5{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B6{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-AA2{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-AA4{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-AA5{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-AB4{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-AB5{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-N1{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N2{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N3{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N4{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-N5{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-N6{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-N7{fill:url(#streaks-darker);mix-blend-mode:lighten}]]>wintersummertreessnowsun \ No newline at end of file