From cadaf0c8303e6592fecba0ed553d3a7566a6954e Mon Sep 17 00:00:00 2001 From: Alexander Wang Date: Wed, 8 Feb 2023 22:11:52 -0800 Subject: [PATCH 01/14] save --- d2layouts/d2dagrelayout/layout.go | 7 ++- d2layouts/d2elklayout/layout.go | 4 +- d2layouts/d2sequence/constants.go | 20 ++++---- d2layouts/d2sequence/sequence_diagram.go | 65 ++++++++++++++++++++++-- 4 files changed, 77 insertions(+), 19 deletions(-) diff --git a/d2layouts/d2dagrelayout/layout.go b/d2layouts/d2dagrelayout/layout.go index 7ac2a44e4..201509cee 100644 --- a/d2layouts/d2dagrelayout/layout.go +++ b/d2layouts/d2dagrelayout/layout.go @@ -30,7 +30,10 @@ var setupJS string //go:embed dagre.js var dagreJS string -const MIN_SEGMENT_LEN = 10 +const ( + MIN_SEGMENT_LEN = 10 + MIN_RANK_SEP = 100 +) type ConfigurableOpts struct { NodeSep int `json:"nodesep"` @@ -112,7 +115,7 @@ func Layout(ctx context.Context, g *d2graph.Graph, opts *ConfigurableOpts) (err } maxLabelSize = go2.Max(maxLabelSize, size) } - rootAttrs.ranksep = go2.Max(100, maxLabelSize+40) + rootAttrs.ranksep = go2.Max(MIN_RANK_SEP, maxLabelSize+40) configJS := setGraphAttrs(rootAttrs) if _, err := vm.RunString(configJS); err != nil { diff --git a/d2layouts/d2elklayout/layout.go b/d2layouts/d2elklayout/layout.go index 909a7eab1..671fc2790 100644 --- a/d2layouts/d2elklayout/layout.go +++ b/d2layouts/d2elklayout/layout.go @@ -132,7 +132,7 @@ func Layout(ctx context.Context, g *d2graph.Graph, opts *ConfigurableOpts) (err elkGraph := &ELKGraph{ ID: "root", LayoutOptions: &elkOpts{ - Thoroughness: 20, + Thoroughness: 8, EdgeEdgeBetweenLayersSpacing: 50, HierarchyHandling: "INCLUDE_CHILDREN", ConsiderModelOrder: "NODES_AND_EDGES", @@ -188,7 +188,7 @@ func Layout(ctx context.Context, g *d2graph.Graph, opts *ConfigurableOpts) (err if len(obj.ChildrenArray) > 0 { n.LayoutOptions = &elkOpts{ ForceNodeModelOrder: true, - Thoroughness: 20, + Thoroughness: 8, EdgeEdgeBetweenLayersSpacing: 50, HierarchyHandling: "INCLUDE_CHILDREN", ConsiderModelOrder: "NODES_AND_EDGES", diff --git a/d2layouts/d2sequence/constants.go b/d2layouts/d2sequence/constants.go index 95de80681..690c54ecc 100644 --- a/d2layouts/d2sequence/constants.go +++ b/d2layouts/d2sequence/constants.go @@ -1,21 +1,21 @@ package d2sequence -// leaves at least 25 units of space on the left/right when computing the space required between actors -const HORIZONTAL_PAD = 50. +const HORIZONTAL_PAD = 40. -// leaves at least 25 units of space on the top/bottom when computing the space required between messages -const VERTICAL_PAD = 50. +const VERTICAL_PAD = 20. -const MIN_ACTOR_DISTANCE = 250. +const MIN_ACTOR_DISTANCE = 150. -const MIN_ACTOR_WIDTH = 150. +const MIN_ACTOR_WIDTH = 100. -const SELF_MESSAGE_HORIZONTAL_TRAVEL = 100. +const SELF_MESSAGE_HORIZONTAL_TRAVEL = 74 const GROUP_CONTAINER_PADDING = 24. +const GROUP_LABEL_PADDING = 20 + // min vertical distance between messages -const MIN_MESSAGE_DISTANCE = 80. +const MIN_MESSAGE_DISTANCE = 40. // default size const SPAN_BASE_WIDTH = 12. @@ -24,13 +24,13 @@ const SPAN_BASE_WIDTH = 12. const SPAN_DEPTH_GROWTH_FACTOR = 8. // when a span has a single messages -const MIN_SPAN_HEIGHT = 80. +const MIN_SPAN_HEIGHT = 60. const SPAN_MESSAGE_PAD = 16. const LIFELINE_STROKE_WIDTH int = 2 -const LIFELINE_STROKE_DASH int = 6 +const LIFELINE_STROKE_DASH int = 4 // pad when the actor has the label placed OutsideMiddleBottom so that the lifeline is not so close to the text const LIFELINE_LABEL_PAD = 5. diff --git a/d2layouts/d2sequence/sequence_diagram.go b/d2layouts/d2sequence/sequence_diagram.go index b2cbc5481..46e978cab 100644 --- a/d2layouts/d2sequence/sequence_diagram.go +++ b/d2layouts/d2sequence/sequence_diagram.go @@ -217,11 +217,55 @@ func (sd *sequenceDiagram) placeGroup(group *d2graph.Object) { maxX := math.Inf(-1) maxY := math.Inf(-1) + labelHeight := 0 + if group.LabelHeight != nil { + labelHeight = *group.LabelHeight + } + padBelow := float64(labelHeight + GROUP_LABEL_PADDING) + + // Make sure the label height fits + line := getObjEarliestLineNum(group) + for _, m := range sd.messages { + if getEdgeEarliestLineNum(m) > line { + for _, p := range m.Route { + p.Y += padBelow + } + for _, s := range sd.spans { + if getObjEarliestLineNum(s) >= line { + continue + } + if m.Src == s || m.Dst == s { + s.Height += padBelow + break + } + } + } + } + for _, n := range sd.notes { + if getObjEarliestLineNum(n) > line { + n.TopLeft.Y += padBelow + } + } + for _, s := range sd.spans { + if getObjEarliestLineNum(s) > line { + s.TopLeft.Y += padBelow + } + } + + for _, g := range sd.groups { + if g.Box == nil || g.Box.TopLeft == nil { + continue + } + if getObjEarliestLineNum(g) > line { + g.TopLeft.Y += padBelow + } + } + for _, m := range sd.messages { if m.ContainedBy(group) { for _, p := range m.Route { minX = math.Min(minX, p.X-HORIZONTAL_PAD) - minY = math.Min(minY, p.Y-MIN_MESSAGE_DISTANCE/2.) + minY = math.Min(minY, p.Y-math.Max(MIN_MESSAGE_DISTANCE/2., float64(labelHeight+GROUP_LABEL_PADDING))) maxX = math.Max(maxX, p.X+HORIZONTAL_PAD) maxY = math.Max(maxY, p.Y+MIN_MESSAGE_DISTANCE/2.) } @@ -245,9 +289,9 @@ func (sd *sequenceDiagram) placeGroup(group *d2graph.Object) { } if inGroup { minX = math.Min(minX, n.TopLeft.X-HORIZONTAL_PAD) - minY = math.Min(minY, n.TopLeft.Y-MIN_MESSAGE_DISTANCE/2.) - maxY = math.Max(maxY, n.TopLeft.Y+n.Height+HORIZONTAL_PAD) - maxX = math.Max(maxX, n.TopLeft.X+n.Width+MIN_MESSAGE_DISTANCE/2.) + minY = math.Min(minY, n.TopLeft.Y-math.Max(MIN_MESSAGE_DISTANCE/2., float64(labelHeight+GROUP_LABEL_PADDING))) + maxX = math.Max(maxX, n.TopLeft.X+n.Width+HORIZONTAL_PAD) + maxY = math.Max(maxY, n.TopLeft.Y+n.Height+MIN_MESSAGE_DISTANCE/2.) } } @@ -255,7 +299,7 @@ func (sd *sequenceDiagram) placeGroup(group *d2graph.Object) { for _, g := range sd.groups { if ch == g { minX = math.Min(minX, ch.TopLeft.X-GROUP_CONTAINER_PADDING) - minY = math.Min(minY, ch.TopLeft.Y-GROUP_CONTAINER_PADDING) + minY = math.Min(minY, ch.TopLeft.Y-math.Max(GROUP_CONTAINER_PADDING, float64(labelHeight+GROUP_LABEL_PADDING))) maxX = math.Max(maxX, ch.TopLeft.X+ch.Width+GROUP_CONTAINER_PADDING) maxY = math.Max(maxY, ch.TopLeft.Y+ch.Height+GROUP_CONTAINER_PADDING) break @@ -263,6 +307,17 @@ func (sd *sequenceDiagram) placeGroup(group *d2graph.Object) { } } + // for _, g := range sd.groups { + // if g.Box == nil || g.TopLeft == nil { + // continue + // } + // + // if g.Parent != group.Parent { + // continue + // } + // minY = math.Max(minY, g.TopLeft.Y+g.Height+GROUP_CONTAINER_PADDING) + // } + group.Box = geo.NewBox( geo.NewPoint( minX, From 50281293e70f8f16186baf60dce9685394923f67 Mon Sep 17 00:00:00 2001 From: Alexander Wang Date: Thu, 9 Feb 2023 12:19:33 -0800 Subject: [PATCH 02/14] save --- d2layouts/d2sequence/constants.go | 2 +- d2layouts/d2sequence/sequence_diagram.go | 65 ++---------------------- 2 files changed, 6 insertions(+), 61 deletions(-) diff --git a/d2layouts/d2sequence/constants.go b/d2layouts/d2sequence/constants.go index 690c54ecc..da7e1564d 100644 --- a/d2layouts/d2sequence/constants.go +++ b/d2layouts/d2sequence/constants.go @@ -12,7 +12,7 @@ const SELF_MESSAGE_HORIZONTAL_TRAVEL = 74 const GROUP_CONTAINER_PADDING = 24. -const GROUP_LABEL_PADDING = 20 +const GROUP_LABEL_PADDING = 30 // min vertical distance between messages const MIN_MESSAGE_DISTANCE = 40. diff --git a/d2layouts/d2sequence/sequence_diagram.go b/d2layouts/d2sequence/sequence_diagram.go index 46e978cab..505ca7196 100644 --- a/d2layouts/d2sequence/sequence_diagram.go +++ b/d2layouts/d2sequence/sequence_diagram.go @@ -217,57 +217,13 @@ func (sd *sequenceDiagram) placeGroup(group *d2graph.Object) { maxX := math.Inf(-1) maxY := math.Inf(-1) - labelHeight := 0 - if group.LabelHeight != nil { - labelHeight = *group.LabelHeight - } - padBelow := float64(labelHeight + GROUP_LABEL_PADDING) - - // Make sure the label height fits - line := getObjEarliestLineNum(group) - for _, m := range sd.messages { - if getEdgeEarliestLineNum(m) > line { - for _, p := range m.Route { - p.Y += padBelow - } - for _, s := range sd.spans { - if getObjEarliestLineNum(s) >= line { - continue - } - if m.Src == s || m.Dst == s { - s.Height += padBelow - break - } - } - } - } - for _, n := range sd.notes { - if getObjEarliestLineNum(n) > line { - n.TopLeft.Y += padBelow - } - } - for _, s := range sd.spans { - if getObjEarliestLineNum(s) > line { - s.TopLeft.Y += padBelow - } - } - - for _, g := range sd.groups { - if g.Box == nil || g.Box.TopLeft == nil { - continue - } - if getObjEarliestLineNum(g) > line { - g.TopLeft.Y += padBelow - } - } - for _, m := range sd.messages { if m.ContainedBy(group) { for _, p := range m.Route { minX = math.Min(minX, p.X-HORIZONTAL_PAD) - minY = math.Min(minY, p.Y-math.Max(MIN_MESSAGE_DISTANCE/2., float64(labelHeight+GROUP_LABEL_PADDING))) + minY = math.Min(minY, p.Y-GROUP_LABEL_PADDING) maxX = math.Max(maxX, p.X+HORIZONTAL_PAD) - maxY = math.Max(maxY, p.Y+MIN_MESSAGE_DISTANCE/2.) + maxY = math.Max(maxY, p.Y+GROUP_LABEL_PADDING) } } } @@ -289,9 +245,9 @@ func (sd *sequenceDiagram) placeGroup(group *d2graph.Object) { } if inGroup { minX = math.Min(minX, n.TopLeft.X-HORIZONTAL_PAD) - minY = math.Min(minY, n.TopLeft.Y-math.Max(MIN_MESSAGE_DISTANCE/2., float64(labelHeight+GROUP_LABEL_PADDING))) + minY = math.Min(minY, n.TopLeft.Y-GROUP_LABEL_PADDING) maxX = math.Max(maxX, n.TopLeft.X+n.Width+HORIZONTAL_PAD) - maxY = math.Max(maxY, n.TopLeft.Y+n.Height+MIN_MESSAGE_DISTANCE/2.) + maxY = math.Max(maxY, n.TopLeft.Y+n.Height+GROUP_LABEL_PADDING) } } @@ -299,7 +255,7 @@ func (sd *sequenceDiagram) placeGroup(group *d2graph.Object) { for _, g := range sd.groups { if ch == g { minX = math.Min(minX, ch.TopLeft.X-GROUP_CONTAINER_PADDING) - minY = math.Min(minY, ch.TopLeft.Y-math.Max(GROUP_CONTAINER_PADDING, float64(labelHeight+GROUP_LABEL_PADDING))) + minY = math.Min(minY, ch.TopLeft.Y-GROUP_CONTAINER_PADDING) maxX = math.Max(maxX, ch.TopLeft.X+ch.Width+GROUP_CONTAINER_PADDING) maxY = math.Max(maxY, ch.TopLeft.Y+ch.Height+GROUP_CONTAINER_PADDING) break @@ -307,17 +263,6 @@ func (sd *sequenceDiagram) placeGroup(group *d2graph.Object) { } } - // for _, g := range sd.groups { - // if g.Box == nil || g.TopLeft == nil { - // continue - // } - // - // if g.Parent != group.Parent { - // continue - // } - // minY = math.Max(minY, g.TopLeft.Y+g.Height+GROUP_CONTAINER_PADDING) - // } - group.Box = geo.NewBox( geo.NewPoint( minX, From b02979f7e4d0571950a54059acaf3fa0946cff27 Mon Sep 17 00:00:00 2001 From: Alexander Wang Date: Thu, 9 Feb 2023 19:18:24 -0800 Subject: [PATCH 03/14] revert sequence diagram changes --- d2layouts/d2sequence/constants.go | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/d2layouts/d2sequence/constants.go b/d2layouts/d2sequence/constants.go index da7e1564d..95de80681 100644 --- a/d2layouts/d2sequence/constants.go +++ b/d2layouts/d2sequence/constants.go @@ -1,21 +1,21 @@ package d2sequence -const HORIZONTAL_PAD = 40. +// leaves at least 25 units of space on the left/right when computing the space required between actors +const HORIZONTAL_PAD = 50. -const VERTICAL_PAD = 20. +// leaves at least 25 units of space on the top/bottom when computing the space required between messages +const VERTICAL_PAD = 50. -const MIN_ACTOR_DISTANCE = 150. +const MIN_ACTOR_DISTANCE = 250. -const MIN_ACTOR_WIDTH = 100. +const MIN_ACTOR_WIDTH = 150. -const SELF_MESSAGE_HORIZONTAL_TRAVEL = 74 +const SELF_MESSAGE_HORIZONTAL_TRAVEL = 100. const GROUP_CONTAINER_PADDING = 24. -const GROUP_LABEL_PADDING = 30 - // min vertical distance between messages -const MIN_MESSAGE_DISTANCE = 40. +const MIN_MESSAGE_DISTANCE = 80. // default size const SPAN_BASE_WIDTH = 12. @@ -24,13 +24,13 @@ const SPAN_BASE_WIDTH = 12. const SPAN_DEPTH_GROWTH_FACTOR = 8. // when a span has a single messages -const MIN_SPAN_HEIGHT = 60. +const MIN_SPAN_HEIGHT = 80. const SPAN_MESSAGE_PAD = 16. const LIFELINE_STROKE_WIDTH int = 2 -const LIFELINE_STROKE_DASH int = 4 +const LIFELINE_STROKE_DASH int = 6 // pad when the actor has the label placed OutsideMiddleBottom so that the lifeline is not so close to the text const LIFELINE_LABEL_PAD = 5. From 2fb01f34a5092133ba35dcfd34915d11c5f6d23c Mon Sep 17 00:00:00 2001 From: Alexander Wang Date: Thu, 9 Feb 2023 19:19:40 -0800 Subject: [PATCH 04/14] fix --- d2layouts/d2sequence/sequence_diagram.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/d2layouts/d2sequence/sequence_diagram.go b/d2layouts/d2sequence/sequence_diagram.go index 505ca7196..c1dd1de2a 100644 --- a/d2layouts/d2sequence/sequence_diagram.go +++ b/d2layouts/d2sequence/sequence_diagram.go @@ -221,9 +221,9 @@ func (sd *sequenceDiagram) placeGroup(group *d2graph.Object) { if m.ContainedBy(group) { for _, p := range m.Route { minX = math.Min(minX, p.X-HORIZONTAL_PAD) - minY = math.Min(minY, p.Y-GROUP_LABEL_PADDING) + minY = math.Min(minY, p.Y-MIN_MESSAGE_DISTANCE/2.) maxX = math.Max(maxX, p.X+HORIZONTAL_PAD) - maxY = math.Max(maxY, p.Y+GROUP_LABEL_PADDING) + maxY = math.Max(maxY, p.Y+MIN_MESSAGE_DISTANCE/2.) } } } @@ -245,9 +245,9 @@ func (sd *sequenceDiagram) placeGroup(group *d2graph.Object) { } if inGroup { minX = math.Min(minX, n.TopLeft.X-HORIZONTAL_PAD) - minY = math.Min(minY, n.TopLeft.Y-GROUP_LABEL_PADDING) + minY = math.Min(minY, n.TopLeft.Y-MIN_MESSAGE_DISTANCE/2.) maxX = math.Max(maxX, n.TopLeft.X+n.Width+HORIZONTAL_PAD) - maxY = math.Max(maxY, n.TopLeft.Y+n.Height+GROUP_LABEL_PADDING) + maxY = math.Max(maxY, n.TopLeft.Y+n.Height+MIN_MESSAGE_DISTANCE/2.) } } From dbac4b8cdf9ed8b3f305474d5b31b0c67cf74e4c Mon Sep 17 00:00:00 2001 From: Alexander Wang Date: Thu, 9 Feb 2023 19:29:30 -0800 Subject: [PATCH 05/14] dagre --- d2layouts/d2dagrelayout/layout.go | 6 +- .../dagre/board.exp.json | 76 +- .../dagre/sketch.exp.svg | 8 +- .../dagre/board.exp.json | 88 +- .../dagre/sketch.exp.svg | 14 +- .../dagre_special_ids/dagre/board.exp.json | 20 +- .../dagre_special_ids/dagre/sketch.exp.svg | 6 +- .../elk_alignment/dagre/board.exp.json | 188 +- .../elk_alignment/dagre/sketch.exp.svg | 22 +- .../elk_loop_panic/dagre/board.exp.json | 88 +- .../elk_loop_panic/dagre/sketch.exp.svg | 6 +- .../regression/elk_order/dagre/board.exp.json | 98 +- .../regression/elk_order/dagre/sketch.exp.svg | 14 +- .../empty_sequence/dagre/board.exp.json | 8 +- .../empty_sequence/dagre/sketch.exp.svg | 6 +- .../md_h1_li_li/dagre/board.exp.json | 22 +- .../md_h1_li_li/dagre/sketch.exp.svg | 8 +- .../dagre/board.exp.json | 22 +- .../dagre/sketch.exp.svg | 10 +- .../opacity-on-label/dagre/board.exp.json | 8 +- .../opacity-on-label/dagre/sketch.exp.svg | 8 +- .../dagre/board.exp.json | 106 +- .../dagre/sketch.exp.svg | 14 +- .../dagre/board.exp.json | 24 +- .../dagre/sketch.exp.svg | 6 +- .../dagre/board.exp.json | 22 +- .../dagre/sketch.exp.svg | 28 +- .../sanity/1_to_2/dagre/board.exp.json | 24 +- .../sanity/1_to_2/dagre/sketch.exp.svg | 6 +- .../sanity/basic/dagre/board.exp.json | 8 +- .../sanity/basic/dagre/sketch.exp.svg | 6 +- .../child_to_child/dagre/board.exp.json | 48 +- .../child_to_child/dagre/sketch.exp.svg | 6 +- .../connection_label/dagre/board.exp.json | 8 +- .../connection_label/dagre/sketch.exp.svg | 8 +- .../stable/all_shapes/dagre/board.exp.json | 102 +- .../stable/all_shapes/dagre/sketch.exp.svg | 6 +- .../all_shapes_multiple/dagre/board.exp.json | 102 +- .../all_shapes_multiple/dagre/sketch.exp.svg | 6 +- .../all_shapes_shadow/dagre/board.exp.json | 102 +- .../all_shapes_shadow/dagre/sketch.exp.svg | 6 +- .../stable/animated/dagre/board.exp.json | 88 +- .../stable/animated/dagre/sketch.exp.svg | 8 +- .../arrowhead_adjustment/dagre/board.exp.json | 126 +- .../arrowhead_adjustment/dagre/sketch.exp.svg | 6 +- .../arrowhead_labels/dagre/board.exp.json | 8 +- .../arrowhead_labels/dagre/sketch.exp.svg | 8 +- .../stable/binary_tree/dagre/board.exp.json | 268 +- .../stable/binary_tree/dagre/sketch.exp.svg | 6 +- .../stable/chaos1/dagre/board.exp.json | 52 +- .../stable/chaos1/dagre/sketch.exp.svg | 10 +- .../stable/chaos2/dagre/board.exp.json | 356 +- .../stable/chaos2/dagre/sketch.exp.svg | 22 +- .../child_parent_edges/dagre/board.exp.json | 136 +- .../child_parent_edges/dagre/sketch.exp.svg | 6 +- .../circle_arrowhead/dagre/board.exp.json | 16 +- .../circle_arrowhead/dagre/sketch.exp.svg | 10 +- .../circular_dependency/dagre/board.exp.json | 68 +- .../circular_dependency/dagre/sketch.exp.svg | 6 +- .../stable/code_snippet/dagre/board.exp.json | 22 +- .../stable/code_snippet/dagre/sketch.exp.svg | 8 +- .../complex-layers/dagre/board.exp.json | 36 +- .../connected_container/dagre/board.exp.json | 108 +- .../connected_container/dagre/sketch.exp.svg | 6 +- .../constant_near_stress/dagre/board.exp.json | 18 +- .../constant_near_stress/dagre/sketch.exp.svg | 8 +- .../constant_near_title/dagre/board.exp.json | 104 +- .../constant_near_title/dagre/sketch.exp.svg | 8 +- .../container_edges/dagre/board.exp.json | 138 +- .../container_edges/dagre/sketch.exp.svg | 6 +- .../crow_foot_arrowhead/dagre/board.exp.json | 44 +- .../crow_foot_arrowhead/dagre/sketch.exp.svg | 6 +- .../stable/dense/dagre/board.exp.json | 588 ++-- .../stable/dense/dagre/sketch.exp.svg | 6 +- .../different_subgraphs/dagre/board.exp.json | 292 +- .../different_subgraphs/dagre/sketch.exp.svg | 6 +- .../stable/direction/dagre/board.exp.json | 268 +- .../stable/direction/dagre/sketch.exp.svg | 6 +- .../stable/font_colors/dagre/board.exp.json | 8 +- .../stable/font_colors/dagre/sketch.exp.svg | 8 +- .../stable/font_sizes/dagre/board.exp.json | 24 +- .../stable/font_sizes/dagre/sketch.exp.svg | 12 +- .../giant_markdown_test/dagre/board.exp.json | 22 +- .../giant_markdown_test/dagre/sketch.exp.svg | 8 +- .../testdata/stable/hr/dagre/board.exp.json | 22 +- .../testdata/stable/hr/dagre/sketch.exp.svg | 8 +- .../stable/images/dagre/board.exp.json | 8 +- .../stable/images/dagre/sketch.exp.svg | 6 +- .../stable/investigate/dagre/board.exp.json | 1302 +++---- .../stable/investigate/dagre/sketch.exp.svg | 18 +- .../stable/investigate/elk/board.exp.json | 408 ++- .../stable/investigate/elk/sketch.exp.svg | 18 +- .../stable/large_arch/dagre/board.exp.json | 880 ++--- .../stable/large_arch/dagre/sketch.exp.svg | 6 +- .../stable/latex/dagre/board.exp.json | 72 +- .../stable/latex/dagre/sketch.exp.svg | 8 +- .../testdata/stable/li1/dagre/board.exp.json | 22 +- .../testdata/stable/li1/dagre/sketch.exp.svg | 8 +- .../testdata/stable/li2/dagre/board.exp.json | 22 +- .../testdata/stable/li2/dagre/sketch.exp.svg | 8 +- .../testdata/stable/li3/dagre/board.exp.json | 22 +- .../testdata/stable/li3/dagre/sketch.exp.svg | 8 +- .../testdata/stable/li4/dagre/board.exp.json | 22 +- .../testdata/stable/li4/dagre/sketch.exp.svg | 8 +- .../stable/links/dagre/board.exp.json | 8 +- .../stable/links/dagre/sketch.exp.svg | 10 +- .../stable/lone_h1/dagre/board.exp.json | 22 +- .../stable/lone_h1/dagre/sketch.exp.svg | 8 +- .../stable/markdown/dagre/board.exp.json | 22 +- .../stable/markdown/dagre/sketch.exp.svg | 8 +- .../markdown_stroke_fill/dagre/board.exp.json | 30 +- .../markdown_stroke_fill/dagre/sketch.exp.svg | 10 +- .../md_2space_newline/dagre/board.exp.json | 8 +- .../md_2space_newline/dagre/sketch.exp.svg | 8 +- .../md_backslash_newline/dagre/board.exp.json | 8 +- .../md_backslash_newline/dagre/sketch.exp.svg | 8 +- .../md_code_block_fenced/dagre/board.exp.json | 22 +- .../md_code_block_fenced/dagre/sketch.exp.svg | 8 +- .../dagre/board.exp.json | 22 +- .../dagre/sketch.exp.svg | 8 +- .../md_code_inline/dagre/board.exp.json | 22 +- .../md_code_inline/dagre/sketch.exp.svg | 8 +- .../multiple_trees/dagre/board.exp.json | 458 +-- .../multiple_trees/dagre/sketch.exp.svg | 6 +- .../stable/n22_e32/dagre/board.exp.json | 1036 +++--- .../stable/n22_e32/dagre/sketch.exp.svg | 6 +- .../number_connections/dagre/board.exp.json | 16 +- .../number_connections/dagre/sketch.exp.svg | 6 +- .../one_container_loop/dagre/board.exp.json | 270 +- .../one_container_loop/dagre/sketch.exp.svg | 6 +- .../dagre/board.exp.json | 132 +- .../dagre/sketch.exp.svg | 6 +- .../dagre/board.exp.json | 178 +- .../dagre/sketch.exp.svg | 18 +- .../testdata/stable/p/dagre/board.exp.json | 22 +- .../testdata/stable/p/dagre/sketch.exp.svg | 8 +- .../testdata/stable/pre/dagre/board.exp.json | 22 +- .../testdata/stable/pre/dagre/sketch.exp.svg | 8 +- .../self-referencing/dagre/board.exp.json | 138 +- .../self-referencing/dagre/sketch.exp.svg | 8 +- .../dagre/board.exp.json | 6 +- .../dagre/sketch.exp.svg | 6 +- .../elk/board.exp.json | 6 +- .../elk/sketch.exp.svg | 6 +- .../sequence_diagrams/dagre/board.exp.json | 686 ++-- .../sequence_diagrams/dagre/sketch.exp.svg | 54 +- .../dagre/board.exp.json | 8 +- .../dagre/sketch.exp.svg | 10 +- .../stable/sql_tables/dagre/board.exp.json | 20 +- .../stable/sql_tables/dagre/sketch.exp.svg | 20 +- .../stable/square_3d/dagre/board.exp.json | 8 +- .../stable/square_3d/dagre/sketch.exp.svg | 10 +- .../dagre/board.exp.json | 534 +-- .../dagre/sketch.exp.svg | 6 +- .../stable/stylish/dagre/board.exp.json | 8 +- .../stable/stylish/dagre/sketch.exp.svg | 12 +- .../text_font_sizes/dagre/board.exp.json | 22 +- .../text_font_sizes/dagre/sketch.exp.svg | 6 +- .../stable/tooltips/dagre/board.exp.json | 8 +- .../stable/tooltips/dagre/sketch.exp.svg | 8 +- .../unnamed_only_height/dagre/board.exp.json | 52 +- .../unnamed_only_height/dagre/sketch.exp.svg | 28 +- .../unnamed_only_width/dagre/board.exp.json | 42 +- .../unnamed_only_width/dagre/sketch.exp.svg | 28 +- .../stable/us_map/dagre/board.exp.json | 3040 ++++++++--------- .../stable/us_map/dagre/sketch.exp.svg | 6 +- .../testdata/stable/us_map/elk/board.exp.json | 1378 ++++---- .../testdata/stable/us_map/elk/sketch.exp.svg | 6 +- .../container_child_edge/dagre/board.exp.json | 44 +- .../container_child_edge/dagre/sketch.exp.svg | 10 +- .../dagre/board.exp.json | 32 +- .../dagre/sketch.exp.svg | 6 +- .../font_sizes_large/dagre/board.exp.json | 38 +- .../font_sizes_large/dagre/sketch.exp.svg | 14 +- .../dagre/board.exp.json | 214 +- .../dagre/sketch.exp.svg | 56 +- .../todo/tall_edge_label/dagre/board.exp.json | 8 +- .../todo/tall_edge_label/dagre/sketch.exp.svg | 8 +- 178 files changed, 8115 insertions(+), 8123 deletions(-) diff --git a/d2layouts/d2dagrelayout/layout.go b/d2layouts/d2dagrelayout/layout.go index 201509cee..5826aa603 100644 --- a/d2layouts/d2dagrelayout/layout.go +++ b/d2layouts/d2dagrelayout/layout.go @@ -32,7 +32,7 @@ var dagreJS string const ( MIN_SEGMENT_LEN = 10 - MIN_RANK_SEP = 100 + MIN_RANK_SEP = 80 ) type ConfigurableOpts struct { @@ -42,7 +42,7 @@ type ConfigurableOpts struct { var DefaultOpts = ConfigurableOpts{ NodeSep: 60, - EdgeSep: 40, + EdgeSep: 20, } type DagreNode struct { @@ -115,7 +115,7 @@ func Layout(ctx context.Context, g *d2graph.Graph, opts *ConfigurableOpts) (err } maxLabelSize = go2.Max(maxLabelSize, size) } - rootAttrs.ranksep = go2.Max(MIN_RANK_SEP, maxLabelSize+40) + rootAttrs.ranksep = go2.Max(MIN_RANK_SEP, maxLabelSize+20) configJS := setGraphAttrs(rootAttrs) if _, err := vm.RunString(configJS); err != nil { diff --git a/e2etests/testdata/regression/dagre_broken_arrowhead/dagre/board.exp.json b/e2etests/testdata/regression/dagre_broken_arrowhead/dagre/board.exp.json index 8bcbbde44..b2afe756e 100644 --- a/e2etests/testdata/regression/dagre_broken_arrowhead/dagre/board.exp.json +++ b/e2etests/testdata/regression/dagre_broken_arrowhead/dagre/board.exp.json @@ -9,8 +9,8 @@ "x": 0, "y": 0 }, - "width": 425, - "height": 528, + "width": 358, + "height": 468, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, @@ -47,8 +47,8 @@ "id": "a.b", "type": "rectangle", "pos": { - "x": 94, - "y": 55 + "x": 40, + "y": 45 }, "width": 53, "height": 66, @@ -88,11 +88,11 @@ "id": "a.c", "type": "rectangle", "pos": { - "x": 40, - "y": 299 + "x": 23, + "y": 269 }, - "width": 345, - "height": 175, + "width": 298, + "height": 155, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, @@ -129,8 +129,8 @@ "id": "a.1", "type": "rectangle", "pos": { - "x": 207, - "y": 55 + "x": 153, + "y": 45 }, "width": 52, "height": 66, @@ -170,8 +170,8 @@ "id": "a.2", "type": "rectangle", "pos": { - "x": 319, - "y": 55 + "x": 265, + "y": 45 }, "width": 53, "height": 66, @@ -211,8 +211,8 @@ "id": "a.c.d", "type": "rectangle", "pos": { - "x": 206, - "y": 353 + "x": 152, + "y": 313 }, "width": 54, "height": 66, @@ -276,20 +276,20 @@ "labelPercentage": 0, "route": [ { - "x": 120, - "y": 121.5 + "x": 66.5, + "y": 111.5 }, { - "x": 120, - "y": 191.9 + "x": 66.5, + "y": 173.9 }, { - "x": 120, - "y": 227.5 + "x": 66.5, + "y": 205.5 }, { - "x": 120, - "y": 299.5 + "x": 66.5, + "y": 269.5 } ], "isCurve": true, @@ -324,20 +324,20 @@ "labelPercentage": 0, "route": [ { - "x": 232.5, - "y": 121.5 + "x": 179, + "y": 111.5 }, { - "x": 232.5, - "y": 191.9 + "x": 179, + "y": 173.9 }, { - "x": 232.5, - "y": 227.5 + "x": 179, + "y": 205.5 }, { - "x": 232.5, - "y": 299.5 + "x": 179, + "y": 269.5 } ], "isCurve": true, @@ -372,20 +372,20 @@ "labelPercentage": 0, "route": [ { - "x": 345, - "y": 121.5 + "x": 291.5, + "y": 111.5 }, { - "x": 345, - "y": 191.9 + "x": 291.5, + "y": 173.9 }, { - "x": 345, - "y": 227.5 + "x": 291.5, + "y": 205.5 }, { - "x": 345, - "y": 299.5 + "x": 291.5, + "y": 269.5 } ], "isCurve": true, diff --git a/e2etests/testdata/regression/dagre_broken_arrowhead/dagre/sketch.exp.svg b/e2etests/testdata/regression/dagre_broken_arrowhead/dagre/sketch.exp.svg index 50d166f55..31af2ce5b 100644 --- a/e2etests/testdata/regression/dagre_broken_arrowhead/dagre/sketch.exp.svg +++ b/e2etests/testdata/regression/dagre_broken_arrowhead/dagre/sketch.exp.svg @@ -3,7 +3,7 @@ id="d2-svg" style="background: white;" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" -width="629" height="732" viewBox="-102 -102 629 732">

Oldest message

-

Offset

-

Last message

-

Next message will be
+

Oldest message

+

Offset

+

Last message

+

Next message will be
inserted here

-
M0M1M2M3M4M5M6 - +
M0M1M2M3M4M5M6 +

hey

+

hey

  • they
      @@ -804,8 +804,8 @@ width="299" height="651" viewBox="-102 -102 299 651">x

      linux: because a PC is a terrible thing to waste

      -
      a You don't have to know how the computer works,just how to work the computer. - - +
a You don't have to know how the computer works,just how to work the computer. + + aabbllmmnnoocciikkddgghhjjeeff1122 334455667788 - - - - - - - - - +aabbllmmnnoocciikkddgghhjjeeff1122 334455667788 + + + + + + + + + xyThe top of the mountain

Cats, no less liquid than their shadows, offer no angles to the wind.

+xyThe top of the mountain

Cats, no less liquid than their shadows, offer no angles to the wind.

If we can't fix it, it ain't broke.

Dieters live life in the fasting lane.

-
JoeDonaldi am top lefti am top righti am bottom lefti am bottom right - +
JoeDonaldi am top lefti am top righti am bottom lefti am bottom right + poll the peopleresultsunfavorablefavorablewill of the people

A winning strategy

-
- +poll the peopleresultsunfavorablefavorablewill of the people

A winning strategy

+
+

Markdown: Syntax

+

Markdown: Syntax

  • Overview
      @@ -1053,8 +1053,8 @@ title for the link, surrounded in quotes. For example:

      Code

      Unlike a pre-formatted code block, a code span indicates code within a normal paragraph. For example:

      -
ab - +
ab +

Note: This document is itself written using Markdown; you +

Note: This document is itself written using Markdown; you can see the source for it by adding '.text' to the URL.


Overview

-
ab - +
ab + mixed togethersugarsolution we get - - +mixed togethersugarsolution we get + +
    +
    • Overview
      • Philosophy
      • @@ -808,8 +808,8 @@ width="583" height="636" viewBox="-102 -102 583 636">
          +
          • Overview ok this is all measured
            • Philosophy
            • @@ -804,8 +804,8 @@ width="449" height="612" viewBox="-102 -102 449 612">
                +
                • Overview
                  • Philosophy
                  • @@ -829,8 +829,8 @@ width="551" height="1048" viewBox="-102 -102 551 1048">

                    List items may consist of multiple paragraphs. Each subsequent +

                    List items may consist of multiple paragraphs. Each subsequent paragraph in a list item must be indented by either 4 spaces or one tab:

                      @@ -827,8 +827,8 @@ sit amet, consectetuer adipiscing elit.

                      Another item in the same list.

                  -
                ab - +
              ab +

              Markdown: Syntax

              -
              ab - +

              Markdown: Syntax

              +
              ab +

              Every frustum longs to be a cone

              +

              Every frustum longs to be a cone

              • A continuing flow of paper is sufficient to continue the flow of paper
              • Please remain calm, it's no use both of us being hysterical at the same time
              • Visits always give pleasure: if not on arrival, then on the departure

              Festivity Level 1: Your guests are chatting amiably with each other.

              -
              xy - +
              xy + container

              they did it in style

              -

              a header

              +container

              they did it in style

              +

              a header

              a line of text and an

              {
               	indented: "block",
              @@ -805,8 +805,8 @@ width="516" height="686" viewBox="-102 -102 516 686">markdown

              Lorem ipsum dolor sit amet, consectetur adipiscing elit,
              +markdown

              Lorem ipsum dolor sit amet, consectetur adipiscing elit,
              sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

              -
              - +
              + markdown

              Lorem ipsum dolor sit amet, consectetur adipiscing elit,
              +markdown

              Lorem ipsum dolor sit amet, consectetur adipiscing elit,
              sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

              -
              - +
              +
              {
              +
              {
               	fenced: "block",
               	of: "json",
               }
               
              -
              ab - +
              ab +

              a line of text and an

              +

              a line of text and an

              {
               	indented: "block",
               	of: "json",
               }
               
              -
              ab - +
              ab +

              code

              -
              ab - +

              code

              +
              ab +

              A paragraph is simply one or more consecutive lines of text, separated +

              A paragraph is simply one or more consecutive lines of text, separated by one or more blank lines. (A blank line is any line that looks like a blank line -- a line containing nothing but spaces or tabs is considered blank.) Normal paragraphs should not be indented with spaces or tabs.

              -
              ab - +
              ab +

              Here is an example of AppleScript:

              +

              Here is an example of AppleScript:

              tell application "Foo"
                   beep
               end tell
               

              A code block continues until it reaches a line that is not indented (or the end of the article).

              -
              ab - +
              ab + bearmama bearpapa bear - +bearmama bearpapa bear + containerscloudtall cylinderclass- -num -int- -timeout -int- -pid -+ -getStatus() -Enum+ -getJobs() -Job[]+ -setTimeout(seconds int) -voidusersid -int -name -string -email -string -password -string -last_login -datetime -container

              markdown text expanded to 800x400

              -
              := 5 +containerscloudtall cylinderclass- +num +int- +timeout +int- +pid ++ +getStatus() +Enum+ +getJobs() +Job[]+ +setTimeout(seconds int) +voidusersid +int +name +string +email +string +password +string +last_login +datetime +container

              markdown text expanded to 800x400

              +
              := 5 := a + 7 -fmt.Printf("%d", b):= 5 +fmt.Printf("%d", b):= 5 := a + 7 -fmt.Printf("%d", b)circle containerdiamond containeroval containerhexagon containerdiamondcirclehexagonoval - +
              fmt.Printf("%d", b)
              circle containerdiamond containeroval containerhexagon containerdiamondcirclehexagonoval +

              Oldest message

              -

              Offset

              -

              Last message

              -

              Next message will be
              +

              Oldest message

              +

              Offset

              +

              Last message

              +

              Next message will be
              inserted here

              -
              M0M1M2M3M4M5M6 - +
              M0M1M2M3M4M5M6 +

              hey

              +

              hey

              • they
                  @@ -804,8 +804,8 @@ width="299" height="651" viewBox="-90 -90 299 651">x

                  linux: because a PC is a terrible thing to waste

                  -
                  a You don't have to know how the computer works,just how to work the computer. - - +
              a You don't have to know how the computer works,just how to work the computer. + + aabbllmmnnoocciikkddgghhjjeeff1122 334455667788 - - - - - - - - - +aabbllmmnnoocciikkddgghhjjeeff1122 334455667788 + + + + + + + + + xyThe top of the mountain

              Cats, no less liquid than their shadows, offer no angles to the wind.

              +xyThe top of the mountain

              Cats, no less liquid than their shadows, offer no angles to the wind.

              If we can't fix it, it ain't broke.

              Dieters live life in the fasting lane.

              -
              JoeDonaldi am top lefti am top righti am bottom lefti am bottom right - +
              JoeDonaldi am top lefti am top righti am bottom lefti am bottom right + poll the peopleresultsunfavorablefavorablewill of the people

              A winning strategy

              -
              - +poll the peopleresultsunfavorablefavorablewill of the people

              A winning strategy

              +
              +

              Markdown: Syntax

              +

              Markdown: Syntax

              • Overview
                  @@ -1053,8 +1053,8 @@ title for the link, surrounded in quotes. For example:

                  Code

                  Unlike a pre-formatted code block, a code span indicates code within a normal paragraph. For example:

                  -
              ab - +
              ab +

              Note: This document is itself written using Markdown; you +

              Note: This document is itself written using Markdown; you can see the source for it by adding '.text' to the URL.


              Overview

              -
              ab - +
              ab + mixed togethersugarsolution we get - - +mixed togethersugarsolution we get + +
                +
                • Overview
                  • Philosophy
                  • @@ -808,8 +808,8 @@ width="583" height="636" viewBox="-90 -90 583 636">
                      +
                      • Overview ok this is all measured
                        • Philosophy
                        • @@ -804,8 +804,8 @@ width="449" height="612" viewBox="-90 -90 449 612">
                            +
                            • Overview
                              • Philosophy
                              • @@ -829,8 +829,8 @@ width="551" height="1048" viewBox="-90 -90 551 1048">

                                List items may consist of multiple paragraphs. Each subsequent +

                                List items may consist of multiple paragraphs. Each subsequent paragraph in a list item must be indented by either 4 spaces or one tab:

                                  @@ -827,8 +827,8 @@ sit amet, consectetuer adipiscing elit.

                                  Another item in the same list.

                              -
                            ab - +
                          ab +

                          Markdown: Syntax

                          -
                          ab - +

                          Markdown: Syntax

                          +
                          ab +

                          Every frustum longs to be a cone

                          +

                          Every frustum longs to be a cone

                          • A continuing flow of paper is sufficient to continue the flow of paper
                          • Please remain calm, it's no use both of us being hysterical at the same time
                          • Visits always give pleasure: if not on arrival, then on the departure

                          Festivity Level 1: Your guests are chatting amiably with each other.

                          -
                          xy - +
                          xy + container

                          they did it in style

                          -

                          a header

                          +container

                          they did it in style

                          +

                          a header

                          a line of text and an

                          {
                           	indented: "block",
                          @@ -805,8 +805,8 @@ width="566" height="736" viewBox="-90 -90 566 736">markdown

                          Lorem ipsum dolor sit amet, consectetur adipiscing elit,
                          +markdown

                          Lorem ipsum dolor sit amet, consectetur adipiscing elit,
                          sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

                          -
                          - +
                          + markdown

                          Lorem ipsum dolor sit amet, consectetur adipiscing elit,
                          +markdown

                          Lorem ipsum dolor sit amet, consectetur adipiscing elit,
                          sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

                          -
                          - +
                          +
                          {
                          +
                          {
                           	fenced: "block",
                           	of: "json",
                           }
                           
                          -
                          ab - +
                          ab +

                          a line of text and an

                          +

                          a line of text and an

                          {
                           	indented: "block",
                           	of: "json",
                           }
                           
                          -
                          ab - +
                          ab +

                          code

                          -
                          ab - +

                          code

                          +
                          ab +

                          A paragraph is simply one or more consecutive lines of text, separated +

                          A paragraph is simply one or more consecutive lines of text, separated by one or more blank lines. (A blank line is any line that looks like a blank line -- a line containing nothing but spaces or tabs is considered blank.) Normal paragraphs should not be indented with spaces or tabs.

                          -
                          ab - +
                          ab +

                          Here is an example of AppleScript:

                          +

                          Here is an example of AppleScript:

                          tell application "Foo"
                               beep
                           end tell
                           

                          A code block continues until it reaches a line that is not indented (or the end of the article).

                          -
                          ab - +
                          ab + bearmama bearpapa bear - +bearmama bearpapa bear + containerscloudtall cylinderclass- -num -int- -timeout -int- -pid -+ -getStatus() -Enum+ -getJobs() -Job[]+ -setTimeout(seconds int) -voidusersid -int -name -string -email -string -password -string -last_login -datetime -container

                          markdown text expanded to 800x400

                          -
                          := 5 +containerscloudtall cylinderclass- +num +int- +timeout +int- +pid ++ +getStatus() +Enum+ +getJobs() +Job[]+ +setTimeout(seconds int) +voidusersid +int +name +string +email +string +password +string +last_login +datetime +container

                          markdown text expanded to 800x400

                          +
                          := 5 := a + 7 -fmt.Printf("%d", b):= 5 +fmt.Printf("%d", b):= 5 := a + 7 -fmt.Printf("%d", b)circle containerdiamond containeroval containerhexagon containerdiamondcirclehexagonoval - +
                          fmt.Printf("%d", b)
                          circle containerdiamond containeroval containerhexagon containerdiamondcirclehexagonoval +

                          hey

                          +

                          hey

                          • they
                              @@ -804,8 +804,8 @@ width="299" height="571" viewBox="-90 -90 299 571">x

                              linux: because a PC is a terrible thing to waste

                              -
                              a You don't have to know how the computer works,just how to work the computer. - - +
                          a You don't have to know how the computer works,just how to work the computer. + + aabbllmmnnoocciikkddgghhjjeeff1122 334455667788 - - - +aabbllmmnnoocciikkddgghhjjeeff1122 334455667788 + + + - - + + xyThe top of the mountain

                          Cats, no less liquid than their shadows, offer no angles to the wind.

                          +xyThe top of the mountain

                          Cats, no less liquid than their shadows, offer no angles to the wind.

                          If we can't fix it, it ain't broke.

                          Dieters live life in the fasting lane.

                          -
                          JoeDonaldi am top lefti am top righti am bottom lefti am bottom right - +
                          JoeDonaldi am top lefti am top righti am bottom lefti am bottom right + poll the peopleresultsunfavorablefavorablewill of the people

                          A winning strategy

                          -
                          - +poll the peopleresultsunfavorablefavorablewill of the people

                          A winning strategy

                          +
                          +

                          Markdown: Syntax

                          +

                          Markdown: Syntax

                          • Overview
                              @@ -1053,8 +1053,8 @@ title for the link, surrounded in quotes. For example:

                              Code

                              Unlike a pre-formatted code block, a code span indicates code within a normal paragraph. For example:

                              -
                          ab - +
                          ab +

                          Note: This document is itself written using Markdown; you +

                          Note: This document is itself written using Markdown; you can see the source for it by adding '.text' to the URL.


                          Overview

                          -
                          ab - +
                          ab + mixed togethersugarsolution we get - - +mixed togethersugarsolution we get + +
                            +
                            • Overview
                              • Philosophy
                              • @@ -808,8 +808,8 @@ width="583" height="556" viewBox="-90 -90 583 556">
                                  +
                                  • Overview ok this is all measured
                                    • Philosophy
                                    • @@ -804,8 +804,8 @@ width="449" height="532" viewBox="-90 -90 449 532">
                                        +
                                        • Overview
                                          • Philosophy
                                          • @@ -829,8 +829,8 @@ width="551" height="968" viewBox="-90 -90 551 968">

                                            List items may consist of multiple paragraphs. Each subsequent +

                                            List items may consist of multiple paragraphs. Each subsequent paragraph in a list item must be indented by either 4 spaces or one tab:

                                              @@ -827,8 +827,8 @@ sit amet, consectetuer adipiscing elit.

                                              Another item in the same list.

                                          -
                                        ab - +
                                      ab +

                                      Markdown: Syntax

                                      -
                                      ab - +

                                      Markdown: Syntax

                                      +
                                      ab +

                                      Every frustum longs to be a cone

                                      +

                                      Every frustum longs to be a cone

                                      • A continuing flow of paper is sufficient to continue the flow of paper
                                      • Please remain calm, it's no use both of us being hysterical at the same time
                                      • Visits always give pleasure: if not on arrival, then on the departure

                                      Festivity Level 1: Your guests are chatting amiably with each other.

                                      -
                                      xy - +
                                      xy + container

                                      they did it in style

                                      +container

                                      they did it in style

                                      a header

                                      a line of text and an

                                      {
                                      @@ -805,8 +805,8 @@ width="516" height="646" viewBox="-90 -90 516 646">
                                      {
                                      +
                                      {
                                       	fenced: "block",
                                       	of: "json",
                                       }
                                       
                                      -
                                      ab - +
                                      ab +

                                      a line of text and an

                                      +

                                      a line of text and an

                                      {
                                       	indented: "block",
                                       	of: "json",
                                       }
                                       
                                      -
                                      ab - +
                                      ab +

                                      code

                                      -
                                      ab - +

                                      code

                                      +
                                      ab +

                                      A paragraph is simply one or more consecutive lines of text, separated +

                                      A paragraph is simply one or more consecutive lines of text, separated by one or more blank lines. (A blank line is any line that looks like a blank line -- a line containing nothing but spaces or tabs is considered blank.) Normal paragraphs should not be indented with spaces or tabs.

                                      -
                                      ab - +
                                      ab +

                                      Here is an example of AppleScript:

                                      +

                                      Here is an example of AppleScript:

                                      tell application "Foo"
                                           beep
                                       end tell
                                       

                                      A code block continues until it reaches a line that is not indented (or the end of the article).

                                      -
                                      ab - +
                                      ab + containerscloudtall cylinderclass- -num -int- -timeout -int- -pid -+ -getStatus() -Enum+ -getJobs() -Job[]+ -setTimeout(seconds int) -voidusersid -int -name -string -email -string -password -string -last_login -datetime -container

                                      markdown text expanded to 800x400

                                      -
                                      := 5 +containerscloudtall cylinderclass- +num +int- +timeout +int- +pid ++ +getStatus() +Enum+ +getJobs() +Job[]+ +setTimeout(seconds int) +voidusersid +int +name +string +email +string +password +string +last_login +datetime +container

                                      markdown text expanded to 800x400

                                      +
                                      := 5 := a + 7 -fmt.Printf("%d", b):= 5 +fmt.Printf("%d", b):= 5 := a + 7 -fmt.Printf("%d", b)circle containerdiamond containeroval containerhexagon containerdiamondcirclehexagonoval - +
                                      fmt.Printf("%d", b)
                                      circle containerdiamond containeroval containerhexagon containerdiamondcirclehexagonoval +

                                      Oldest message

                                      -

                                      Offset

                                      -

                                      Last message

                                      -

                                      Next message will be
                                      +

                                      Oldest message

                                      +

                                      Offset

                                      +

                                      Last message

                                      +

                                      Next message will be
                                      inserted here

                                      -
                                      M0M1M2M3M4M5M6 - +
                                      M0M1M2M3M4M5M6 +

                                      Oldest message

                                      -

                                      Offset

                                      -

                                      Last message

                                      -

                                      Next message will be
                                      +

                                      Oldest message

                                      +

                                      Offset

                                      +

                                      Last message

                                      +

                                      Next message will be
                                      inserted here

                                      -
                                      M0M1M2M3M4M5M6 - +
                                      M0M1M2M3M4M5M6 +

                                      hey

                                      +

                                      hey

                                      • they
                                          @@ -804,8 +804,8 @@ width="299" height="611" viewBox="-102 -102 299 611">

                                          hey

                                          +

                                          hey

                                          • they
                                              @@ -804,8 +804,8 @@ width="299" height="591" viewBox="-90 -90 299 591">x

                                              linux: because a PC is a terrible thing to waste

                                              -
                                              a You don't have to know how the computer works,just how to work the computer. - - +
                                          a You don't have to know how the computer works,just how to work the computer. + + x

                                          linux: because a PC is a terrible thing to waste

                                          -
                                          a You don't have to know how the computer works,just how to work the computer. - - +
                                          a You don't have to know how the computer works,just how to work the computer. + + aabbllmmnnoocciikkddgghhjjeeff1122 334455667788 - - - - - - - - - +aabbllmmnnoocciikkddgghhjjeeff1122 334455667788 + + + + + + + + + aabbllmmnnoocciikkddgghhjjeeff1122 334455667788 - - - - - - - - - +aabbllmmnnoocciikkddgghhjjeeff1122 334455667788 + + + + + + + + + xyThe top of the mountain

                                          Cats, no less liquid than their shadows, offer no angles to the wind.

                                          +xyThe top of the mountain

                                          Cats, no less liquid than their shadows, offer no angles to the wind.

                                          If we can't fix it, it ain't broke.

                                          Dieters live life in the fasting lane.

                                          -
                                          JoeDonaldi am top lefti am top righti am bottom lefti am bottom right - +
                                          JoeDonaldi am top lefti am top righti am bottom lefti am bottom right + xyThe top of the mountain

                                          Cats, no less liquid than their shadows, offer no angles to the wind.

                                          +xyThe top of the mountain

                                          Cats, no less liquid than their shadows, offer no angles to the wind.

                                          If we can't fix it, it ain't broke.

                                          Dieters live life in the fasting lane.

                                          -
                                          JoeDonaldi am top lefti am top righti am bottom lefti am bottom right - +
                                          JoeDonaldi am top lefti am top righti am bottom lefti am bottom right + poll the peopleresultsunfavorablefavorablewill of the people

                                          A winning strategy

                                          -
                                          - +poll the peopleresultsunfavorablefavorablewill of the people

                                          A winning strategy

                                          +
                                          + poll the peopleresultsunfavorablefavorablewill of the people

                                          A winning strategy

                                          -
                                          - +poll the peopleresultsunfavorablefavorablewill of the people

                                          A winning strategy

                                          +
                                          +

                                          Markdown: Syntax

                                          +

                                          Markdown: Syntax

                                          • Overview
                                              @@ -1053,8 +1053,8 @@ title for the link, surrounded in quotes. For example:

                                              Code

                                              Unlike a pre-formatted code block, a code span indicates code within a normal paragraph. For example:

                                              -
                                          ab - +
                                          ab +

                                          Markdown: Syntax

                                          +

                                          Markdown: Syntax

                                          • Overview
                                              @@ -1053,8 +1053,8 @@ title for the link, surrounded in quotes. For example:

                                              Code

                                              Unlike a pre-formatted code block, a code span indicates code within a normal paragraph. For example:

                                              -
                                          ab - +
                                          ab +

                                          Note: This document is itself written using Markdown; you +

                                          Note: This document is itself written using Markdown; you can see the source for it by adding '.text' to the URL.


                                          Overview

                                          -
                                          ab - +
                                          ab +

                                          Note: This document is itself written using Markdown; you +

                                          Note: This document is itself written using Markdown; you can see the source for it by adding '.text' to the URL.


                                          Overview

                                          -
                                          ab - +
                                          ab + mixed togethersugarsolution we get - - +mixed togethersugarsolution we get + + mixed togethersugarsolution we get - - +mixed togethersugarsolution we get + +
                                            +
                                            • Overview
                                              • Philosophy
                                              • @@ -808,8 +808,8 @@ width="583" height="596" viewBox="-102 -102 583 596">
                                                  +
                                                  • Overview
                                                    • Philosophy
                                                    • @@ -808,8 +808,8 @@ width="583" height="576" viewBox="-90 -90 583 576">
                                                        +
                                                        • Overview ok this is all measured
                                                          • Philosophy
                                                          • @@ -804,8 +804,8 @@ width="449" height="572" viewBox="-102 -102 449 572">
                                                              +
                                                              • Overview ok this is all measured
                                                                • Philosophy
                                                                • @@ -804,8 +804,8 @@ width="449" height="552" viewBox="-90 -90 449 552">
                                                                    +
                                                                    • Overview
                                                                      • Philosophy
                                                                      • @@ -829,8 +829,8 @@ width="551" height="1008" viewBox="-102 -102 551 1008">
                                                                          +
                                                                          • Overview
                                                                            • Philosophy
                                                                            • @@ -829,8 +829,8 @@ width="551" height="988" viewBox="-90 -90 551 988">

                                                                              List items may consist of multiple paragraphs. Each subsequent +

                                                                              List items may consist of multiple paragraphs. Each subsequent paragraph in a list item must be indented by either 4 spaces or one tab:

                                                                                @@ -827,8 +827,8 @@ sit amet, consectetuer adipiscing elit.

                                                                                Another item in the same list.

                                                                            -
                                                                          ab - +
                                                                        ab +

                                                                        List items may consist of multiple paragraphs. Each subsequent +

                                                                        List items may consist of multiple paragraphs. Each subsequent paragraph in a list item must be indented by either 4 spaces or one tab:

                                                                          @@ -827,8 +827,8 @@ sit amet, consectetuer adipiscing elit.

                                                                          Another item in the same list.

                                                                      -
                                                                    ab - +
                                                                  ab +

                                                                  Markdown: Syntax

                                                                  -
                                                                  ab - +

                                                                  Markdown: Syntax

                                                                  +
                                                                  ab +

                                                                  Markdown: Syntax

                                                                  -
                                                                  ab - +

                                                                  Markdown: Syntax

                                                                  +
                                                                  ab +

                                                                  Every frustum longs to be a cone

                                                                  +

                                                                  Every frustum longs to be a cone

                                                                  • A continuing flow of paper is sufficient to continue the flow of paper
                                                                  • Please remain calm, it's no use both of us being hysterical at the same time
                                                                  • Visits always give pleasure: if not on arrival, then on the departure

                                                                  Festivity Level 1: Your guests are chatting amiably with each other.

                                                                  -
                                                                  xy - +
                                                                  xy +

                                                                  Every frustum longs to be a cone

                                                                  +

                                                                  Every frustum longs to be a cone

                                                                  • A continuing flow of paper is sufficient to continue the flow of paper
                                                                  • Please remain calm, it's no use both of us being hysterical at the same time
                                                                  • Visits always give pleasure: if not on arrival, then on the departure

                                                                  Festivity Level 1: Your guests are chatting amiably with each other.

                                                                  -
                                                                  xy - +
                                                                  xy + container

                                                                  they did it in style

                                                                  -

                                                                  a header

                                                                  +container

                                                                  they did it in style

                                                                  +

                                                                  a header

                                                                  a line of text and an

                                                                  {
                                                                   	indented: "block",
                                                                  @@ -805,8 +805,8 @@ width="496" height="646" viewBox="-102 -102 496 646">container

                                                                  they did it in style

                                                                  -

                                                                  a header

                                                                  +container

                                                                  they did it in style

                                                                  +

                                                                  a header

                                                                  a line of text and an

                                                                  {
                                                                   	indented: "block",
                                                                  @@ -805,8 +805,8 @@ width="516" height="656" viewBox="-90 -90 516 656">markdown

                                                                  Lorem ipsum dolor sit amet, consectetur adipiscing elit,
                                                                  +markdown

                                                                  Lorem ipsum dolor sit amet, consectetur adipiscing elit,
                                                                  sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

                                                                  -
                                                                  - +
                                                                  + markdown

                                                                  Lorem ipsum dolor sit amet, consectetur adipiscing elit,
                                                                  +markdown

                                                                  Lorem ipsum dolor sit amet, consectetur adipiscing elit,
                                                                  sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

                                                                  -
                                                                  - +
                                                                  + markdown

                                                                  Lorem ipsum dolor sit amet, consectetur adipiscing elit,
                                                                  +markdown

                                                                  Lorem ipsum dolor sit amet, consectetur adipiscing elit,
                                                                  sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

                                                                  -
                                                                  - +
                                                                  + markdown

                                                                  Lorem ipsum dolor sit amet, consectetur adipiscing elit,
                                                                  +markdown

                                                                  Lorem ipsum dolor sit amet, consectetur adipiscing elit,
                                                                  sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

                                                                  -
                                                                  - +
                                                                  +
                                                                  {
                                                                  +
                                                                  {
                                                                   	fenced: "block",
                                                                   	of: "json",
                                                                   }
                                                                   
                                                                  -
                                                                  ab - +
                                                                  ab +
                                                                  {
                                                                  +
                                                                  {
                                                                   	fenced: "block",
                                                                   	of: "json",
                                                                   }
                                                                   
                                                                  -
                                                                  ab - +
                                                                  ab +

                                                                  a line of text and an

                                                                  +

                                                                  a line of text and an

                                                                  {
                                                                   	indented: "block",
                                                                   	of: "json",
                                                                   }
                                                                   
                                                                  -
                                                                  ab - +
                                                                  ab +

                                                                  a line of text and an

                                                                  +

                                                                  a line of text and an

                                                                  {
                                                                   	indented: "block",
                                                                   	of: "json",
                                                                   }
                                                                   
                                                                  -
                                                                  ab - +
                                                                  ab +

                                                                  code

                                                                  -
                                                                  ab - +

                                                                  code

                                                                  +
                                                                  ab +

                                                                  code

                                                                  -
                                                                  ab - +

                                                                  code

                                                                  +
                                                                  ab +

                                                                  A paragraph is simply one or more consecutive lines of text, separated +

                                                                  A paragraph is simply one or more consecutive lines of text, separated by one or more blank lines. (A blank line is any line that looks like a blank line -- a line containing nothing but spaces or tabs is considered blank.) Normal paragraphs should not be indented with spaces or tabs.

                                                                  -
                                                                  ab - +
                                                                  ab +

                                                                  A paragraph is simply one or more consecutive lines of text, separated +

                                                                  A paragraph is simply one or more consecutive lines of text, separated by one or more blank lines. (A blank line is any line that looks like a blank line -- a line containing nothing but spaces or tabs is considered blank.) Normal paragraphs should not be indented with spaces or tabs.

                                                                  -
                                                                  ab - +
                                                                  ab +

                                                                  Here is an example of AppleScript:

                                                                  +

                                                                  Here is an example of AppleScript:

                                                                  tell application "Foo"
                                                                       beep
                                                                   end tell
                                                                   

                                                                  A code block continues until it reaches a line that is not indented (or the end of the article).

                                                                  -
                                                                  ab - +
                                                                  ab +

                                                                  Here is an example of AppleScript:

                                                                  +

                                                                  Here is an example of AppleScript:

                                                                  tell application "Foo"
                                                                       beep
                                                                   end tell
                                                                   

                                                                  A code block continues until it reaches a line that is not indented (or the end of the article).

                                                                  -
                                                                  ab - +
                                                                  ab + bearmama bearpapa bear - +bearmama bearpapa bear + bearmama bearpapa bear - +bearmama bearpapa bear + containerscloudtall cylinderclass- -num -int- -timeout -int- -pid -+ -getStatus() -Enum+ -getJobs() -Job[]+ -setTimeout(seconds int) -voidusersid -int -name -string -email -string -password -string -last_login -datetime -container

                                                                  markdown text expanded to 800x400

                                                                  -
                                                                  := 5 +containerscloudtall cylinderclass- +num +int- +timeout +int- +pid ++ +getStatus() +Enum+ +getJobs() +Job[]+ +setTimeout(seconds int) +voidusersid +int +name +string +email +string +password +string +last_login +datetime +container

                                                                  markdown text expanded to 800x400

                                                                  +
                                                                  := 5 := a + 7 -fmt.Printf("%d", b):= 5 +fmt.Printf("%d", b):= 5 := a + 7 -fmt.Printf("%d", b)circle containerdiamond containeroval containerhexagon containerdiamondcirclehexagonoval - +
                                                                  fmt.Printf("%d", b)
                                                                  circle containerdiamond containeroval containerhexagon containerdiamondcirclehexagonoval + containerscloudtall cylinderclass- -num -int- -timeout -int- -pid -+ -getStatus() -Enum+ -getJobs() -Job[]+ -setTimeout(seconds int) -voidusersid -int -name -string -email -string -password -string -last_login -datetime -container

                                                                  markdown text expanded to 800x400

                                                                  -
                                                                  := 5 +containerscloudtall cylinderclass- +num +int- +timeout +int- +pid ++ +getStatus() +Enum+ +getJobs() +Job[]+ +setTimeout(seconds int) +voidusersid +int +name +string +email +string +password +string +last_login +datetime +container

                                                                  markdown text expanded to 800x400

                                                                  +
                                                                  := 5 := a + 7 -fmt.Printf("%d", b):= 5 +fmt.Printf("%d", b):= 5 := a + 7 -fmt.Printf("%d", b)circle containerdiamond containeroval containerhexagon containerdiamondcirclehexagonoval - +
                                                                  fmt.Printf("%d", b)
                                                                  circle containerdiamond containeroval containerhexagon containerdiamondcirclehexagonoval + 1https://d2lang.com -2Gee, I feel kind of LIGHT in the head now,knowing I can't make my satellite dish PAYMENTS! -3https://terrastruct.com +}]]>1https://d2lang.com +2Gee, I feel kind of LIGHT in the head now,knowing I can't make my satellite dish PAYMENTS! +3https://terrastruct.com 1Total abstinence is easier than perfect moderation -2Gee, I feel kind of LIGHT in the head now,knowing I can't make my satellite dish PAYMENTS! +}]]>1Total abstinence is easier than perfect moderation +2Gee, I feel kind of LIGHT in the head now,knowing I can't make my satellite dish PAYMENTS! \ No newline at end of file diff --git a/e2etests/testdata/regression/elk_loop_panic/dagre/board.exp.json b/e2etests/testdata/regression/elk_loop_panic/dagre/board.exp.json index 411f09e45..c39ae2088 100644 --- a/e2etests/testdata/regression/elk_loop_panic/dagre/board.exp.json +++ b/e2etests/testdata/regression/elk_loop_panic/dagre/board.exp.json @@ -9,8 +9,8 @@ "x": 0, "y": 0 }, - "width": 306, - "height": 166, + "width": 226, + "height": 126, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, @@ -39,7 +39,7 @@ "underline": false, "labelWidth": 13, "labelHeight": 36, - "labelPosition": "INSIDE_TOP_CENTER", + "labelPosition": "OUTSIDE_TOP_CENTER", "zIndex": 0, "level": 1 }, @@ -47,8 +47,8 @@ "id": "x.a", "type": "rectangle", "pos": { - "x": 50, - "y": 50 + "x": 30, + "y": 30 }, "width": 53, "height": 66, @@ -88,8 +88,8 @@ "id": "x.b", "type": "rectangle", "pos": { - "x": 203, - "y": 50 + "x": 143, + "y": 30 }, "width": 53, "height": 66, @@ -153,56 +153,56 @@ "labelPercentage": 0, "route": [ { - "x": 103, - "y": 68.38440111420613 + "x": 83, + "y": 44.193548387096776 }, { - "x": 129.66666666666669, - "y": 53.67688022284123 + "x": 99, + "y": 32.83870967741935 }, { - "x": 138, - "y": 50 + "x": 104, + "y": 30 }, { - "x": 140.5, - "y": 50 + "x": 105.5, + "y": 30 }, { - "x": 143, - "y": 50 + "x": 107, + "y": 30 }, { - "x": 146.33333333333331, - "y": 56.6 + "x": 109, + "y": 36.6 }, { - "x": 148.83333333333331, - "y": 66.5 + "x": 110.5, + "y": 46.5 }, { - "x": 151.33333333333334, - "y": 76.4 + "x": 112, + "y": 56.400000000000006 }, { - "x": 151.33333333333334, - "y": 89.6 + "x": 112, + "y": 69.6 }, { - "x": 148.83333333333331, - "y": 99.5 + "x": 110.5, + "y": 79.5 }, { - "x": 146.33333333333331, - "y": 109.4 + "x": 109, + "y": 89.4 }, { - "x": 129.66666666666669, - "y": 112.32311977715878 + "x": 99, + "y": 93.16129032258064 }, { - "x": 103, - "y": 97.61559888579387 + "x": 83, + "y": 81.80645161290323 } ], "isCurve": true, diff --git a/e2etests/testdata/regression/elk_loop_panic/dagre/sketch.exp.svg b/e2etests/testdata/regression/elk_loop_panic/dagre/sketch.exp.svg index 873e458b3..78a1cd8a7 100644 --- a/e2etests/testdata/regression/elk_loop_panic/dagre/sketch.exp.svg +++ b/e2etests/testdata/regression/elk_loop_panic/dagre/sketch.exp.svg @@ -3,7 +3,7 @@ id="d2-svg" style="background: white;" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" -width="510" height="370" viewBox="-102 -102 510 370">

                                                                  Oldest message

                                                                  -

                                                                  Offset

                                                                  -

                                                                  Last message

                                                                  -

                                                                  Next message will be
                                                                  +

                                                                  Oldest message

                                                                  +

                                                                  Offset

                                                                  +

                                                                  Last message

                                                                  +

                                                                  Next message will be
                                                                  inserted here

                                                                  -
                                                                  M0M1M2M3M4M5M6 - +
                                                                  M0M1M2M3M4M5M6 +

                                                                  Oldest message

                                                                  -

                                                                  Offset

                                                                  -

                                                                  Last message

                                                                  -

                                                                  Next message will be
                                                                  +

                                                                  Oldest message

                                                                  +

                                                                  Offset

                                                                  +

                                                                  Last message

                                                                  +

                                                                  Next message will be
                                                                  inserted here

                                                                  -
                                                                  M0M1M2M3M4M5M6 - +
                                                                  M0M1M2M3M4M5M6 +

                                                                  hey

                                                                  +

                                                                  hey

                                                                  • they
                                                                      @@ -804,8 +804,8 @@ width="299" height="651" viewBox="-102 -102 299 651">

                                                                      hey

                                                                      +

                                                                      hey

                                                                      • they
                                                                          @@ -804,8 +804,8 @@ width="299" height="651" viewBox="-90 -90 299 651">x

                                                                          linux: because a PC is a terrible thing to waste

                                                                          -
                                                                          a You don't have to know how the computer works,just how to work the computer. - - +x

                                                                          linux: because a PC is a terrible thing to waste

                                                                          +
                                                                          a You don't have to know how the computer works,just how to work the computer. + + x

                                                                          linux: because a PC is a terrible thing to waste

                                                                          -
                                                                          a You don't have to know how the computer works,just how to work the computer. - - +
                                                                      a You don't have to know how the computer works,just how to work the computer. + + aabbllmmnnoocciikkddgghhjjeeff1122 334455667788 - - - - - - - - - +aabbllmmnnoocciikkddgghhjjeeff1122 334455667788 + + + + + + + + + aabbllmmnnoocciikkddgghhjjeeff1122 334455667788 - - - - - - - - - +aabbllmmnnoocciikkddgghhjjeeff1122 334455667788 + + + + + + + + + xyThe top of the mountain

                                                                      Cats, no less liquid than their shadows, offer no angles to the wind.

                                                                      +xyThe top of the mountain

                                                                      Cats, no less liquid than their shadows, offer no angles to the wind.

                                                                      If we can't fix it, it ain't broke.

                                                                      Dieters live life in the fasting lane.

                                                                      -
                                                                      JoeDonaldi am top lefti am top righti am bottom lefti am bottom right - +
                                                                      JoeDonaldi am top lefti am top righti am bottom lefti am bottom right + xyThe top of the mountain

                                                                      Cats, no less liquid than their shadows, offer no angles to the wind.

                                                                      +xyThe top of the mountain

                                                                      Cats, no less liquid than their shadows, offer no angles to the wind.

                                                                      If we can't fix it, it ain't broke.

                                                                      Dieters live life in the fasting lane.

                                                                      -
                                                                      JoeDonaldi am top lefti am top righti am bottom lefti am bottom right - +
                                                                      JoeDonaldi am top lefti am top righti am bottom lefti am bottom right + poll the peopleresultsunfavorablefavorablewill of the people

                                                                      A winning strategy

                                                                      -
                                                                      - +poll the peopleresultsunfavorablefavorablewill of the people

                                                                      A winning strategy

                                                                      +
                                                                      + poll the peopleresultsunfavorablefavorablewill of the people

                                                                      A winning strategy

                                                                      -
                                                                      - +poll the peopleresultsunfavorablefavorablewill of the people

                                                                      A winning strategy

                                                                      +
                                                                      +

                                                                      Markdown: Syntax

                                                                      +

                                                                      Markdown: Syntax

                                                                      • Overview
                                                                          @@ -1053,8 +1053,8 @@ title for the link, surrounded in quotes. For example:

                                                                          Code

                                                                          Unlike a pre-formatted code block, a code span indicates code within a normal paragraph. For example:

                                                                          -
                                                                      ab - +
                                                                      ab +

                                                                      Markdown: Syntax

                                                                      +

                                                                      Markdown: Syntax

                                                                      • Overview
                                                                          @@ -1053,8 +1053,8 @@ title for the link, surrounded in quotes. For example:

                                                                          Code

                                                                          Unlike a pre-formatted code block, a code span indicates code within a normal paragraph. For example:

                                                                          -
                                                                      ab - +
                                                                      ab +

                                                                      Note: This document is itself written using Markdown; you +

                                                                      Note: This document is itself written using Markdown; you can see the source for it by adding '.text' to the URL.


                                                                      Overview

                                                                      -
                                                                      ab - +
                                                                      ab +

                                                                      Note: This document is itself written using Markdown; you +

                                                                      Note: This document is itself written using Markdown; you can see the source for it by adding '.text' to the URL.


                                                                      Overview

                                                                      -
                                                                      ab - +
                                                                      ab + mixed togethersugarsolution we get - - +mixed togethersugarsolution we get + + mixed togethersugarsolution we get - - +mixed togethersugarsolution we get + +
                                                                        +
                                                                        • Overview
                                                                          • Philosophy
                                                                          • @@ -808,8 +808,8 @@ width="583" height="636" viewBox="-102 -102 583 636">
                                                                              +
                                                                              • Overview
                                                                                • Philosophy
                                                                                • @@ -808,8 +808,8 @@ width="583" height="636" viewBox="-90 -90 583 636">
                                                                                    +
                                                                                    • Overview ok this is all measured
                                                                                      • Philosophy
                                                                                      • @@ -804,8 +804,8 @@ width="449" height="612" viewBox="-102 -102 449 612">
                                                                                          +
                                                                                          • Overview ok this is all measured
                                                                                            • Philosophy
                                                                                            • @@ -804,8 +804,8 @@ width="449" height="612" viewBox="-90 -90 449 612">
                                                                                                +
                                                                                                • Overview
                                                                                                  • Philosophy
                                                                                                  • @@ -829,8 +829,8 @@ width="551" height="1048" viewBox="-102 -102 551 1048">
                                                                                                      +
                                                                                                      • Overview
                                                                                                        • Philosophy
                                                                                                        • @@ -829,8 +829,8 @@ width="551" height="1048" viewBox="-90 -90 551 1048">

                                                                                                          List items may consist of multiple paragraphs. Each subsequent +

                                                                                                          List items may consist of multiple paragraphs. Each subsequent paragraph in a list item must be indented by either 4 spaces or one tab:

                                                                                                            @@ -827,8 +827,8 @@ sit amet, consectetuer adipiscing elit.

                                                                                                            Another item in the same list.

                                                                                                        -
                                                                                                      ab - +
                                                                                                    ab +

                                                                                                    List items may consist of multiple paragraphs. Each subsequent +

                                                                                                    List items may consist of multiple paragraphs. Each subsequent paragraph in a list item must be indented by either 4 spaces or one tab:

                                                                                                      @@ -827,8 +827,8 @@ sit amet, consectetuer adipiscing elit.

                                                                                                      Another item in the same list.

                                                                                                  -
                                                                                                ab - +
                                                                                              ab +

                                                                                              Markdown: Syntax

                                                                                              -
                                                                                              ab - +

                                                                                              Markdown: Syntax

                                                                                              +
                                                                                              ab +

                                                                                              Markdown: Syntax

                                                                                              -
                                                                                              ab - +

                                                                                              Markdown: Syntax

                                                                                              +
                                                                                              ab +

                                                                                              Every frustum longs to be a cone

                                                                                              +

                                                                                              Every frustum longs to be a cone

                                                                                              • A continuing flow of paper is sufficient to continue the flow of paper
                                                                                              • Please remain calm, it's no use both of us being hysterical at the same time
                                                                                              • Visits always give pleasure: if not on arrival, then on the departure

                                                                                              Festivity Level 1: Your guests are chatting amiably with each other.

                                                                                              -
                                                                                              xy - +
                                                                                              xy +

                                                                                              Every frustum longs to be a cone

                                                                                              +

                                                                                              Every frustum longs to be a cone

                                                                                              • A continuing flow of paper is sufficient to continue the flow of paper
                                                                                              • Please remain calm, it's no use both of us being hysterical at the same time
                                                                                              • Visits always give pleasure: if not on arrival, then on the departure

                                                                                              Festivity Level 1: Your guests are chatting amiably with each other.

                                                                                              -
                                                                                              xy - +
                                                                                              xy + container

                                                                                              they did it in style

                                                                                              -

                                                                                              a header

                                                                                              +container

                                                                                              they did it in style

                                                                                              +

                                                                                              a header

                                                                                              a line of text and an

                                                                                              {
                                                                                               	indented: "block",
                                                                                              @@ -805,8 +805,8 @@ width="516" height="686" viewBox="-102 -102 516 686">container

                                                                                              they did it in style

                                                                                              -

                                                                                              a header

                                                                                              +container

                                                                                              they did it in style

                                                                                              +

                                                                                              a header

                                                                                              a line of text and an

                                                                                              {
                                                                                               	indented: "block",
                                                                                              @@ -805,8 +805,8 @@ width="566" height="736" viewBox="-90 -90 566 736">markdown

                                                                                              Lorem ipsum dolor sit amet, consectetur adipiscing elit,
                                                                                              +markdown

                                                                                              Lorem ipsum dolor sit amet, consectetur adipiscing elit,
                                                                                              sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

                                                                                              -
                                                                                              - +
                                                                                              + markdown

                                                                                              Lorem ipsum dolor sit amet, consectetur adipiscing elit,
                                                                                              +markdown

                                                                                              Lorem ipsum dolor sit amet, consectetur adipiscing elit,
                                                                                              sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

                                                                                              -
                                                                                              - +
                                                                                              + markdown

                                                                                              Lorem ipsum dolor sit amet, consectetur adipiscing elit,
                                                                                              +markdown

                                                                                              Lorem ipsum dolor sit amet, consectetur adipiscing elit,
                                                                                              sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

                                                                                              -
                                                                                              - +
                                                                                              + markdown

                                                                                              Lorem ipsum dolor sit amet, consectetur adipiscing elit,
                                                                                              +markdown

                                                                                              Lorem ipsum dolor sit amet, consectetur adipiscing elit,
                                                                                              sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

                                                                                              -
                                                                                              - +
                                                                                              +
                                                                                              {
                                                                                              +
                                                                                              {
                                                                                               	fenced: "block",
                                                                                               	of: "json",
                                                                                               }
                                                                                               
                                                                                              -
                                                                                              ab - +
                                                                                              ab +
                                                                                              {
                                                                                              +
                                                                                              {
                                                                                               	fenced: "block",
                                                                                               	of: "json",
                                                                                               }
                                                                                               
                                                                                              -
                                                                                              ab - +
                                                                                              ab +

                                                                                              a line of text and an

                                                                                              +

                                                                                              a line of text and an

                                                                                              {
                                                                                               	indented: "block",
                                                                                               	of: "json",
                                                                                               }
                                                                                               
                                                                                              -
                                                                                              ab - +
                                                                                              ab +

                                                                                              a line of text and an

                                                                                              +

                                                                                              a line of text and an

                                                                                              {
                                                                                               	indented: "block",
                                                                                               	of: "json",
                                                                                               }
                                                                                               
                                                                                              -
                                                                                              ab - +
                                                                                              ab +

                                                                                              code

                                                                                              -
                                                                                              ab - +

                                                                                              code

                                                                                              +
                                                                                              ab +

                                                                                              code

                                                                                              -
                                                                                              ab - +

                                                                                              code

                                                                                              +
                                                                                              ab +

                                                                                              A paragraph is simply one or more consecutive lines of text, separated +

                                                                                              A paragraph is simply one or more consecutive lines of text, separated by one or more blank lines. (A blank line is any line that looks like a blank line -- a line containing nothing but spaces or tabs is considered blank.) Normal paragraphs should not be indented with spaces or tabs.

                                                                                              -
                                                                                              ab - +
                                                                                              ab +

                                                                                              A paragraph is simply one or more consecutive lines of text, separated +

                                                                                              A paragraph is simply one or more consecutive lines of text, separated by one or more blank lines. (A blank line is any line that looks like a blank line -- a line containing nothing but spaces or tabs is considered blank.) Normal paragraphs should not be indented with spaces or tabs.

                                                                                              -
                                                                                              ab - +
                                                                                              ab +

                                                                                              Here is an example of AppleScript:

                                                                                              +

                                                                                              Here is an example of AppleScript:

                                                                                              tell application "Foo"
                                                                                                   beep
                                                                                               end tell
                                                                                               

                                                                                              A code block continues until it reaches a line that is not indented (or the end of the article).

                                                                                              -
                                                                                              ab - +
                                                                                              ab +

                                                                                              Here is an example of AppleScript:

                                                                                              +

                                                                                              Here is an example of AppleScript:

                                                                                              tell application "Foo"
                                                                                                   beep
                                                                                               end tell
                                                                                               

                                                                                              A code block continues until it reaches a line that is not indented (or the end of the article).

                                                                                              -
                                                                                              ab - +
                                                                                              ab + bearmama bearpapa bear - +bearmama bearpapa bear + bearmama bearpapa bear - +bearmama bearpapa bear + containerscloudtall cylinderclass- -num -int- -timeout -int- -pid -+ -getStatus() -Enum+ -getJobs() -Job[]+ -setTimeout(seconds int) -voidusersid -int -name -string -email -string -password -string -last_login -datetime -container

                                                                                              markdown text expanded to 800x400

                                                                                              -
                                                                                              := 5 +containerscloudtall cylinderclass- +num +int- +timeout +int- +pid ++ +getStatus() +Enum+ +getJobs() +Job[]+ +setTimeout(seconds int) +voidusersid +int +name +string +email +string +password +string +last_login +datetime +container

                                                                                              markdown text expanded to 800x400

                                                                                              +
                                                                                              := 5 := a + 7 -fmt.Printf("%d", b):= 5 +fmt.Printf("%d", b):= 5 := a + 7 -fmt.Printf("%d", b)circle containerdiamond containeroval containerhexagon containerdiamondcirclehexagonoval - +
                                                                                              fmt.Printf("%d", b)
                                                                                              circle containerdiamond containeroval containerhexagon containerdiamondcirclehexagonoval + containerscloudtall cylinderclass- -num -int- -timeout -int- -pid -+ -getStatus() -Enum+ -getJobs() -Job[]+ -setTimeout(seconds int) -voidusersid -int -name -string -email -string -password -string -last_login -datetime -container

                                                                                              markdown text expanded to 800x400

                                                                                              -
                                                                                              := 5 +containerscloudtall cylinderclass- +num +int- +timeout +int- +pid ++ +getStatus() +Enum+ +getJobs() +Job[]+ +setTimeout(seconds int) +voidusersid +int +name +string +email +string +password +string +last_login +datetime +container

                                                                                              markdown text expanded to 800x400

                                                                                              +
                                                                                              := 5 := a + 7 -fmt.Printf("%d", b):= 5 +fmt.Printf("%d", b):= 5 := a + 7 -fmt.Printf("%d", b)circle containerdiamond containeroval containerhexagon containerdiamondcirclehexagonoval - +
                                                                                              fmt.Printf("%d", b)
                                                                                              circle containerdiamond containeroval containerhexagon containerdiamondcirclehexagonoval + 1https://d2lang.com -2Gee, I feel kind of LIGHT in the head now,knowing I can't make my satellite dish PAYMENTS! -3https://terrastruct.com +}]]>1https://d2lang.com +2Gee, I feel kind of LIGHT in the head now,knowing I can't make my satellite dish PAYMENTS! +3https://terrastruct.com 1Total abstinence is easier than perfect moderation -2Gee, I feel kind of LIGHT in the head now,knowing I can't make my satellite dish PAYMENTS! +}]]>1Total abstinence is easier than perfect moderation +2Gee, I feel kind of LIGHT in the head now,knowing I can't make my satellite dish PAYMENTS!

                                                                                              Oldest message

                                                                                              +

                                                                                              Oldest message

                                                                                              Offset

                                                                                              Last message

                                                                                              Next message will be
                                                                                              inserted here

                                                                                              -
                                                                                              M0M1M2M3M4M5M6 - +
                                                                                              M0M1M2M3M4M5M6 +

                                                                                              hey

                                                                                              +

                                                                                              hey

                                                                                              • they
                                                                                                  @@ -804,8 +804,8 @@ width="299" height="571" viewBox="-102 -102 299 571">x

                                                                                                  linux: because a PC is a terrible thing to waste

                                                                                                  -
                                                                                                  a You don't have to know how the computer works,just how to work the computer. - - +
                                                                                              a You don't have to know how the computer works,just how to work the computer. + + aabbllmmnnoocciikkddgghhjjeeff1122 334455667788 - - - - - - - - - -||||||| 749d236a -aabbllmmnnoocciikkddgghhjjeeff1122 334455667788 - - - - - - - - - -======= -aabbllmmnnoocciikkddgghhjjeeff1122 334455667788 - - - - - - - - - ->>>>>>> master +aabbllmmnnoocciikkddgghhjjeeff1122 334455667788 + + + + + + + + + abcd - - - \ No newline at end of file diff --git a/e2etests/testdata/stable/child_parent_edges/elk/board.exp.json b/e2etests/testdata/stable/child_parent_edges/elk/board.exp.json deleted file mode 100644 index fead734f9..000000000 --- a/e2etests/testdata/stable/child_parent_edges/elk/board.exp.json +++ /dev/null @@ -1,297 +0,0 @@ -{ - "name": "", - "fontFamily": "SourceSansPro", - "shapes": [ - { - "id": "a", - "type": "rectangle", - "pos": { - "x": 12, - "y": 12 - }, - "width": 364, - "height": 451, - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "borderRadius": 0, - "fill": "#E3E9FD", - "stroke": "#0D32B2", - "shadow": false, - "3d": false, - "multiple": false, - "double-border": false, - "tooltip": "", - "link": "", - "icon": null, - "iconPosition": "", - "blend": false, - "fields": null, - "methods": null, - "columns": null, - "label": "a", - "fontSize": 28, - "fontFamily": "DEFAULT", - "language": "", - "color": "#0A0F25", - "italic": false, - "bold": false, - "underline": false, - "labelWidth": 12, - "labelHeight": 36, - "labelPosition": "INSIDE_TOP_CENTER", - "zIndex": 0, - "level": 1 - }, - { - "id": "a.b", - "type": "rectangle", - "pos": { - "x": 62, - "y": 62 - }, - "width": 264, - "height": 351, - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "borderRadius": 0, - "fill": "#EDF0FD", - "stroke": "#0D32B2", - "shadow": false, - "3d": false, - "multiple": false, - "double-border": false, - "tooltip": "", - "link": "", - "icon": null, - "iconPosition": "", - "blend": false, - "fields": null, - "methods": null, - "columns": null, - "label": "b", - "fontSize": 24, - "fontFamily": "DEFAULT", - "language": "", - "color": "#0A0F25", - "italic": false, - "bold": false, - "underline": false, - "labelWidth": 12, - "labelHeight": 31, - "labelPosition": "INSIDE_TOP_CENTER", - "zIndex": 0, - "level": 2 - }, - { - "id": "a.b.c", - "type": "rectangle", - "pos": { - "x": 122, - "y": 112 - }, - "width": 154, - "height": 166, - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "borderRadius": 0, - "fill": "#F7F8FE", - "stroke": "#0D32B2", - "shadow": false, - "3d": false, - "multiple": false, - "double-border": false, - "tooltip": "", - "link": "", - "icon": null, - "iconPosition": "", - "blend": false, - "fields": null, - "methods": null, - "columns": null, - "label": "c", - "fontSize": 20, - "fontFamily": "DEFAULT", - "language": "", - "color": "#0A0F25", - "italic": false, - "bold": false, - "underline": false, - "labelWidth": 9, - "labelHeight": 26, - "labelPosition": "INSIDE_TOP_CENTER", - "zIndex": 0, - "level": 3 - }, - { - "id": "a.b.c.d", - "type": "rectangle", - "pos": { - "x": 172, - "y": 162 - }, - "width": 54, - "height": 66, - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "borderRadius": 0, - "fill": "#FFFFFF", - "stroke": "#0D32B2", - "shadow": false, - "3d": false, - "multiple": false, - "double-border": false, - "tooltip": "", - "link": "", - "icon": null, - "iconPosition": "", - "blend": false, - "fields": null, - "methods": null, - "columns": null, - "label": "d", - "fontSize": 16, - "fontFamily": "DEFAULT", - "language": "", - "color": "#0A0F25", - "italic": false, - "bold": true, - "underline": false, - "labelWidth": 9, - "labelHeight": 21, - "labelPosition": "INSIDE_MIDDLE_CENTER", - "zIndex": 0, - "level": 4 - } - ], - "connections": [ - { - "id": "(a.b -> a)[0]", - "src": "a.b", - "srcArrow": "none", - "srcLabel": "", - "dst": "a", - "dstArrow": "triangle", - "dstLabel": "", - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "stroke": "#0D32B2", - "label": "", - "fontSize": 16, - "fontFamily": "DEFAULT", - "language": "", - "color": "#676C7E", - "italic": true, - "bold": false, - "underline": false, - "labelWidth": 0, - "labelHeight": 0, - "labelPosition": "", - "labelPercentage": 0, - "route": [ - { - "x": 112, - "y": 413 - }, - { - "x": 112, - "y": 463 - } - ], - "animated": false, - "tooltip": "", - "icon": null, - "zIndex": 0 - }, - { - "id": "a.(b -> b.c)[0]", - "src": "a.b", - "srcArrow": "none", - "srcLabel": "", - "dst": "a.b.c", - "dstArrow": "triangle", - "dstLabel": "", - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "stroke": "#0D32B2", - "label": "", - "fontSize": 16, - "fontFamily": "DEFAULT", - "language": "", - "color": "#676C7E", - "italic": true, - "bold": false, - "underline": false, - "labelWidth": 0, - "labelHeight": 0, - "labelPosition": "", - "labelPercentage": 0, - "route": [ - { - "x": 172, - "y": 62 - }, - { - "x": 172, - "y": 112 - } - ], - "animated": false, - "tooltip": "", - "icon": null, - "zIndex": 0 - }, - { - "id": "a.(b.c.d -> b)[0]", - "src": "a.b.c.d", - "srcArrow": "none", - "srcLabel": "", - "dst": "a.b", - "dstArrow": "triangle", - "dstLabel": "", - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "stroke": "#0D32B2", - "label": "", - "fontSize": 16, - "fontFamily": "DEFAULT", - "language": "", - "color": "#676C7E", - "italic": true, - "bold": false, - "underline": false, - "labelWidth": 0, - "labelHeight": 0, - "labelPosition": "", - "labelPercentage": 0, - "route": [ - { - "x": 199, - "y": 228 - }, - { - "x": 199, - "y": 323 - }, - { - "x": 112, - "y": 323 - }, - { - "x": 112, - "y": 62 - } - ], - "animated": false, - "tooltip": "", - "icon": null, - "zIndex": 0 - } - ] -} diff --git a/e2etests/testdata/stable/child_parent_edges/elk/sketch.exp.svg b/e2etests/testdata/stable/child_parent_edges/elk/sketch.exp.svg deleted file mode 100644 index 083dc03cf..000000000 --- a/e2etests/testdata/stable/child_parent_edges/elk/sketch.exp.svg +++ /dev/null @@ -1,59 +0,0 @@ - -abcd - - - \ No newline at end of file diff --git a/e2etests/testdata/stable/circle_arrowhead/dagre/board.exp.json b/e2etests/testdata/stable/circle_arrowhead/dagre/board.exp.json index f794e853d..016388d5c 100644 --- a/e2etests/testdata/stable/circle_arrowhead/dagre/board.exp.json +++ b/e2etests/testdata/stable/circle_arrowhead/dagre/board.exp.json @@ -48,7 +48,7 @@ "type": "rectangle", "pos": { "x": 0, - "y": 147 + "y": 187 }, "width": 53, "height": 66, @@ -130,7 +130,7 @@ "type": "rectangle", "pos": { "x": 93, - "y": 147 + "y": 187 }, "width": 54, "height": 66, @@ -199,15 +199,15 @@ }, { "x": 26.5, - "y": 98.4 + "y": 114.4 }, { "x": 26.5, - "y": 114.7 + "y": 138.7 }, { "x": 26.5, - "y": 147.5 + "y": 187.5 } ], "isCurve": true, @@ -247,15 +247,15 @@ }, { "x": 120, - "y": 98.4 + "y": 114.4 }, { "x": 120, - "y": 114.7 + "y": 138.7 }, { "x": 120, - "y": 147.5 + "y": 187.5 } ], "isCurve": true, diff --git a/e2etests/testdata/stable/circle_arrowhead/dagre/sketch.exp.svg b/e2etests/testdata/stable/circle_arrowhead/dagre/sketch.exp.svg index 552f32c6b..af152be1e 100644 --- a/e2etests/testdata/stable/circle_arrowhead/dagre/sketch.exp.svg +++ b/e2etests/testdata/stable/circle_arrowhead/dagre/sketch.exp.svg @@ -3,7 +3,7 @@ id="d2-svg" style="background: white;" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" -width="359" height="417" viewBox="-102 -102 359 417">xyThe top of the mountain

                                                                                              Cats, no less liquid than their shadows, offer no angles to the wind.

                                                                                              +xyThe top of the mountain

                                                                                              Cats, no less liquid than their shadows, offer no angles to the wind.

                                                                                              If we can't fix it, it ain't broke.

                                                                                              Dieters live life in the fasting lane.

                                                                                              -
                                                                                              JoeDonaldi am top lefti am top righti am bottom lefti am bottom right - +
                                                                                              JoeDonaldi am top lefti am top righti am bottom lefti am bottom right + poll the peopleresultsunfavorablefavorablewill of the people

                                                                                              A winning strategy

                                                                                              -
                                                                                              - +poll the peopleresultsunfavorablefavorablewill of the people

                                                                                              A winning strategy

                                                                                              +
                                                                                              +

                                                                                              Markdown: Syntax

                                                                                              +

                                                                                              Markdown: Syntax

                                                                                              • Overview
                                                                                                  @@ -1053,8 +1053,8 @@ title for the link, surrounded in quotes. For example:

                                                                                                  Code

                                                                                                  Unlike a pre-formatted code block, a code span indicates code within a normal paragraph. For example:

                                                                                                  -
                                                                                              ab - +
                                                                                              ab +

                                                                                              Note: This document is itself written using Markdown; you +

                                                                                              Note: This document is itself written using Markdown; you can see the source for it by adding '.text' to the URL.


                                                                                              Overview

                                                                                              -
                                                                                              ab - +
                                                                                              ab + mixed togethersugarsolution we get - - +mixed togethersugarsolution we get + +
                                                                                                +
                                                                                                • Overview
                                                                                                  • Philosophy
                                                                                                  • @@ -808,8 +808,8 @@ width="583" height="556" viewBox="-102 -102 583 556">
                                                                                                      +
                                                                                                      • Overview ok this is all measured
                                                                                                        • Philosophy
                                                                                                        • @@ -804,8 +804,8 @@ width="449" height="532" viewBox="-102 -102 449 532">
                                                                                                            +
                                                                                                            • Overview
                                                                                                              • Philosophy
                                                                                                              • @@ -829,8 +829,8 @@ width="551" height="968" viewBox="-102 -102 551 968">

                                                                                                                List items may consist of multiple paragraphs. Each subsequent +

                                                                                                                List items may consist of multiple paragraphs. Each subsequent paragraph in a list item must be indented by either 4 spaces or one tab:

                                                                                                                  @@ -827,8 +827,8 @@ sit amet, consectetuer adipiscing elit.

                                                                                                                  Another item in the same list.

                                                                                                              -
                                                                                                            ab - +
                                                                                                          ab +

                                                                                                          Markdown: Syntax

                                                                                                          -
                                                                                                          ab - +

                                                                                                          Markdown: Syntax

                                                                                                          +
                                                                                                          ab +

                                                                                                          Every frustum longs to be a cone

                                                                                                          +

                                                                                                          Every frustum longs to be a cone

                                                                                                          • A continuing flow of paper is sufficient to continue the flow of paper
                                                                                                          • Please remain calm, it's no use both of us being hysterical at the same time
                                                                                                          • Visits always give pleasure: if not on arrival, then on the departure

                                                                                                          Festivity Level 1: Your guests are chatting amiably with each other.

                                                                                                          -
                                                                                                          xy - +
                                                                                                          xy + container

                                                                                                          they did it in style

                                                                                                          -

                                                                                                          a header

                                                                                                          -||||||| 749d236a -container

                                                                                                          they did it in style

                                                                                                          -

                                                                                                          a header

                                                                                                          -======= -container

                                                                                                          they did it in style

                                                                                                          -

                                                                                                          a header

                                                                                                          ->>>>>>> master +container

                                                                                                          they did it in style

                                                                                                          +

                                                                                                          a header

                                                                                                          a line of text and an

                                                                                                          {
                                                                                                           	indented: "block",
                                                                                                          @@ -819,16 +805,8 @@ width="516" height="684" viewBox="-102 -100 516 684">markdown

                                                                                                          Lorem ipsum dolor sit amet, consectetur adipiscing elit,
                                                                                                          -||||||| 749d236a -markdown

                                                                                                          Lorem ipsum dolor sit amet, consectetur adipiscing elit,
                                                                                                          -======= -markdown

                                                                                                          Lorem ipsum dolor sit amet, consectetur adipiscing elit,
                                                                                                          ->>>>>>> master +markdown

                                                                                                          Lorem ipsum dolor sit amet, consectetur adipiscing elit,
                                                                                                          sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

                                                                                                          -<<<<<<< HEAD -
                                                                                                          - -||||||| 749d236a -
                                                                                                          - -======= -
                                                                                                          - ->>>>>>> master +
                                                                                                          + markdown

                                                                                                          Lorem ipsum dolor sit amet, consectetur adipiscing elit,
                                                                                                          -||||||| 749d236a -markdown

                                                                                                          Lorem ipsum dolor sit amet, consectetur adipiscing elit,
                                                                                                          -======= -markdown

                                                                                                          Lorem ipsum dolor sit amet, consectetur adipiscing elit,
                                                                                                          ->>>>>>> master +markdown

                                                                                                          Lorem ipsum dolor sit amet, consectetur adipiscing elit,
                                                                                                          sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

                                                                                                          -<<<<<<< HEAD -
                                                                                                          - -||||||| 749d236a -
                                                                                                          - -======= -
                                                                                                          - ->>>>>>> master +
                                                                                                          +
                                                                                                          {
                                                                                                          +
                                                                                                          {
                                                                                                           	fenced: "block",
                                                                                                           	of: "json",
                                                                                                           }
                                                                                                           
                                                                                                          -
                                                                                                          ab - +
                                                                                                          ab +

                                                                                                          a line of text and an

                                                                                                          +

                                                                                                          a line of text and an

                                                                                                          {
                                                                                                           	indented: "block",
                                                                                                           	of: "json",
                                                                                                           }
                                                                                                           
                                                                                                          -
                                                                                                          ab - +
                                                                                                          ab +

                                                                                                          code

                                                                                                          -
                                                                                                          ab - +

                                                                                                          code

                                                                                                          +
                                                                                                          ab +

                                                                                                          A paragraph is simply one or more consecutive lines of text, separated +

                                                                                                          A paragraph is simply one or more consecutive lines of text, separated by one or more blank lines. (A blank line is any line that looks like a blank line -- a line containing nothing but spaces or tabs is considered blank.) Normal paragraphs should not be indented with spaces or tabs.

                                                                                                          -
                                                                                                          ab - +
                                                                                                          ab +

                                                                                                          Here is an example of AppleScript:

                                                                                                          +

                                                                                                          Here is an example of AppleScript:

                                                                                                          tell application "Foo"
                                                                                                               beep
                                                                                                           end tell
                                                                                                           

                                                                                                          A code block continues until it reaches a line that is not indented (or the end of the article).

                                                                                                          -
                                                                                                          ab - +
                                                                                                          ab + bearmama bearpapa bear - +bearmama bearpapa bear + ninety ninesixty fourthirty twosixteeneight - - - \ No newline at end of file diff --git a/e2etests/testdata/todo/font_sizes_containers_large/elk/board.exp.json b/e2etests/testdata/todo/font_sizes_containers_large/elk/board.exp.json deleted file mode 100644 index 99a69e14e..000000000 --- a/e2etests/testdata/todo/font_sizes_containers_large/elk/board.exp.json +++ /dev/null @@ -1,212 +0,0 @@ -{ - "name": "", - "fontFamily": "SourceSansPro", - "shapes": [ - { - "id": "ninety nine", - "type": "rectangle", - "pos": { - "x": 12, - "y": 12 - }, - "width": 464, - "height": 456, - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "borderRadius": 0, - "fill": "#E3E9FD", - "stroke": "#0D32B2", - "shadow": false, - "3d": false, - "multiple": false, - "double-border": false, - "tooltip": "", - "link": "", - "icon": null, - "iconPosition": "", - "blend": false, - "fields": null, - "methods": null, - "columns": null, - "label": "ninety nine", - "fontSize": 99, - "fontFamily": "DEFAULT", - "language": "", - "color": "#0A0F25", - "italic": false, - "bold": false, - "underline": false, - "labelWidth": 452, - "labelHeight": 125, - "labelPosition": "INSIDE_TOP_CENTER", - "zIndex": 0, - "level": 1 - }, - { - "id": "ninety nine.sixty four", - "type": "rectangle", - "pos": { - "x": 62, - "y": 62 - }, - "width": 364, - "height": 356, - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "borderRadius": 0, - "fill": "#EDF0FD", - "stroke": "#0D32B2", - "shadow": false, - "3d": false, - "multiple": false, - "double-border": false, - "tooltip": "", - "link": "", - "icon": null, - "iconPosition": "", - "blend": false, - "fields": null, - "methods": null, - "columns": null, - "label": "sixty four", - "fontSize": 64, - "fontFamily": "DEFAULT", - "language": "", - "color": "#0A0F25", - "italic": false, - "bold": false, - "underline": false, - "labelWidth": 246, - "labelHeight": 81, - "labelPosition": "INSIDE_TOP_CENTER", - "zIndex": 0, - "level": 2 - }, - { - "id": "ninety nine.sixty four.thirty two", - "type": "rectangle", - "pos": { - "x": 112, - "y": 112 - }, - "width": 264, - "height": 256, - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "borderRadius": 0, - "fill": "#F7F8FE", - "stroke": "#0D32B2", - "shadow": false, - "3d": false, - "multiple": false, - "double-border": false, - "tooltip": "", - "link": "", - "icon": null, - "iconPosition": "", - "blend": false, - "fields": null, - "methods": null, - "columns": null, - "label": "thirty two", - "fontSize": 32, - "fontFamily": "DEFAULT", - "language": "", - "color": "#0A0F25", - "italic": false, - "bold": false, - "underline": false, - "labelWidth": 130, - "labelHeight": 41, - "labelPosition": "INSIDE_TOP_CENTER", - "zIndex": 0, - "level": 3 - }, - { - "id": "ninety nine.sixty four.thirty two.sixteen", - "type": "rectangle", - "pos": { - "x": 162, - "y": 162 - }, - "width": 164, - "height": 156, - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "borderRadius": 0, - "fill": "#FFFFFF", - "stroke": "#0D32B2", - "shadow": false, - "3d": false, - "multiple": false, - "double-border": false, - "tooltip": "", - "link": "", - "icon": null, - "iconPosition": "", - "blend": false, - "fields": null, - "methods": null, - "columns": null, - "label": "sixteen", - "fontSize": 16, - "fontFamily": "DEFAULT", - "language": "", - "color": "#0A0F25", - "italic": false, - "bold": false, - "underline": false, - "labelWidth": 48, - "labelHeight": 21, - "labelPosition": "INSIDE_TOP_CENTER", - "zIndex": 0, - "level": 4 - }, - { - "id": "ninety nine.sixty four.thirty two.sixteen.eight", - "type": "rectangle", - "pos": { - "x": 212, - "y": 212 - }, - "width": 64, - "height": 56, - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "borderRadius": 0, - "fill": "#FFFFFF", - "stroke": "#0D32B2", - "shadow": false, - "3d": false, - "multiple": false, - "double-border": false, - "tooltip": "", - "link": "", - "icon": null, - "iconPosition": "", - "blend": false, - "fields": null, - "methods": null, - "columns": null, - "label": "eight", - "fontSize": 8, - "fontFamily": "DEFAULT", - "language": "", - "color": "#0A0F25", - "italic": false, - "bold": true, - "underline": false, - "labelWidth": 19, - "labelHeight": 11, - "labelPosition": "INSIDE_MIDDLE_CENTER", - "zIndex": 0, - "level": 5 - } - ], - "connections": [] -} diff --git a/e2etests/testdata/todo/font_sizes_containers_large/elk/sketch.exp.svg b/e2etests/testdata/todo/font_sizes_containers_large/elk/sketch.exp.svg deleted file mode 100644 index b26de5af0..000000000 --- a/e2etests/testdata/todo/font_sizes_containers_large/elk/sketch.exp.svg +++ /dev/null @@ -1,59 +0,0 @@ - -ninety ninesixty fourthirty twosixteeneight - - - \ No newline at end of file diff --git a/e2etests/testdata/todo/font_sizes_large/dagre/board.exp.json b/e2etests/testdata/todo/font_sizes_large/dagre/board.exp.json deleted file mode 100644 index 9c2182811..000000000 --- a/e2etests/testdata/todo/font_sizes_large/dagre/board.exp.json +++ /dev/null @@ -1,405 +0,0 @@ -{ - "name": "", - "fontFamily": "SourceSansPro", - "shapes": [ - { - "id": "eight", - "type": "rectangle", - "pos": { - "x": 233, - "y": 0 - }, - "width": 64, - "height": 56, - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "borderRadius": 0, - "fill": "#F7F8FE", - "stroke": "#0D32B2", - "shadow": false, - "3d": false, - "multiple": false, - "double-border": false, - "tooltip": "", - "link": "", - "icon": null, - "iconPosition": "", - "blend": false, - "fields": null, - "methods": null, - "columns": null, - "label": "eight", - "fontSize": 8, - "fontFamily": "DEFAULT", - "language": "", - "color": "#0A0F25", - "italic": false, - "bold": true, - "underline": false, - "labelWidth": 19, - "labelHeight": 11, - "labelPosition": "INSIDE_MIDDLE_CENTER", - "zIndex": 0, - "level": 1 - }, - { - "id": "sixteen", - "type": "rectangle", - "pos": { - "x": 216, - "y": 194 - }, - "width": 97, - "height": 66, - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "borderRadius": 0, - "fill": "#F7F8FE", - "stroke": "#0D32B2", - "shadow": false, - "3d": false, - "multiple": false, - "double-border": false, - "tooltip": "", - "link": "", - "icon": null, - "iconPosition": "", - "blend": false, - "fields": null, - "methods": null, - "columns": null, - "label": "sixteen", - "fontSize": 16, - "fontFamily": "DEFAULT", - "language": "", - "color": "#0A0F25", - "italic": false, - "bold": true, - "underline": false, - "labelWidth": 52, - "labelHeight": 21, - "labelPosition": "INSIDE_MIDDLE_CENTER", - "zIndex": 0, - "level": 1 - }, - { - "id": "thirty two", - "type": "rectangle", - "pos": { - "x": 171, - "y": 413 - }, - "width": 187, - "height": 86, - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "borderRadius": 0, - "fill": "#F7F8FE", - "stroke": "#0D32B2", - "shadow": false, - "3d": false, - "multiple": false, - "double-border": false, - "tooltip": "", - "link": "", - "icon": null, - "iconPosition": "", - "blend": false, - "fields": null, - "methods": null, - "columns": null, - "label": "thirty two", - "fontSize": 32, - "fontFamily": "DEFAULT", - "language": "", - "color": "#0A0F25", - "italic": false, - "bold": true, - "underline": false, - "labelWidth": 142, - "labelHeight": 41, - "labelPosition": "INSIDE_MIDDLE_CENTER", - "zIndex": 0, - "level": 1 - }, - { - "id": "sixty four", - "type": "rectangle", - "pos": { - "x": 108, - "y": 682 - }, - "width": 314, - "height": 126, - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "borderRadius": 0, - "fill": "#F7F8FE", - "stroke": "#0D32B2", - "shadow": false, - "3d": false, - "multiple": false, - "double-border": false, - "tooltip": "", - "link": "", - "icon": null, - "iconPosition": "", - "blend": false, - "fields": null, - "methods": null, - "columns": null, - "label": "sixty four", - "fontSize": 64, - "fontFamily": "DEFAULT", - "language": "", - "color": "#0A0F25", - "italic": false, - "bold": true, - "underline": false, - "labelWidth": 269, - "labelHeight": 81, - "labelPosition": "INSIDE_MIDDLE_CENTER", - "zIndex": 0, - "level": 1 - }, - { - "id": "ninety nine", - "type": "rectangle", - "pos": { - "x": 0, - "y": 1032 - }, - "width": 529, - "height": 170, - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "borderRadius": 0, - "fill": "#F7F8FE", - "stroke": "#0D32B2", - "shadow": false, - "3d": false, - "multiple": false, - "double-border": false, - "tooltip": "", - "link": "", - "icon": null, - "iconPosition": "", - "blend": false, - "fields": null, - "methods": null, - "columns": null, - "label": "ninety nine", - "fontSize": 99, - "fontFamily": "DEFAULT", - "language": "", - "color": "#0A0F25", - "italic": false, - "bold": true, - "underline": false, - "labelWidth": 484, - "labelHeight": 125, - "labelPosition": "INSIDE_MIDDLE_CENTER", - "zIndex": 0, - "level": 1 - } - ], - "connections": [ - { - "id": "(eight -> sixteen)[0]", - "src": "eight", - "srcArrow": "none", - "srcLabel": "", - "dst": "sixteen", - "dstArrow": "triangle", - "dstLabel": "", - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "stroke": "#0D32B2", - "label": "twelve", - "fontSize": 12, - "fontFamily": "DEFAULT", - "language": "", - "color": "#676C7E", - "italic": true, - "bold": false, - "underline": false, - "labelWidth": 33, - "labelHeight": 16, - "labelPosition": "INSIDE_MIDDLE_CENTER", - "labelPercentage": 0, - "route": [ - { - "x": 264.5, - "y": 56 - }, - { - "x": 264.5, - "y": 111.2 - }, - { - "x": 264.5, - "y": 138.8 - }, - { - "x": 264.5, - "y": 194 - } - ], - "isCurve": true, - "animated": false, - "tooltip": "", - "icon": null, - "zIndex": 0 - }, - { - "id": "(sixteen -> thirty two)[0]", - "src": "sixteen", - "srcArrow": "none", - "srcLabel": "", - "dst": "thirty two", - "dstArrow": "triangle", - "dstLabel": "", - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "stroke": "#0D32B2", - "label": "twenty four", - "fontSize": 24, - "fontFamily": "DEFAULT", - "language": "", - "color": "#676C7E", - "italic": true, - "bold": false, - "underline": false, - "labelWidth": 114, - "labelHeight": 31, - "labelPosition": "INSIDE_MIDDLE_CENTER", - "labelPercentage": 0, - "route": [ - { - "x": 264.5, - "y": 260 - }, - { - "x": 264.5, - "y": 321.2 - }, - { - "x": 264.5, - "y": 351.9 - }, - { - "x": 264.5, - "y": 413.5 - } - ], - "isCurve": true, - "animated": false, - "tooltip": "", - "icon": null, - "zIndex": 0 - }, - { - "id": "(thirty two -> sixty four)[0]", - "src": "thirty two", - "srcArrow": "none", - "srcLabel": "", - "dst": "sixty four", - "dstArrow": "triangle", - "dstLabel": "", - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "stroke": "#0D32B2", - "label": "forty eight", - "fontSize": 48, - "fontFamily": "DEFAULT", - "language": "", - "color": "#676C7E", - "italic": true, - "bold": false, - "underline": false, - "labelWidth": 202, - "labelHeight": 61, - "labelPosition": "INSIDE_MIDDLE_CENTER", - "labelPercentage": 0, - "route": [ - { - "x": 264.5, - "y": 499 - }, - { - "x": 264.5, - "y": 572.2 - }, - { - "x": 264.5, - "y": 608.9 - }, - { - "x": 264.5, - "y": 682.5 - } - ], - "isCurve": true, - "animated": false, - "tooltip": "", - "icon": null, - "zIndex": 0 - }, - { - "id": "(sixty four -> ninety nine)[0]", - "src": "sixty four", - "srcArrow": "none", - "srcLabel": "", - "dst": "ninety nine", - "dstArrow": "triangle", - "dstLabel": "", - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "stroke": "#0D32B2", - "label": "eighty one", - "fontSize": 81, - "fontFamily": "DEFAULT", - "language": "", - "color": "#676C7E", - "italic": true, - "bold": false, - "underline": false, - "labelWidth": 341, - "labelHeight": 102, - "labelPosition": "INSIDE_MIDDLE_CENTER", - "labelPercentage": 0, - "route": [ - { - "x": 264.5, - "y": 808 - }, - { - "x": 264.5, - "y": 897.6 - }, - { - "x": 264.5, - "y": 942.4 - }, - { - "x": 264.5, - "y": 1032 - } - ], - "isCurve": true, - "animated": false, - "tooltip": "", - "icon": null, - "zIndex": 0 - } - ] -} diff --git a/e2etests/testdata/todo/font_sizes_large/dagre/sketch.exp.svg b/e2etests/testdata/todo/font_sizes_large/dagre/sketch.exp.svg deleted file mode 100644 index b1ae0379b..000000000 --- a/e2etests/testdata/todo/font_sizes_large/dagre/sketch.exp.svg +++ /dev/null @@ -1,62 +0,0 @@ - -eightsixteenthirty twosixty fourninety nine twelvetwenty fourforty eighteighty one - - - - - - \ No newline at end of file diff --git a/e2etests/testdata/todo/font_sizes_large/elk/board.exp.json b/e2etests/testdata/todo/font_sizes_large/elk/board.exp.json deleted file mode 100644 index 2ce3c9de3..000000000 --- a/e2etests/testdata/todo/font_sizes_large/elk/board.exp.json +++ /dev/null @@ -1,369 +0,0 @@ -{ - "name": "", - "fontFamily": "SourceSansPro", - "shapes": [ - { - "id": "eight", - "type": "rectangle", - "pos": { - "x": 244, - "y": 12 - }, - "width": 64, - "height": 56, - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "borderRadius": 0, - "fill": "#F7F8FE", - "stroke": "#0D32B2", - "shadow": false, - "3d": false, - "multiple": false, - "double-border": false, - "tooltip": "", - "link": "", - "icon": null, - "iconPosition": "", - "blend": false, - "fields": null, - "methods": null, - "columns": null, - "label": "eight", - "fontSize": 8, - "fontFamily": "DEFAULT", - "language": "", - "color": "#0A0F25", - "italic": false, - "bold": true, - "underline": false, - "labelWidth": 19, - "labelHeight": 11, - "labelPosition": "INSIDE_MIDDLE_CENTER", - "zIndex": 0, - "level": 1 - }, - { - "id": "sixteen", - "type": "rectangle", - "pos": { - "x": 228, - "y": 224 - }, - "width": 97, - "height": 66, - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "borderRadius": 0, - "fill": "#F7F8FE", - "stroke": "#0D32B2", - "shadow": false, - "3d": false, - "multiple": false, - "double-border": false, - "tooltip": "", - "link": "", - "icon": null, - "iconPosition": "", - "blend": false, - "fields": null, - "methods": null, - "columns": null, - "label": "sixteen", - "fontSize": 16, - "fontFamily": "DEFAULT", - "language": "", - "color": "#0A0F25", - "italic": false, - "bold": true, - "underline": false, - "labelWidth": 52, - "labelHeight": 21, - "labelPosition": "INSIDE_MIDDLE_CENTER", - "zIndex": 0, - "level": 1 - }, - { - "id": "thirty two", - "type": "rectangle", - "pos": { - "x": 183, - "y": 461 - }, - "width": 187, - "height": 86, - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "borderRadius": 0, - "fill": "#F7F8FE", - "stroke": "#0D32B2", - "shadow": false, - "3d": false, - "multiple": false, - "double-border": false, - "tooltip": "", - "link": "", - "icon": null, - "iconPosition": "", - "blend": false, - "fields": null, - "methods": null, - "columns": null, - "label": "thirty two", - "fontSize": 32, - "fontFamily": "DEFAULT", - "language": "", - "color": "#0A0F25", - "italic": false, - "bold": true, - "underline": false, - "labelWidth": 142, - "labelHeight": 41, - "labelPosition": "INSIDE_MIDDLE_CENTER", - "zIndex": 0, - "level": 1 - }, - { - "id": "sixty four", - "type": "rectangle", - "pos": { - "x": 119, - "y": 748 - }, - "width": 314, - "height": 126, - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "borderRadius": 0, - "fill": "#F7F8FE", - "stroke": "#0D32B2", - "shadow": false, - "3d": false, - "multiple": false, - "double-border": false, - "tooltip": "", - "link": "", - "icon": null, - "iconPosition": "", - "blend": false, - "fields": null, - "methods": null, - "columns": null, - "label": "sixty four", - "fontSize": 64, - "fontFamily": "DEFAULT", - "language": "", - "color": "#0A0F25", - "italic": false, - "bold": true, - "underline": false, - "labelWidth": 269, - "labelHeight": 81, - "labelPosition": "INSIDE_MIDDLE_CENTER", - "zIndex": 0, - "level": 1 - }, - { - "id": "ninety nine", - "type": "rectangle", - "pos": { - "x": 12, - "y": 1116 - }, - "width": 529, - "height": 170, - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "borderRadius": 0, - "fill": "#F7F8FE", - "stroke": "#0D32B2", - "shadow": false, - "3d": false, - "multiple": false, - "double-border": false, - "tooltip": "", - "link": "", - "icon": null, - "iconPosition": "", - "blend": false, - "fields": null, - "methods": null, - "columns": null, - "label": "ninety nine", - "fontSize": 99, - "fontFamily": "DEFAULT", - "language": "", - "color": "#0A0F25", - "italic": false, - "bold": true, - "underline": false, - "labelWidth": 484, - "labelHeight": 125, - "labelPosition": "INSIDE_MIDDLE_CENTER", - "zIndex": 0, - "level": 1 - } - ], - "connections": [ - { - "id": "(eight -> sixteen)[0]", - "src": "eight", - "srcArrow": "none", - "srcLabel": "", - "dst": "sixteen", - "dstArrow": "triangle", - "dstLabel": "", - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "stroke": "#0D32B2", - "label": "twelve", - "fontSize": 12, - "fontFamily": "DEFAULT", - "language": "", - "color": "#676C7E", - "italic": true, - "bold": false, - "underline": false, - "labelWidth": 33, - "labelHeight": 16, - "labelPosition": "INSIDE_MIDDLE_CENTER", - "labelPercentage": 0, - "route": [ - { - "x": 276.5, - "y": 68 - }, - { - "x": 276.5, - "y": 224 - } - ], - "animated": false, - "tooltip": "", - "icon": null, - "zIndex": 0 - }, - { - "id": "(sixteen -> thirty two)[0]", - "src": "sixteen", - "srcArrow": "none", - "srcLabel": "", - "dst": "thirty two", - "dstArrow": "triangle", - "dstLabel": "", - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "stroke": "#0D32B2", - "label": "twenty four", - "fontSize": 24, - "fontFamily": "DEFAULT", - "language": "", - "color": "#676C7E", - "italic": true, - "bold": false, - "underline": false, - "labelWidth": 114, - "labelHeight": 31, - "labelPosition": "INSIDE_MIDDLE_CENTER", - "labelPercentage": 0, - "route": [ - { - "x": 276.5, - "y": 290 - }, - { - "x": 276.5, - "y": 461 - } - ], - "animated": false, - "tooltip": "", - "icon": null, - "zIndex": 0 - }, - { - "id": "(thirty two -> sixty four)[0]", - "src": "thirty two", - "srcArrow": "none", - "srcLabel": "", - "dst": "sixty four", - "dstArrow": "triangle", - "dstLabel": "", - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "stroke": "#0D32B2", - "label": "forty eight", - "fontSize": 48, - "fontFamily": "DEFAULT", - "language": "", - "color": "#676C7E", - "italic": true, - "bold": false, - "underline": false, - "labelWidth": 202, - "labelHeight": 61, - "labelPosition": "INSIDE_MIDDLE_CENTER", - "labelPercentage": 0, - "route": [ - { - "x": 276.5, - "y": 547 - }, - { - "x": 276.5, - "y": 748 - } - ], - "animated": false, - "tooltip": "", - "icon": null, - "zIndex": 0 - }, - { - "id": "(sixty four -> ninety nine)[0]", - "src": "sixty four", - "srcArrow": "none", - "srcLabel": "", - "dst": "ninety nine", - "dstArrow": "triangle", - "dstLabel": "", - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "stroke": "#0D32B2", - "label": "eighty one", - "fontSize": 81, - "fontFamily": "DEFAULT", - "language": "", - "color": "#676C7E", - "italic": true, - "bold": false, - "underline": false, - "labelWidth": 341, - "labelHeight": 102, - "labelPosition": "INSIDE_MIDDLE_CENTER", - "labelPercentage": 0, - "route": [ - { - "x": 276.5, - "y": 874 - }, - { - "x": 276.5, - "y": 1116 - } - ], - "animated": false, - "tooltip": "", - "icon": null, - "zIndex": 0 - } - ] -} diff --git a/e2etests/testdata/todo/font_sizes_large/elk/sketch.exp.svg b/e2etests/testdata/todo/font_sizes_large/elk/sketch.exp.svg deleted file mode 100644 index 1c23a6832..000000000 --- a/e2etests/testdata/todo/font_sizes_large/elk/sketch.exp.svg +++ /dev/null @@ -1,62 +0,0 @@ - -eightsixteenthirty twosixty fourninety nine twelvetwenty fourforty eighteighty one - - - - - - \ No newline at end of file diff --git a/e2etests/testdata/todo/shape_set_width_height/dagre/board.exp.json b/e2etests/testdata/todo/shape_set_width_height/dagre/board.exp.json index 99d2ab56c..89b881a54 100644 --- a/e2etests/testdata/todo/shape_set_width_height/dagre/board.exp.json +++ b/e2etests/testdata/todo/shape_set_width_height/dagre/board.exp.json @@ -9,16 +9,8 @@ "x": 0, "y": 41 }, -<<<<<<< HEAD "width": 852, - "height": 376, -||||||| 749d236a - "width": 1112, - "height": 456, -======= - "width": 1112, "height": 415, ->>>>>>> master "opacity": 1, "strokeDash": 0, "strokeWidth": 2, @@ -55,27 +47,11 @@ "id": "containers.circle container", "type": "oval", "pos": { -<<<<<<< HEAD "x": 20, - "y": 30 -||||||| 749d236a - "x": 40, - "y": 50 -======= - "x": 40, "y": 106 ->>>>>>> master }, -<<<<<<< HEAD "width": 188, - "height": 316, -||||||| 749d236a - "width": 228, - "height": 356, -======= - "width": 228, "height": 320, ->>>>>>> master "opacity": 1, "strokeDash": 0, "strokeWidth": 2, @@ -112,16 +88,8 @@ "id": "containers.circle container.diamond", "type": "diamond", "pos": { -<<<<<<< HEAD "x": 50, - "y": 156 -||||||| 749d236a - "x": 90, - "y": 196 -======= - "x": 90, "y": 234 ->>>>>>> master }, "width": 128, "height": 64, @@ -161,27 +129,11 @@ "id": "containers.diamond container", "type": "diamond", "pos": { -<<<<<<< HEAD "x": 228, - "y": 30 -||||||| 749d236a - "x": 308, - "y": 50 -======= - "x": 308, "y": 106 ->>>>>>> master }, -<<<<<<< HEAD "width": 188, - "height": 316, -||||||| 749d236a - "width": 228, - "height": 356, -======= - "width": 228, "height": 320, ->>>>>>> master "opacity": 1, "strokeDash": 0, "strokeWidth": 2, @@ -218,16 +170,8 @@ "id": "containers.diamond container.circle", "type": "oval", "pos": { -<<<<<<< HEAD "x": 258, - "y": 124 -||||||| 749d236a - "x": 358, - "y": 164 -======= - "x": 358, "y": 202 ->>>>>>> master }, "width": 128, "height": 128, @@ -267,27 +211,11 @@ "id": "containers.oval container", "type": "oval", "pos": { -<<<<<<< HEAD "x": 436, - "y": 30 -||||||| 749d236a - "x": 576, - "y": 50 -======= - "x": 576, "y": 106 ->>>>>>> master }, -<<<<<<< HEAD "width": 188, - "height": 316, -||||||| 749d236a - "width": 228, - "height": 356, -======= - "width": 228, "height": 320, ->>>>>>> master "opacity": 1, "strokeDash": 0, "strokeWidth": 2, @@ -324,16 +252,8 @@ "id": "containers.oval container.hexagon", "type": "hexagon", "pos": { -<<<<<<< HEAD "x": 466, - "y": 156 -||||||| 749d236a - "x": 626, - "y": 196 -======= - "x": 626, "y": 234 ->>>>>>> master }, "width": 128, "height": 64, @@ -373,27 +293,11 @@ "id": "containers.hexagon container", "type": "hexagon", "pos": { -<<<<<<< HEAD "x": 644, - "y": 30 -||||||| 749d236a - "x": 844, - "y": 50 -======= - "x": 844, "y": 106 ->>>>>>> master }, -<<<<<<< HEAD "width": 188, - "height": 316, -||||||| 749d236a - "width": 228, - "height": 356, -======= - "width": 228, "height": 320, ->>>>>>> master "opacity": 1, "strokeDash": 0, "strokeWidth": 2, @@ -430,16 +334,8 @@ "id": "containers.hexagon container.oval", "type": "oval", "pos": { -<<<<<<< HEAD "x": 674, - "y": 156 -||||||| 749d236a - "x": 894, - "y": 196 -======= - "x": 894, "y": 234 ->>>>>>> master }, "width": 128, "height": 64, @@ -480,7 +376,7 @@ "type": "cloud", "pos": { "x": 882, - "y": 60 + "y": 100 }, "width": 512, "height": 256, @@ -521,7 +417,7 @@ "type": "cylinder", "pos": { "x": 1010, - "y": 1296 + "y": 1456 }, "width": 256, "height": 512, @@ -562,7 +458,7 @@ "type": "class", "pos": { "x": 738, - "y": 636 + "y": 756 }, "width": 800, "height": 400, @@ -637,7 +533,7 @@ "type": "sql_table", "pos": { "x": 738, - "y": 1868 + "y": 2068 }, "width": 800, "height": 400, @@ -821,7 +717,7 @@ "type": "rectangle", "pos": { "x": 1721, - "y": 155 + "y": 195 }, "width": 114, "height": 66, @@ -862,7 +758,7 @@ "type": "text", "pos": { "x": 1578, - "y": 436 + "y": 556 }, "width": 400, "height": 800, @@ -902,7 +798,7 @@ "type": "code", "pos": { "x": 1578, - "y": 1402 + "y": 1562 }, "width": 400, "height": 300, @@ -942,7 +838,7 @@ "type": "code", "pos": { "x": 1683, - "y": 2036 + "y": 2236 }, "width": 191, "height": 65, @@ -1006,31 +902,31 @@ "route": [ { "x": 1138, - "y": 315 + "y": 355 }, { "x": 1138, - "y": 339.8 + "y": 395.8 }, { "x": 1138, - "y": 352 + "y": 416 }, { "x": 1138, - "y": 361 + "y": 431 }, { "x": 1138, - "y": 370 + "y": 446 }, { "x": 1138, - "y": 452 + "y": 556 }, { "x": 1138, - "y": 636 + "y": 756 } ], "isCurve": true, @@ -1066,19 +962,19 @@ "route": [ { "x": 1138, - "y": 1036 + "y": 1156 }, { "x": 1138, - "y": 1220 + "y": 1356 }, { "x": 1138, - "y": 1272 + "y": 1416 }, { "x": 1138, - "y": 1296 + "y": 1456 } ], "isCurve": true, @@ -1114,19 +1010,19 @@ "route": [ { "x": 1138, - "y": 1808 + "y": 1968 }, { "x": 1138, - "y": 1832 + "y": 2008 }, { "x": 1138, - "y": 1844 + "y": 2028 }, { "x": 1138, - "y": 1868 + "y": 2068 } ], "isCurve": true, @@ -1162,31 +1058,31 @@ "route": [ { "x": 1778, - "y": 221 + "y": 261 }, { "x": 1778, - "y": 321 + "y": 377 }, { "x": 1778, - "y": 352 + "y": 416 }, { "x": 1778, - "y": 361 + "y": 431 }, { "x": 1778, - "y": 370 + "y": 446 }, { "x": 1778, - "y": 412 + "y": 516 }, { "x": 1778, - "y": 436 + "y": 556 } ], "isCurve": true, @@ -1222,19 +1118,19 @@ "route": [ { "x": 1778, - "y": 1236 + "y": 1356 }, { "x": 1778, - "y": 1260 + "y": 1396 }, { "x": 1778, - "y": 1293.2 + "y": 1437.2 }, { "x": 1778, - "y": 1402 + "y": 1562 } ], "isCurve": true, @@ -1270,19 +1166,19 @@ "route": [ { "x": 1778, - "y": 1702 + "y": 1862 }, { "x": 1778, - "y": 1810.8 + "y": 1986.8 }, { "x": 1778, - "y": 1877.5 + "y": 2061.5 }, { "x": 1778, - "y": 2035.5 + "y": 2235.5 } ], "isCurve": true, diff --git a/e2etests/testdata/todo/shape_set_width_height/dagre/sketch.exp.svg b/e2etests/testdata/todo/shape_set_width_height/dagre/sketch.exp.svg index 9b73925ff..a67d4c1b6 100644 --- a/e2etests/testdata/todo/shape_set_width_height/dagre/sketch.exp.svg +++ b/e2etests/testdata/todo/shape_set_width_height/dagre/sketch.exp.svg @@ -3,13 +3,7 @@ id="d2-svg" style="background: white;" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" -<<<<<<< HEAD -width="2182" height="2511" viewBox="-102 -141 2182 2511">containerscloudtall cylinderclass- -num -int- -timeout -int- -pid -+ -getStatus() -Enum+ -getJobs() -Job[]+ -setTimeout(seconds int) -voidusersid -int -name -string -email -string -password -string -last_login -datetime -container

                                                                                                          markdown text expanded to 800x400

                                                                                                          -
                                                                                                          := 5 -||||||| 749d236a -containerscloudtall cylinderclass- -num -int- -timeout -int- -pid -+ -getStatus() -Enum+ -getJobs() -Job[]+ -setTimeout(seconds int) -voidusersid -int -name -string -email -string -password -string -last_login -datetime -container

                                                                                                          markdown text expanded to 800x400

                                                                                                          -
                                                                                                          := 5 -======= -containerscloudtall cylinderclass- -num -int- -timeout -int- -pid -+ -getStatus() -Enum+ -getJobs() -Job[]+ -setTimeout(seconds int) -voidusersid -int -name -string -email -string -password -string -last_login -datetime -container

                                                                                                          markdown text expanded to 800x400

                                                                                                          -
                                                                                                          := 5 ->>>>>>> master +containerscloudtall cylinderclass- +num +int- +timeout +int- +pid ++ +getStatus() +Enum+ +getJobs() +Job[]+ +setTimeout(seconds int) +voidusersid +int +name +string +email +string +password +string +last_login +datetime +container

                                                                                                          markdown text expanded to 800x400

                                                                                                          +
                                                                                                          := 5 := a + 7 -fmt.Printf("%d", b):= 5 +fmt.Printf("%d", b):= 5 := a + 7 -<<<<<<< HEAD -fmt.Printf("%d", b)circle containerdiamond containeroval containerhexagon containerdiamondcirclehexagonoval - -||||||| 749d236a -
                                                                                                          fmt.Printf("%d", b)
                                                                                                          circle containerdiamond containeroval containerhexagon containerdiamondcirclehexagonoval - -======= -
                                                                                                          fmt.Printf("%d", b)
                                                                                                          circle containerdiamond containeroval containerhexagon containerdiamondcirclehexagonoval - ->>>>>>> master +
                                                                                                          fmt.Printf("%d", b)
                                                                                                          circle containerdiamond containeroval containerhexagon containerdiamondcirclehexagonoval + ab Thereoncewasaverytalledgelabel - - - \ No newline at end of file diff --git a/e2etests/testdata/todo/tall_edge_label/elk/board.exp.json b/e2etests/testdata/todo/tall_edge_label/elk/board.exp.json deleted file mode 100644 index cbf8f483c..000000000 --- a/e2etests/testdata/todo/tall_edge_label/elk/board.exp.json +++ /dev/null @@ -1,129 +0,0 @@ -{ - "name": "", - "fontFamily": "SourceSansPro", - "shapes": [ - { - "id": "a", - "type": "rectangle", - "pos": { - "x": 12, - "y": 12 - }, - "width": 53, - "height": 66, - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "borderRadius": 0, - "fill": "#F7F8FE", - "stroke": "#0D32B2", - "shadow": false, - "3d": false, - "multiple": false, - "double-border": false, - "tooltip": "", - "link": "", - "icon": null, - "iconPosition": "", - "blend": false, - "fields": null, - "methods": null, - "columns": null, - "label": "a", - "fontSize": 16, - "fontFamily": "DEFAULT", - "language": "", - "color": "#0A0F25", - "italic": false, - "bold": true, - "underline": false, - "labelWidth": 8, - "labelHeight": 21, - "labelPosition": "INSIDE_MIDDLE_CENTER", - "zIndex": 0, - "level": 1 - }, - { - "id": "b", - "type": "rectangle", - "pos": { - "x": 12, - "y": 351 - }, - "width": 53, - "height": 66, - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "borderRadius": 0, - "fill": "#F7F8FE", - "stroke": "#0D32B2", - "shadow": false, - "3d": false, - "multiple": false, - "double-border": false, - "tooltip": "", - "link": "", - "icon": null, - "iconPosition": "", - "blend": false, - "fields": null, - "methods": null, - "columns": null, - "label": "b", - "fontSize": 16, - "fontFamily": "DEFAULT", - "language": "", - "color": "#0A0F25", - "italic": false, - "bold": true, - "underline": false, - "labelWidth": 8, - "labelHeight": 21, - "labelPosition": "INSIDE_MIDDLE_CENTER", - "zIndex": 0, - "level": 1 - } - ], - "connections": [ - { - "id": "(a -> b)[0]", - "src": "a", - "srcArrow": "none", - "srcLabel": "", - "dst": "b", - "dstArrow": "triangle", - "dstLabel": "", - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "stroke": "#0D32B2", - "label": "There\nonce\nwas\na\nvery\ntall\nedge\nlabel", - "fontSize": 16, - "fontFamily": "DEFAULT", - "language": "", - "color": "#676C7E", - "italic": true, - "bold": false, - "underline": false, - "labelWidth": 38, - "labelHeight": 133, - "labelPosition": "INSIDE_MIDDLE_CENTER", - "labelPercentage": 0, - "route": [ - { - "x": 38.5, - "y": 78 - }, - { - "x": 38.5, - "y": 351 - } - ], - "animated": false, - "tooltip": "", - "icon": null, - "zIndex": 0 - } - ] -} diff --git a/e2etests/testdata/todo/tall_edge_label/elk/sketch.exp.svg b/e2etests/testdata/todo/tall_edge_label/elk/sketch.exp.svg deleted file mode 100644 index 33eff7e92..000000000 --- a/e2etests/testdata/todo/tall_edge_label/elk/sketch.exp.svg +++ /dev/null @@ -1,59 +0,0 @@ - -ab Thereoncewasaverytalledgelabel - - - \ No newline at end of file From 5b433fe6fca48bcd766b1595918eb228d972ec72 Mon Sep 17 00:00:00 2001 From: Alexander Wang Date: Fri, 10 Feb 2023 21:41:47 -0800 Subject: [PATCH 12/14] add cf sketch test --- d2renderers/d2sketch/sketch_test.go | 126 ++++++++++++++++++ .../testdata/crows_feet/sketch.exp.svg | 64 +++++++++ 2 files changed, 190 insertions(+) create mode 100644 d2renderers/d2sketch/testdata/crows_feet/sketch.exp.svg diff --git a/d2renderers/d2sketch/sketch_test.go b/d2renderers/d2sketch/sketch_test.go index ba733435a..e5e39d728 100644 --- a/d2renderers/d2sketch/sketch_test.go +++ b/d2renderers/d2sketch/sketch_test.go @@ -49,6 +49,132 @@ func TestSketch(t *testing.T) { script: `a -> b: hello `, }, + { + name: "crows feet", + script: `a1 <-> b1: { + style.stroke-width: 1 + source-arrowhead: { + shape: cf-many + } + target-arrowhead: { + shape: cf-many + } +} +a2 <-> b2: { + style.stroke-width: 3 + source-arrowhead: { + shape: cf-many + } + target-arrowhead: { + shape: cf-many + } +} +a3 <-> b3: { + style.stroke-width: 6 + source-arrowhead: { + shape: cf-many + } + target-arrowhead: { + shape: cf-many + } +} + +c1 <-> d1: { + style.stroke-width: 1 + source-arrowhead: { + shape: cf-many-required + } + target-arrowhead: { + shape: cf-many-required + } +} +c2 <-> d2: { + style.stroke-width: 3 + source-arrowhead: { + shape: cf-many-required + } + target-arrowhead: { + shape: cf-many-required + } +} +c3 <-> d3: { + style.stroke-width: 6 + source-arrowhead: { + shape: cf-many-required + } + target-arrowhead: { + shape: cf-many-required + } +} + +e1 <-> f1: { + style.stroke-width: 1 + source-arrowhead: { + shape: cf-one + } + target-arrowhead: { + shape: cf-one + } +} +e2 <-> f2: { + style.stroke-width: 3 + source-arrowhead: { + shape: cf-one + } + target-arrowhead: { + shape: cf-one + } +} +e3 <-> f3: { + style.stroke-width: 6 + source-arrowhead: { + shape: cf-one + } + target-arrowhead: { + shape: cf-one + } +} + +g1 <-> h1: { + style.stroke-width: 1 + source-arrowhead: { + shape: cf-one-required + } + target-arrowhead: { + shape: cf-one-required + } +} +g2 <-> h2: { + style.stroke-width: 3 + source-arrowhead: { + shape: cf-one-required + } + target-arrowhead: { + shape: cf-one-required + } +} +g3 <-> h3: { + style.stroke-width: 6 + source-arrowhead: { + shape: cf-one-required + } + target-arrowhead: { + shape: cf-one-required + } +} + +c <-> d <-> f: { + style.stroke-width: 1 + style.stroke: "orange" + source-arrowhead: { + shape: cf-many-required + } + target-arrowhead: { + shape: cf-one + } +} + `, + }, { name: "twitter", script: `timeline mixer: "" { diff --git a/d2renderers/d2sketch/testdata/crows_feet/sketch.exp.svg b/d2renderers/d2sketch/testdata/crows_feet/sketch.exp.svg new file mode 100644 index 000000000..724203e2b --- /dev/null +++ b/d2renderers/d2sketch/testdata/crows_feet/sketch.exp.svg @@ -0,0 +1,64 @@ + + + + + + +a1b1a2b2a3b3c1d1c2d2c3d3e1f1e2f2e3f3g1h1g2h2g3h3cdf + + + \ No newline at end of file From 019429edcf6272ca72ba94d830244f3ec6e47dd5 Mon Sep 17 00:00:00 2001 From: Alexander Wang Date: Fri, 10 Feb 2023 21:45:31 -0800 Subject: [PATCH 13/14] try different value --- d2layouts/d2dagrelayout/layout.go | 2 +- .../testdata/all_shapes/sketch.exp.svg | 6 +- .../d2sketch/testdata/animated/sketch.exp.svg | 6 +- .../testdata/arrowheads/sketch.exp.svg | 24 +- .../testdata/child_to_child/sketch.exp.svg | 6 +- .../testdata/crows_feet/sketch.exp.svg | 6 +- .../d2sketch/testdata/opacity/sketch.exp.svg | 12 +- .../testdata/sql_tables/sketch.exp.svg | 50 +- .../d2sketch/testdata/twitter/sketch.exp.svg | 22 +- .../dagre/board.exp.json | 4 +- .../dagre/sketch.exp.svg | 10 +- .../dagre/board.exp.json | 38 +- .../dagre/sketch.exp.svg | 8 +- .../dagre/board.exp.json | 44 +- .../dagre/sketch.exp.svg | 14 +- .../dagre_special_ids/dagre/board.exp.json | 44 +- .../dagre_special_ids/dagre/sketch.exp.svg | 6 +- .../elk_alignment/dagre/board.exp.json | 94 +- .../elk_alignment/dagre/sketch.exp.svg | 22 +- .../dagre/board.exp.json | 2 +- .../dagre/sketch.exp.svg | 6 +- .../elk_loop_panic/dagre/board.exp.json | 40 +- .../elk_loop_panic/dagre/sketch.exp.svg | 6 +- .../regression/elk_order/dagre/board.exp.json | 56 +- .../regression/elk_order/dagre/sketch.exp.svg | 14 +- .../empty_class_height/dagre/board.exp.json | 2 +- .../empty_class_height/dagre/sketch.exp.svg | 6 +- .../opacity-on-label/dagre/board.exp.json | 2 +- .../opacity-on-label/dagre/sketch.exp.svg | 8 +- .../dagre/board.exp.json | 52 +- .../dagre/sketch.exp.svg | 14 +- .../sql_table_overflow/dagre/board.exp.json | 2 +- .../sql_table_overflow/dagre/sketch.exp.svg | 14 +- .../sanity/1_to_2/dagre/board.exp.json | 16 +- .../sanity/1_to_2/dagre/sketch.exp.svg | 6 +- .../child_to_child/dagre/board.exp.json | 22 +- .../child_to_child/dagre/sketch.exp.svg | 6 +- .../stable/all_shapes/dagre/board.exp.json | 100 +- .../stable/all_shapes/dagre/sketch.exp.svg | 6 +- .../all_shapes_multiple/dagre/board.exp.json | 100 +- .../all_shapes_multiple/dagre/sketch.exp.svg | 6 +- .../all_shapes_shadow/dagre/board.exp.json | 100 +- .../all_shapes_shadow/dagre/sketch.exp.svg | 6 +- .../stable/animated/dagre/board.exp.json | 84 +- .../stable/animated/dagre/sketch.exp.svg | 8 +- .../arrowhead_adjustment/dagre/board.exp.json | 60 +- .../arrowhead_adjustment/dagre/sketch.exp.svg | 6 +- .../stable/binary_tree/dagre/board.exp.json | 160 +- .../stable/binary_tree/dagre/sketch.exp.svg | 6 +- .../stable/border-radius/dagre/board.exp.json | 2 +- .../stable/border-radius/dagre/sketch.exp.svg | 6 +- .../stable/chaos1/dagre/board.exp.json | 30 +- .../stable/chaos1/dagre/sketch.exp.svg | 10 +- .../stable/chaos2/dagre/board.exp.json | 206 +- .../stable/chaos2/dagre/sketch.exp.svg | 22 +- .../circle_arrowhead/dagre/board.exp.json | 12 +- .../circle_arrowhead/dagre/sketch.exp.svg | 8 +- .../complex-layers/dagre/board.exp.json | 28 +- .../complex-layers/dagre/sketch.exp.svg | 6 +- .../connected_container/dagre/board.exp.json | 48 +- .../connected_container/dagre/sketch.exp.svg | 6 +- .../constant_near_title/dagre/board.exp.json | 46 +- .../constant_near_title/dagre/sketch.exp.svg | 8 +- .../container_edges/dagre/board.exp.json | 76 +- .../container_edges/dagre/sketch.exp.svg | 6 +- .../crow_foot_arrowhead/dagre/board.exp.json | 154 +- .../crow_foot_arrowhead/dagre/sketch.exp.svg | 6 +- .../stable/dense/dagre/board.exp.json | 360 ++-- .../stable/dense/dagre/sketch.exp.svg | 6 +- .../different_subgraphs/dagre/board.exp.json | 184 +- .../different_subgraphs/dagre/sketch.exp.svg | 6 +- .../stable/direction/dagre/board.exp.json | 124 +- .../stable/direction/dagre/sketch.exp.svg | 6 +- .../stable/font_sizes/dagre/board.exp.json | 36 +- .../stable/font_sizes/dagre/sketch.exp.svg | 10 +- .../dagre/board.exp.json | 10 +- .../dagre/sketch.exp.svg | 4 +- .../stable/investigate/dagre/board.exp.json | 662 +++--- .../stable/investigate/dagre/sketch.exp.svg | 18 +- .../stable/large_arch/dagre/board.exp.json | 464 ++--- .../stable/large_arch/dagre/sketch.exp.svg | 6 +- .../stable/latex/dagre/board.exp.json | 54 +- .../stable/latex/dagre/sketch.exp.svg | 8 +- .../markdown_stroke_fill/dagre/board.exp.json | 14 +- .../markdown_stroke_fill/dagre/sketch.exp.svg | 10 +- .../md_2space_newline/dagre/board.exp.json | 4 +- .../md_2space_newline/dagre/sketch.exp.svg | 8 +- .../md_backslash_newline/dagre/board.exp.json | 4 +- .../md_backslash_newline/dagre/sketch.exp.svg | 8 +- .../multiple_trees/dagre/board.exp.json | 248 +-- .../multiple_trees/dagre/sketch.exp.svg | 6 +- .../stable/n22_e32/dagre/board.exp.json | 544 ++--- .../stable/n22_e32/dagre/sketch.exp.svg | 6 +- .../number_connections/dagre/board.exp.json | 12 +- .../number_connections/dagre/sketch.exp.svg | 6 +- .../one_container_loop/dagre/board.exp.json | 130 +- .../one_container_loop/dagre/sketch.exp.svg | 6 +- .../dagre/board.exp.json | 78 +- .../dagre/sketch.exp.svg | 6 +- .../dagre/board.exp.json | 94 +- .../dagre/sketch.exp.svg | 18 +- .../stable/people/dagre/board.exp.json | 22 +- .../stable/people/dagre/sketch.exp.svg | 6 +- .../self-referencing/dagre/board.exp.json | 118 +- .../self-referencing/dagre/sketch.exp.svg | 8 +- .../sequence_diagrams/dagre/board.exp.json | 278 +-- .../sequence_diagrams/dagre/sketch.exp.svg | 30 +- .../dagre/board.exp.json | 6 +- .../dagre/sketch.exp.svg | 62 +- .../stable/sql_tables/dagre/board.exp.json | 34 +- .../stable/sql_tables/dagre/sketch.exp.svg | 50 +- .../dagre/board.exp.json | 228 +-- .../dagre/sketch.exp.svg | 6 +- .../text_font_sizes/dagre/board.exp.json | 16 +- .../text_font_sizes/dagre/sketch.exp.svg | 6 +- .../stable/us_map/dagre/board.exp.json | 1796 ++++++++--------- .../stable/us_map/dagre/sketch.exp.svg | 6 +- .../child_parent_edges/dagre/board.exp.json | 84 +- .../child_parent_edges/dagre/sketch.exp.svg | 6 +- .../container_child_edge/dagre/board.exp.json | 22 +- .../container_child_edge/dagre/sketch.exp.svg | 10 +- .../container_icon_label/dagre/board.exp.json | 26 +- .../container_icon_label/dagre/sketch.exp.svg | 6 +- .../container_label_loop/dagre/board.exp.json | 48 +- .../container_label_loop/dagre/sketch.exp.svg | 4 +- .../dagre/board.exp.json | 100 +- .../dagre/sketch.exp.svg | 56 +- 127 files changed, 4104 insertions(+), 4104 deletions(-) diff --git a/d2layouts/d2dagrelayout/layout.go b/d2layouts/d2dagrelayout/layout.go index d8e0476ab..a3d943200 100644 --- a/d2layouts/d2dagrelayout/layout.go +++ b/d2layouts/d2dagrelayout/layout.go @@ -41,7 +41,7 @@ type ConfigurableOpts struct { } var DefaultOpts = ConfigurableOpts{ - NodeSep: 40, + NodeSep: 60, EdgeSep: 20, } diff --git a/d2renderers/d2sketch/testdata/all_shapes/sketch.exp.svg b/d2renderers/d2sketch/testdata/all_shapes/sketch.exp.svg index 8835236a2..6e4e30c89 100644 --- a/d2renderers/d2sketch/testdata/all_shapes/sketch.exp.svg +++ b/d2renderers/d2sketch/testdata/all_shapes/sketch.exp.svg @@ -3,7 +3,7 @@ id="d2-svg" style="background: white;" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" -width="1310" height="712" viewBox="-102 -102 1310 712"> \ No newline at end of file diff --git a/e2etests/testdata/regression/elk_loop_panic/dagre/board.exp.json b/e2etests/testdata/regression/elk_loop_panic/dagre/board.exp.json index 8ed66324b..7eefdfb9a 100644 --- a/e2etests/testdata/regression/elk_loop_panic/dagre/board.exp.json +++ b/e2etests/testdata/regression/elk_loop_panic/dagre/board.exp.json @@ -9,7 +9,7 @@ "x": 0, "y": 41 }, - "width": 226, + "width": 266, "height": 125, "opacity": 1, "strokeDash": 0, @@ -47,7 +47,7 @@ "id": "x.a", "type": "rectangle", "pos": { - "x": 30, + "x": 40, "y": 70 }, "width": 53, @@ -88,7 +88,7 @@ "id": "x.b", "type": "rectangle", "pos": { - "x": 143, + "x": 173, "y": 70 }, "width": 53, @@ -153,56 +153,56 @@ "labelPercentage": 0, "route": [ { - "x": 83, - "y": 84.69354838709677 + "x": 93, + "y": 87.05172413793103 }, { - "x": 99, - "y": 73.33870967741936 + "x": 114.33333333333334, + "y": 73.8103448275862 }, { - "x": 104, + "x": 121, "y": 70.5 }, { - "x": 105.5, + "x": 123, "y": 70.5 }, { - "x": 107, + "x": 125.00000000000001, "y": 70.5 }, { - "x": 109, + "x": 127.66666666666667, "y": 77.1 }, { - "x": 110.5, + "x": 129.66666666666669, "y": 87 }, { - "x": 112, + "x": 131.66666666666666, "y": 96.9 }, { - "x": 112, + "x": 131.66666666666666, "y": 110.1 }, { - "x": 110.5, + "x": 129.66666666666669, "y": 120 }, { - "x": 109, + "x": 127.66666666666667, "y": 129.9 }, { - "x": 99, - "y": 133.66129032258064 + "x": 114.33333333333334, + "y": 133.18965517241378 }, { - "x": 83, - "y": 122.30645161290323 + "x": 93, + "y": 119.94827586206897 } ], "isCurve": true, diff --git a/e2etests/testdata/regression/elk_loop_panic/dagre/sketch.exp.svg b/e2etests/testdata/regression/elk_loop_panic/dagre/sketch.exp.svg index 40f7e5ee1..636457be9 100644 --- a/e2etests/testdata/regression/elk_loop_panic/dagre/sketch.exp.svg +++ b/e2etests/testdata/regression/elk_loop_panic/dagre/sketch.exp.svg @@ -3,7 +3,7 @@ id="d2-svg" style="background: white;" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" -width="430" height="368" viewBox="-102 -100 430 368">

                                                                                                          Oldest message

                                                                                                          -

                                                                                                          Offset

                                                                                                          -

                                                                                                          Last message

                                                                                                          -

                                                                                                          Next message will be
                                                                                                          +

                                                                                                          Oldest message

                                                                                                          +

                                                                                                          Offset

                                                                                                          +

                                                                                                          Last message

                                                                                                          +

                                                                                                          Next message will be
                                                                                                          inserted here

                                                                                                          -
                                                                                                          M0M1M2M3M4M5M6 - +
                                                                                                          M0M1M2M3M4M5M6 + x

                                                                                                          linux: because a PC is a terrible thing to waste

                                                                                                          -
                                                                                                          a You don't have to know how the computer works,just how to work the computer. - +x

                                                                                                          linux: because a PC is a terrible thing to waste

                                                                                                          +
                                                                                                          a You don't have to know how the computer works,just how to work the computer. + aabbllmmnnoocciikkddgghhjjeeff1122 334455667788 - - - - - - - - - +aabbllmmnnoocciikkddgghhjjeeff1122 334455667788 + + + + + + + + + poll the peopleresultsunfavorablefavorablewill of the people

                                                                                                          A winning strategy

                                                                                                          -
                                                                                                          - +poll the peopleresultsunfavorablefavorablewill of the people

                                                                                                          A winning strategy

                                                                                                          +
                                                                                                          + mixed togethersugarsolution we get - - +mixed togethersugarsolution we get + + container

                                                                                                          they did it in style

                                                                                                          -

                                                                                                          a header

                                                                                                          +container

                                                                                                          they did it in style

                                                                                                          +

                                                                                                          a header

                                                                                                          a line of text and an

                                                                                                          {
                                                                                                           	indented: "block",
                                                                                                          @@ -805,8 +805,8 @@ width="476" height="684" viewBox="-102 -100 476 684">markdown

                                                                                                          Lorem ipsum dolor sit amet, consectetur adipiscing elit,
                                                                                                          +markdown

                                                                                                          Lorem ipsum dolor sit amet, consectetur adipiscing elit,
                                                                                                          sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

                                                                                                          -
                                                                                                          - +
                                                                                                          + markdown

                                                                                                          Lorem ipsum dolor sit amet, consectetur adipiscing elit,
                                                                                                          +markdown

                                                                                                          Lorem ipsum dolor sit amet, consectetur adipiscing elit,
                                                                                                          sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

                                                                                                          -
                                                                                                          - +
                                                                                                          + bearmama bearpapa bear - +bearmama bearpapa bear + containerscloudtall cylinderclass- -num -int- -timeout -int- -pid -+ -getStatus() -Enum+ -getJobs() -Job[]+ -setTimeout(seconds int) -voidusersid -int -name -string -email -string -password -string -last_login -datetime -container

                                                                                                          markdown text expanded to 800x400

                                                                                                          -
                                                                                                          := 5 +containerscloudtall cylinderclass- +num +int- +timeout +int- +pid ++ +getStatus() +Enum+ +getJobs() +Job[]+ +setTimeout(seconds int) +voidusersid +int +name +string +email +string +password +string +last_login +datetime +container

                                                                                                          markdown text expanded to 800x400

                                                                                                          +
                                                                                                          := 5 := a + 7 -fmt.Printf("%d", b):= 5 +fmt.Printf("%d", b):= 5 := a + 7 -fmt.Printf("%d", b)circle containerdiamond containeroval containerhexagon containerdiamondcirclehexagonoval - +
                                                                                                          fmt.Printf("%d", b)
                                                                                                          circle containerdiamond containeroval containerhexagon containerdiamondcirclehexagonoval +