From c92acbb85bff3aa51891ecd2ccdb238922337ead Mon Sep 17 00:00:00 2001 From: MxHonesty Date: Tue, 5 Nov 2024 01:02:09 +0200 Subject: [PATCH 1/3] add support for cross arrowhead --- d2renderers/d2sketch/sketch.go | 7 + d2renderers/d2svg/d2svg.go | 45 + d2target/d2target.go | 9 + e2etests/stable_test.go | 1 + e2etests/testdata/files/cross_arrowhead.d2 | 29 + .../cross_arrowhead/dagre/board.exp.json | 875 ++++++++++++++++++ .../cross_arrowhead/dagre/sketch.exp.svg | 124 +++ .../stable/cross_arrowhead/elk/board.exp.json | 770 +++++++++++++++ .../stable/cross_arrowhead/elk/sketch.exp.svg | 124 +++ .../dagre/board.exp.json | 186 ++++ .../dagre/sketch.exp.svg | 104 +++ .../sketch-cross-arrowhead/elk/board.exp.json | 177 ++++ .../sketch-cross-arrowhead/elk/sketch.exp.svg | 104 +++ e2etests/txtar.txt | 13 + 14 files changed, 2568 insertions(+) create mode 100644 e2etests/testdata/files/cross_arrowhead.d2 create mode 100644 e2etests/testdata/stable/cross_arrowhead/dagre/board.exp.json create mode 100644 e2etests/testdata/stable/cross_arrowhead/dagre/sketch.exp.svg create mode 100644 e2etests/testdata/stable/cross_arrowhead/elk/board.exp.json create mode 100644 e2etests/testdata/stable/cross_arrowhead/elk/sketch.exp.svg create mode 100644 e2etests/testdata/txtar/sketch-cross-arrowhead/dagre/board.exp.json create mode 100644 e2etests/testdata/txtar/sketch-cross-arrowhead/dagre/sketch.exp.svg create mode 100644 e2etests/testdata/txtar/sketch-cross-arrowhead/elk/board.exp.json create mode 100644 e2etests/testdata/txtar/sketch-cross-arrowhead/elk/sketch.exp.svg diff --git a/d2renderers/d2sketch/sketch.go b/d2renderers/d2sketch/sketch.go index f873eda78..70e917fe3 100644 --- a/d2renderers/d2sketch/sketch.go +++ b/d2renderers/d2sketch/sketch.go @@ -798,6 +798,13 @@ func ArrowheadJS(r *Runner, arrowhead d2target.Arrowhead, stroke string, strokeW stroke, stroke, ) + case d2target.CrossArrowhead: + arrowJS = fmt.Sprintf( + `node = rc.linearPath(%s, { strokeWidth: %d, stroke: "%s", seed: 3 })`, + `[[-6, -6], [6, 6], [0, 0], [-6, 6], [0, 0], [6, -6]]`, + strokeWidth, + stroke, + ) case d2target.CfManyRequired: arrowJS = fmt.Sprintf( // TODO why does fillStyle: "zigzag" error with path diff --git a/d2renderers/d2svg/d2svg.go b/d2renderers/d2svg/d2svg.go index a0e2c14ad..89b31f644 100644 --- a/d2renderers/d2svg/d2svg.go +++ b/d2renderers/d2svg/d2svg.go @@ -285,6 +285,51 @@ func arrowheadMarker(isTarget bool, id string, connection d2target.Connection, i } path = circleEl.Render() + case d2target.CrossArrowhead: + inset := strokeWidth / 8 + rotationAngle := math.Pi / 4 + origin := geo.NewPoint(width/2, height/2) + newOrigin := geo.NewPoint(math.Cos(rotationAngle)*origin.X-math.Sin(rotationAngle)*origin.Y, math.Sin(rotationAngle)*origin.X+math.Cos(rotationAngle)*origin.Y) + + crossEl := d2themes.NewThemableElement("polygon", inlineTheme) + crossEl.Points = fmt.Sprintf("%f,%f %f,%f %f,%f %f,%f, %f,%f %f,%f %f,%f %f,%f %f,%f %f,%f %f,%f %f,%f", + 0., height/2+inset, + width/2-inset, height/2+inset, + width/2-inset, height, + width/2+inset, height, + width/2+inset, height/2+inset, + width, height/2+inset, + width, height/2-inset, + width/2+inset, height/2-inset, + width/2+inset, 0., + width/2-inset, 0., + width/2-inset, height/2-inset, + 0., height/2-inset, + ) + crossEl.Transform = fmt.Sprintf("translate(%f, %f) rotate(45)", -newOrigin.X+width/2, -newOrigin.Y+height/2) + + childPathEl := d2themes.NewThemableElement("path", inlineTheme) + if isTarget { + childPathEl.D = fmt.Sprintf("M%f,%f %f,%f", + width/2, height/2, + width, height/2, + ) + } else { + childPathEl.D = fmt.Sprintf("M%f,%f %f,%f", + width/2, height/2, + 0., height/2, + ) + } + + gEl := d2themes.NewThemableElement("g", inlineTheme) + gEl.Fill = d2target.BG_COLOR + gEl.Stroke = connection.Stroke + gEl.ClassName = "connection" + gEl.Attributes = fmt.Sprintf(`stroke-width="%d"`, connection.StrokeWidth) + gEl.Content = fmt.Sprintf("%s%s", + crossEl.Render(), childPathEl.Render(), + ) + path = gEl.Render() case d2target.CfOne, d2target.CfMany, d2target.CfOneRequired, d2target.CfManyRequired: offset := 3.0 + float64(connection.StrokeWidth)*1.8 diff --git a/d2target/d2target.go b/d2target/d2target.go index fe6eba11f..299df25a7 100644 --- a/d2target/d2target.go +++ b/d2target/d2target.go @@ -748,6 +748,7 @@ const ( FilledDiamondArrowhead Arrowhead = "filled-diamond" CircleArrowhead Arrowhead = "circle" FilledCircleArrowhead Arrowhead = "filled-circle" + CrossArrowhead Arrowhead = "cross" // For fat arrows LineArrowhead Arrowhead = "line" @@ -772,6 +773,7 @@ var Arrowheads = map[string]struct{}{ string(CfMany): {}, string(CfOneRequired): {}, string(CfManyRequired): {}, + string(CrossArrowhead): {}, } func ToArrowhead(arrowheadType string, filled *bool) Arrowhead { @@ -795,6 +797,8 @@ func ToArrowhead(arrowheadType string, filled *bool) Arrowhead { return UnfilledTriangleArrowhead } return TriangleArrowhead + case string(CrossArrowhead): + return CrossArrowhead case string(CfOne): return CfOne case string(CfMany): @@ -844,6 +848,11 @@ func (arrowhead Arrowhead) Dimensions(strokeWidth float64) (width, height float6 baseHeight = 9 widthMultiplier = 5.5 heightMultiplier = 4.5 + case CrossArrowhead: + baseWidth = 7 + baseHeight = 7 + widthMultiplier = 5 + heightMultiplier = 5 case FilledCircleArrowhead, CircleArrowhead: baseWidth = 8 baseHeight = 8 diff --git a/e2etests/stable_test.go b/e2etests/stable_test.go index 376545c87..56e85e132 100644 --- a/e2etests/stable_test.go +++ b/e2etests/stable_test.go @@ -2881,6 +2881,7 @@ y: profits { loadFromFile(t, "unfilled_triangle"), loadFromFile(t, "grid_container_dimensions"), loadFromFile(t, "grid_label_positions"), + loadFromFile(t, "cross_arrowhead"), } runa(t, tcs) diff --git a/e2etests/testdata/files/cross_arrowhead.d2 b/e2etests/testdata/files/cross_arrowhead.d2 new file mode 100644 index 000000000..7573011de --- /dev/null +++ b/e2etests/testdata/files/cross_arrowhead.d2 @@ -0,0 +1,29 @@ +cross: { + start: "" + end: "" + start.1 <-> end.1: 1 { + style.stroke-width: 1 + source-arrowhead.shape: cross + target-arrowhead.shape: cross + } + start.2 <-> end.2: 2 { + style.stroke-width: 2 + source-arrowhead.shape: cross + target-arrowhead.shape: cross + } + start.4 <-> end.4: 4 { + style.stroke-width: 4 + source-arrowhead.shape: cross + target-arrowhead.shape: cross + } + start.8 <-> end.8: 8 { + style.stroke-width: 8 + source-arrowhead.shape: cross + target-arrowhead.shape: cross + } + start.15 <-> end.15: 15 { + style.stroke-width: 15 + source-arrowhead.shape: cross + target-arrowhead.shape: cross + } +} diff --git a/e2etests/testdata/stable/cross_arrowhead/dagre/board.exp.json b/e2etests/testdata/stable/cross_arrowhead/dagre/board.exp.json new file mode 100644 index 000000000..9c31c0417 --- /dev/null +++ b/e2etests/testdata/stable/cross_arrowhead/dagre/board.exp.json @@ -0,0 +1,875 @@ +{ + "name": "", + "isFolderOnly": false, + "fontFamily": "SourceSansPro", + "shapes": [ + { + "id": "cross", + "type": "rectangle", + "pos": { + "x": 0, + "y": 40 + }, + "width": 633, + "height": 473, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B4", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "cross", + "fontSize": 28, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 60, + "labelHeight": 36, + "labelPosition": "OUTSIDE_TOP_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "cross.start", + "type": "rectangle", + "pos": { + "x": 30, + "y": 70 + }, + "width": 573, + "height": 126, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B5", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "", + "fontSize": 24, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "zIndex": 0, + "level": 2 + }, + { + "id": "cross.end", + "type": "rectangle", + "pos": { + "x": 30, + "y": 357 + }, + "width": 573, + "height": 126, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B5", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "", + "fontSize": 24, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "zIndex": 0, + "level": 2 + }, + { + "id": "cross.start.1", + "type": "rectangle", + "pos": { + "x": 60, + "y": 100 + }, + "width": 52, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B6", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "1", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 7, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 3 + }, + { + "id": "cross.end.1", + "type": "rectangle", + "pos": { + "x": 60, + "y": 387 + }, + "width": 52, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B6", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "1", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 7, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 3 + }, + { + "id": "cross.start.2", + "type": "rectangle", + "pos": { + "x": 172, + "y": 100 + }, + "width": 53, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B6", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "2", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 8, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 3 + }, + { + "id": "cross.end.2", + "type": "rectangle", + "pos": { + "x": 172, + "y": 387 + }, + "width": 53, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B6", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "2", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 8, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 3 + }, + { + "id": "cross.start.4", + "type": "rectangle", + "pos": { + "x": 285, + "y": 100 + }, + "width": 54, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B6", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "4", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 9, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 3 + }, + { + "id": "cross.end.4", + "type": "rectangle", + "pos": { + "x": 285, + "y": 387 + }, + "width": 54, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B6", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "4", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 9, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 3 + }, + { + "id": "cross.start.8", + "type": "rectangle", + "pos": { + "x": 399, + "y": 100 + }, + "width": 53, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B6", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "8", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 8, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 3 + }, + { + "id": "cross.end.8", + "type": "rectangle", + "pos": { + "x": 399, + "y": 387 + }, + "width": 53, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B6", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "8", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 8, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 3 + }, + { + "id": "cross.start.15", + "type": "rectangle", + "pos": { + "x": 512, + "y": 100 + }, + "width": 61, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B6", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "15", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 16, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 3 + }, + { + "id": "cross.end.15", + "type": "rectangle", + "pos": { + "x": 512, + "y": 387 + }, + "width": 61, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B6", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "15", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 16, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 3 + } + ], + "connections": [ + { + "id": "cross.(start.1 <-> end.1)[0]", + "src": "cross.start.1", + "srcArrow": "cross", + "dst": "cross.end.1", + "dstArrow": "cross", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 1, + "stroke": "B1", + "borderRadius": 10, + "label": "1", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 7, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "labelPercentage": 0, + "route": [ + { + "x": 86, + "y": 166 + }, + { + "x": 86, + "y": 206 + }, + { + "x": 86, + "y": 228.10000610351562 + }, + { + "x": 86, + "y": 246.25 + }, + { + "x": 86, + "y": 264.3999938964844 + }, + { + "x": 86, + "y": 347 + }, + { + "x": 86, + "y": 387 + } + ], + "isCurve": true, + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 0 + }, + { + "id": "cross.(start.2 <-> end.2)[0]", + "src": "cross.start.2", + "srcArrow": "cross", + "dst": "cross.end.2", + "dstArrow": "cross", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "B1", + "borderRadius": 10, + "label": "2", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 9, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "labelPercentage": 0, + "route": [ + { + "x": 198.5, + "y": 166 + }, + { + "x": 198.5, + "y": 206 + }, + { + "x": 198.5, + "y": 228.10000610351562 + }, + { + "x": 198.5, + "y": 246.25 + }, + { + "x": 198.5, + "y": 264.3999938964844 + }, + { + "x": 198.5, + "y": 347 + }, + { + "x": 198.5, + "y": 387 + } + ], + "isCurve": true, + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 0 + }, + { + "id": "cross.(start.4 <-> end.4)[0]", + "src": "cross.start.4", + "srcArrow": "cross", + "dst": "cross.end.4", + "dstArrow": "cross", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 4, + "stroke": "B1", + "borderRadius": 10, + "label": "4", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 8, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "labelPercentage": 0, + "route": [ + { + "x": 312, + "y": 166 + }, + { + "x": 312, + "y": 206 + }, + { + "x": 312, + "y": 228.10000610351562 + }, + { + "x": 312, + "y": 246.25 + }, + { + "x": 312, + "y": 264.3999938964844 + }, + { + "x": 312, + "y": 347 + }, + { + "x": 312, + "y": 387 + } + ], + "isCurve": true, + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 0 + }, + { + "id": "cross.(start.8 <-> end.8)[0]", + "src": "cross.start.8", + "srcArrow": "cross", + "dst": "cross.end.8", + "dstArrow": "cross", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 8, + "stroke": "B1", + "borderRadius": 10, + "label": "8", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 8, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "labelPercentage": 0, + "route": [ + { + "x": 425.5, + "y": 166 + }, + { + "x": 425.5, + "y": 206 + }, + { + "x": 425.5, + "y": 228.10000610351562 + }, + { + "x": 425.5, + "y": 246.25 + }, + { + "x": 425.5, + "y": 264.3999938964844 + }, + { + "x": 425.5, + "y": 347 + }, + { + "x": 425.5, + "y": 387 + } + ], + "isCurve": true, + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 0 + }, + { + "id": "cross.(start.15 <-> end.15)[0]", + "src": "cross.start.15", + "srcArrow": "cross", + "dst": "cross.end.15", + "dstArrow": "cross", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 15, + "stroke": "B1", + "borderRadius": 10, + "label": "15", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 16, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "labelPercentage": 0, + "route": [ + { + "x": 542.5, + "y": 166 + }, + { + "x": 542.5, + "y": 206 + }, + { + "x": 542.5, + "y": 228.10000610351562 + }, + { + "x": 542.5, + "y": 246.25 + }, + { + "x": 542.5, + "y": 264.3999938964844 + }, + { + "x": 542.5, + "y": 347 + }, + { + "x": 542.5, + "y": 387 + } + ], + "isCurve": true, + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 0 + } + ], + "root": { + "id": "", + "type": "", + "pos": { + "x": 0, + "y": 0 + }, + "width": 0, + "height": 0, + "opacity": 0, + "strokeDash": 0, + "strokeWidth": 0, + "borderRadius": 0, + "fill": "N7", + "stroke": "", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "", + "fontSize": 0, + "fontFamily": "", + "language": "", + "color": "", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "zIndex": 0, + "level": 0 + } +} diff --git a/e2etests/testdata/stable/cross_arrowhead/dagre/sketch.exp.svg b/e2etests/testdata/stable/cross_arrowhead/dagre/sketch.exp.svg new file mode 100644 index 000000000..e029be562 --- /dev/null +++ b/e2etests/testdata/stable/cross_arrowhead/dagre/sketch.exp.svg @@ -0,0 +1,124 @@ +cross112244881515 1 2 4 8 15 + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/e2etests/testdata/stable/cross_arrowhead/elk/board.exp.json b/e2etests/testdata/stable/cross_arrowhead/elk/board.exp.json new file mode 100644 index 000000000..6a9896c61 --- /dev/null +++ b/e2etests/testdata/stable/cross_arrowhead/elk/board.exp.json @@ -0,0 +1,770 @@ +{ + "name": "", + "isFolderOnly": false, + "fontFamily": "SourceSansPro", + "shapes": [ + { + "id": "cross", + "type": "rectangle", + "pos": { + "x": 12, + "y": 12 + }, + "width": 553, + "height": 603, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B4", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "cross", + "fontSize": 28, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 60, + "labelHeight": 36, + "labelPosition": "INSIDE_TOP_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "cross.start", + "type": "rectangle", + "pos": { + "x": 62, + "y": 62 + }, + "width": 453, + "height": 166, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B5", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "", + "fontSize": 24, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "zIndex": 0, + "level": 2 + }, + { + "id": "cross.end", + "type": "rectangle", + "pos": { + "x": 62, + "y": 399 + }, + "width": 453, + "height": 166, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B5", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "", + "fontSize": 24, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "zIndex": 0, + "level": 2 + }, + { + "id": "cross.start.1", + "type": "rectangle", + "pos": { + "x": 112, + "y": 112 + }, + "width": 52, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B6", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "1", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 7, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 3 + }, + { + "id": "cross.end.1", + "type": "rectangle", + "pos": { + "x": 112, + "y": 449 + }, + "width": 52, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B6", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "1", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 7, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 3 + }, + { + "id": "cross.start.2", + "type": "rectangle", + "pos": { + "x": 184, + "y": 112 + }, + "width": 53, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B6", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "2", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 8, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 3 + }, + { + "id": "cross.end.2", + "type": "rectangle", + "pos": { + "x": 184, + "y": 449 + }, + "width": 53, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B6", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "2", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 8, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 3 + }, + { + "id": "cross.start.4", + "type": "rectangle", + "pos": { + "x": 257, + "y": 112 + }, + "width": 54, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B6", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "4", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 9, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 3 + }, + { + "id": "cross.end.4", + "type": "rectangle", + "pos": { + "x": 257, + "y": 449 + }, + "width": 54, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B6", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "4", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 9, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 3 + }, + { + "id": "cross.start.8", + "type": "rectangle", + "pos": { + "x": 331, + "y": 112 + }, + "width": 53, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B6", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "8", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 8, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 3 + }, + { + "id": "cross.end.8", + "type": "rectangle", + "pos": { + "x": 331, + "y": 449 + }, + "width": 53, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B6", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "8", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 8, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 3 + }, + { + "id": "cross.start.15", + "type": "rectangle", + "pos": { + "x": 404, + "y": 112 + }, + "width": 61, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B6", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "15", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 16, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 3 + }, + { + "id": "cross.end.15", + "type": "rectangle", + "pos": { + "x": 404, + "y": 449 + }, + "width": 61, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B6", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "15", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 16, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 3 + } + ], + "connections": [ + { + "id": "cross.(start.1 <-> end.1)[0]", + "src": "cross.start.1", + "srcArrow": "cross", + "dst": "cross.end.1", + "dstArrow": "cross", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 1, + "stroke": "B1", + "borderRadius": 10, + "label": "1", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 7, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "labelPercentage": 0, + "route": [ + { + "x": 138, + "y": 178 + }, + { + "x": 138, + "y": 449 + } + ], + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 0 + }, + { + "id": "cross.(start.2 <-> end.2)[0]", + "src": "cross.start.2", + "srcArrow": "cross", + "dst": "cross.end.2", + "dstArrow": "cross", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "B1", + "borderRadius": 10, + "label": "2", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 9, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "labelPercentage": 0, + "route": [ + { + "x": 210.5, + "y": 178 + }, + { + "x": 210.5, + "y": 449 + } + ], + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 0 + }, + { + "id": "cross.(start.4 <-> end.4)[0]", + "src": "cross.start.4", + "srcArrow": "cross", + "dst": "cross.end.4", + "dstArrow": "cross", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 4, + "stroke": "B1", + "borderRadius": 10, + "label": "4", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 8, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "labelPercentage": 0, + "route": [ + { + "x": 284, + "y": 178 + }, + { + "x": 284, + "y": 449 + } + ], + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 0 + }, + { + "id": "cross.(start.8 <-> end.8)[0]", + "src": "cross.start.8", + "srcArrow": "cross", + "dst": "cross.end.8", + "dstArrow": "cross", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 8, + "stroke": "B1", + "borderRadius": 10, + "label": "8", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 8, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "labelPercentage": 0, + "route": [ + { + "x": 357.5, + "y": 178 + }, + { + "x": 357.5, + "y": 449 + } + ], + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 0 + }, + { + "id": "cross.(start.15 <-> end.15)[0]", + "src": "cross.start.15", + "srcArrow": "cross", + "dst": "cross.end.15", + "dstArrow": "cross", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 15, + "stroke": "B1", + "borderRadius": 10, + "label": "15", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 16, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "labelPercentage": 0, + "route": [ + { + "x": 434.5, + "y": 178 + }, + { + "x": 434.5, + "y": 449 + } + ], + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 0 + } + ], + "root": { + "id": "", + "type": "", + "pos": { + "x": 0, + "y": 0 + }, + "width": 0, + "height": 0, + "opacity": 0, + "strokeDash": 0, + "strokeWidth": 0, + "borderRadius": 0, + "fill": "N7", + "stroke": "", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "", + "fontSize": 0, + "fontFamily": "", + "language": "", + "color": "", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "zIndex": 0, + "level": 0 + } +} diff --git a/e2etests/testdata/stable/cross_arrowhead/elk/sketch.exp.svg b/e2etests/testdata/stable/cross_arrowhead/elk/sketch.exp.svg new file mode 100644 index 000000000..0b024b080 --- /dev/null +++ b/e2etests/testdata/stable/cross_arrowhead/elk/sketch.exp.svg @@ -0,0 +1,124 @@ +cross112244881515 1 2 4 8 15 + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/e2etests/testdata/txtar/sketch-cross-arrowhead/dagre/board.exp.json b/e2etests/testdata/txtar/sketch-cross-arrowhead/dagre/board.exp.json new file mode 100644 index 000000000..bece2f65e --- /dev/null +++ b/e2etests/testdata/txtar/sketch-cross-arrowhead/dagre/board.exp.json @@ -0,0 +1,186 @@ +{ + "name": "", + "config": { + "sketch": true, + "themeID": null, + "darkThemeID": null, + "pad": null, + "center": null, + "layoutEngine": null + }, + "isFolderOnly": false, + "fontFamily": "HandDrawn", + "shapes": [ + { + "id": "start", + "type": "rectangle", + "pos": { + "x": 0, + "y": 0 + }, + "width": 86, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B6", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "start", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 41, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "end", + "type": "rectangle", + "pos": { + "x": 6, + "y": 166 + }, + "width": 75, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B6", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "end", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 30, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 + } + ], + "connections": [ + { + "id": "(start <-> end)[0]", + "src": "start", + "srcArrow": "cross", + "dst": "end", + "dstArrow": "cross", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 6, + "stroke": "B1", + "borderRadius": 10, + "label": "", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "labelPosition": "", + "labelPercentage": 0, + "route": [ + { + "x": 43, + "y": 66 + }, + { + "x": 43, + "y": 106 + }, + { + "x": 43, + "y": 126 + }, + { + "x": 43, + "y": 166 + } + ], + "isCurve": true, + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 0 + } + ], + "root": { + "id": "", + "type": "", + "pos": { + "x": 0, + "y": 0 + }, + "width": 0, + "height": 0, + "opacity": 0, + "strokeDash": 0, + "strokeWidth": 0, + "borderRadius": 0, + "fill": "N7", + "stroke": "", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "", + "fontSize": 0, + "fontFamily": "", + "language": "", + "color": "", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "zIndex": 0, + "level": 0 + } +} diff --git a/e2etests/testdata/txtar/sketch-cross-arrowhead/dagre/sketch.exp.svg b/e2etests/testdata/txtar/sketch-cross-arrowhead/dagre/sketch.exp.svg new file mode 100644 index 000000000..0312c16c4 --- /dev/null +++ b/e2etests/testdata/txtar/sketch-cross-arrowhead/dagre/sketch.exp.svg @@ -0,0 +1,104 @@ + + + + + + + + +startend + + + + \ No newline at end of file diff --git a/e2etests/testdata/txtar/sketch-cross-arrowhead/elk/board.exp.json b/e2etests/testdata/txtar/sketch-cross-arrowhead/elk/board.exp.json new file mode 100644 index 000000000..018c8a94e --- /dev/null +++ b/e2etests/testdata/txtar/sketch-cross-arrowhead/elk/board.exp.json @@ -0,0 +1,177 @@ +{ + "name": "", + "config": { + "sketch": true, + "themeID": null, + "darkThemeID": null, + "pad": null, + "center": null, + "layoutEngine": null + }, + "isFolderOnly": false, + "fontFamily": "HandDrawn", + "shapes": [ + { + "id": "start", + "type": "rectangle", + "pos": { + "x": 12, + "y": 12 + }, + "width": 86, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B6", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "start", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 41, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "end", + "type": "rectangle", + "pos": { + "x": 17, + "y": 148 + }, + "width": 75, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B6", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "end", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 30, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 + } + ], + "connections": [ + { + "id": "(start <-> end)[0]", + "src": "start", + "srcArrow": "cross", + "dst": "end", + "dstArrow": "cross", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 6, + "stroke": "B1", + "borderRadius": 10, + "label": "", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "labelPosition": "", + "labelPercentage": 0, + "route": [ + { + "x": 55, + "y": 78 + }, + { + "x": 55, + "y": 148 + } + ], + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 0 + } + ], + "root": { + "id": "", + "type": "", + "pos": { + "x": 0, + "y": 0 + }, + "width": 0, + "height": 0, + "opacity": 0, + "strokeDash": 0, + "strokeWidth": 0, + "borderRadius": 0, + "fill": "N7", + "stroke": "", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "", + "fontSize": 0, + "fontFamily": "", + "language": "", + "color": "", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "zIndex": 0, + "level": 0 + } +} diff --git a/e2etests/testdata/txtar/sketch-cross-arrowhead/elk/sketch.exp.svg b/e2etests/testdata/txtar/sketch-cross-arrowhead/elk/sketch.exp.svg new file mode 100644 index 000000000..f82c243f2 --- /dev/null +++ b/e2etests/testdata/txtar/sketch-cross-arrowhead/elk/sketch.exp.svg @@ -0,0 +1,104 @@ + + + + + + + + +startend + + + + \ No newline at end of file diff --git a/e2etests/txtar.txt b/e2etests/txtar.txt index d669dcc18..2d5aa6acf 100644 --- a/e2etests/txtar.txt +++ b/e2etests/txtar.txt @@ -281,6 +281,19 @@ a <-> e f <-> g: {style.animated: true} x -- x: {style.animated: true} +-- sketch-cross-arrowhead -- +vars: { + d2-config: { + sketch: true + } +} + +start <-> end: { + style.stroke-width: 6 + source-arrowhead.shape: cross + target-arrowhead.shape: cross +} + -- sequence-edge-group-tall-edge-label -- Sequence: { shape: sequence_diagram From 1db7327ab79270f063dc5d9a038364b62255971e Mon Sep 17 00:00:00 2001 From: Alexander Wang Date: Thu, 15 May 2025 10:27:25 +0800 Subject: [PATCH 2/3] next --- ci/release/changelogs/next.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ci/release/changelogs/next.md b/ci/release/changelogs/next.md index 65780a72c..70ffbdb53 100644 --- a/ci/release/changelogs/next.md +++ b/ci/release/changelogs/next.md @@ -1,5 +1,7 @@ #### Features 🚀 +- `cross` arrowhead shape is available [#2190](https://github.com/terrastruct/d2/pull/2190) + #### Improvements 🧹 #### Bugfixes ⛑️ From 9fcf3c5d1c648d20ab423cbd8b728e84e374d36c Mon Sep 17 00:00:00 2001 From: Alexander Wang Date: Thu, 15 May 2025 10:31:17 +0800 Subject: [PATCH 3/3] ta --- .../cross_arrowhead/dagre/board.exp.json | 27 +++ .../cross_arrowhead/dagre/sketch.exp.svg | 196 +++++++++--------- .../stable/cross_arrowhead/elk/board.exp.json | 27 +++ .../stable/cross_arrowhead/elk/sketch.exp.svg | 196 +++++++++--------- .../dagre/board.exp.json | 6 +- .../dagre/sketch.exp.svg | 168 +++++++-------- .../sketch-cross-arrowhead/elk/board.exp.json | 6 +- .../sketch-cross-arrowhead/elk/sketch.exp.svg | 168 +++++++-------- 8 files changed, 432 insertions(+), 362 deletions(-) diff --git a/e2etests/testdata/stable/cross_arrowhead/dagre/board.exp.json b/e2etests/testdata/stable/cross_arrowhead/dagre/board.exp.json index 9c31c0417..89189c688 100644 --- a/e2etests/testdata/stable/cross_arrowhead/dagre/board.exp.json +++ b/e2etests/testdata/stable/cross_arrowhead/dagre/board.exp.json @@ -1,5 +1,13 @@ { "name": "", + "config": { + "sketch": false, + "themeID": 0, + "darkThemeID": null, + "pad": null, + "center": null, + "layoutEngine": null + }, "isFolderOnly": false, "fontFamily": "SourceSansPro", "shapes": [ @@ -18,6 +26,7 @@ "borderRadius": 0, "fill": "B4", "stroke": "B1", + "animated": false, "shadow": false, "3d": false, "multiple": false, @@ -59,6 +68,7 @@ "borderRadius": 0, "fill": "B5", "stroke": "B1", + "animated": false, "shadow": false, "3d": false, "multiple": false, @@ -99,6 +109,7 @@ "borderRadius": 0, "fill": "B5", "stroke": "B1", + "animated": false, "shadow": false, "3d": false, "multiple": false, @@ -139,6 +150,7 @@ "borderRadius": 0, "fill": "B6", "stroke": "B1", + "animated": false, "shadow": false, "3d": false, "multiple": false, @@ -180,6 +192,7 @@ "borderRadius": 0, "fill": "B6", "stroke": "B1", + "animated": false, "shadow": false, "3d": false, "multiple": false, @@ -221,6 +234,7 @@ "borderRadius": 0, "fill": "B6", "stroke": "B1", + "animated": false, "shadow": false, "3d": false, "multiple": false, @@ -262,6 +276,7 @@ "borderRadius": 0, "fill": "B6", "stroke": "B1", + "animated": false, "shadow": false, "3d": false, "multiple": false, @@ -303,6 +318,7 @@ "borderRadius": 0, "fill": "B6", "stroke": "B1", + "animated": false, "shadow": false, "3d": false, "multiple": false, @@ -344,6 +360,7 @@ "borderRadius": 0, "fill": "B6", "stroke": "B1", + "animated": false, "shadow": false, "3d": false, "multiple": false, @@ -385,6 +402,7 @@ "borderRadius": 0, "fill": "B6", "stroke": "B1", + "animated": false, "shadow": false, "3d": false, "multiple": false, @@ -426,6 +444,7 @@ "borderRadius": 0, "fill": "B6", "stroke": "B1", + "animated": false, "shadow": false, "3d": false, "multiple": false, @@ -467,6 +486,7 @@ "borderRadius": 0, "fill": "B6", "stroke": "B1", + "animated": false, "shadow": false, "3d": false, "multiple": false, @@ -508,6 +528,7 @@ "borderRadius": 0, "fill": "B6", "stroke": "B1", + "animated": false, "shadow": false, "3d": false, "multiple": false, @@ -559,6 +580,7 @@ "labelHeight": 21, "labelPosition": "INSIDE_MIDDLE_CENTER", "labelPercentage": 0, + "link": "", "route": [ { "x": 86, @@ -618,6 +640,7 @@ "labelHeight": 21, "labelPosition": "INSIDE_MIDDLE_CENTER", "labelPercentage": 0, + "link": "", "route": [ { "x": 198.5, @@ -677,6 +700,7 @@ "labelHeight": 21, "labelPosition": "INSIDE_MIDDLE_CENTER", "labelPercentage": 0, + "link": "", "route": [ { "x": 312, @@ -736,6 +760,7 @@ "labelHeight": 21, "labelPosition": "INSIDE_MIDDLE_CENTER", "labelPercentage": 0, + "link": "", "route": [ { "x": 425.5, @@ -795,6 +820,7 @@ "labelHeight": 21, "labelPosition": "INSIDE_MIDDLE_CENTER", "labelPercentage": 0, + "link": "", "route": [ { "x": 542.5, @@ -847,6 +873,7 @@ "borderRadius": 0, "fill": "N7", "stroke": "", + "animated": false, "shadow": false, "3d": false, "multiple": false, diff --git a/e2etests/testdata/stable/cross_arrowhead/dagre/sketch.exp.svg b/e2etests/testdata/stable/cross_arrowhead/dagre/sketch.exp.svg index e029be562..7574406e8 100644 --- a/e2etests/testdata/stable/cross_arrowhead/dagre/sketch.exp.svg +++ b/e2etests/testdata/stable/cross_arrowhead/dagre/sketch.exp.svg @@ -1,23 +1,23 @@ -cross112244881515 1 2 4 8 15 + .d2-3473749905 .fill-N1{fill:#0A0F25;} + .d2-3473749905 .fill-N2{fill:#676C7E;} + .d2-3473749905 .fill-N3{fill:#9499AB;} + .d2-3473749905 .fill-N4{fill:#CFD2DD;} + .d2-3473749905 .fill-N5{fill:#DEE1EB;} + .d2-3473749905 .fill-N6{fill:#EEF1F8;} + .d2-3473749905 .fill-N7{fill:#FFFFFF;} + .d2-3473749905 .fill-B1{fill:#0D32B2;} + .d2-3473749905 .fill-B2{fill:#0D32B2;} + .d2-3473749905 .fill-B3{fill:#E3E9FD;} + .d2-3473749905 .fill-B4{fill:#E3E9FD;} + .d2-3473749905 .fill-B5{fill:#EDF0FD;} + .d2-3473749905 .fill-B6{fill:#F7F8FE;} + .d2-3473749905 .fill-AA2{fill:#4A6FF3;} + .d2-3473749905 .fill-AA4{fill:#EDF0FD;} + .d2-3473749905 .fill-AA5{fill:#F7F8FE;} + .d2-3473749905 .fill-AB4{fill:#EDF0FD;} + .d2-3473749905 .fill-AB5{fill:#F7F8FE;} + .d2-3473749905 .stroke-N1{stroke:#0A0F25;} + .d2-3473749905 .stroke-N2{stroke:#676C7E;} + .d2-3473749905 .stroke-N3{stroke:#9499AB;} + .d2-3473749905 .stroke-N4{stroke:#CFD2DD;} + .d2-3473749905 .stroke-N5{stroke:#DEE1EB;} + .d2-3473749905 .stroke-N6{stroke:#EEF1F8;} + .d2-3473749905 .stroke-N7{stroke:#FFFFFF;} + .d2-3473749905 .stroke-B1{stroke:#0D32B2;} + .d2-3473749905 .stroke-B2{stroke:#0D32B2;} + .d2-3473749905 .stroke-B3{stroke:#E3E9FD;} + .d2-3473749905 .stroke-B4{stroke:#E3E9FD;} + .d2-3473749905 .stroke-B5{stroke:#EDF0FD;} + .d2-3473749905 .stroke-B6{stroke:#F7F8FE;} + .d2-3473749905 .stroke-AA2{stroke:#4A6FF3;} + .d2-3473749905 .stroke-AA4{stroke:#EDF0FD;} + .d2-3473749905 .stroke-AA5{stroke:#F7F8FE;} + .d2-3473749905 .stroke-AB4{stroke:#EDF0FD;} + .d2-3473749905 .stroke-AB5{stroke:#F7F8FE;} + .d2-3473749905 .background-color-N1{background-color:#0A0F25;} + .d2-3473749905 .background-color-N2{background-color:#676C7E;} + .d2-3473749905 .background-color-N3{background-color:#9499AB;} + .d2-3473749905 .background-color-N4{background-color:#CFD2DD;} + .d2-3473749905 .background-color-N5{background-color:#DEE1EB;} + .d2-3473749905 .background-color-N6{background-color:#EEF1F8;} + .d2-3473749905 .background-color-N7{background-color:#FFFFFF;} + .d2-3473749905 .background-color-B1{background-color:#0D32B2;} + .d2-3473749905 .background-color-B2{background-color:#0D32B2;} + .d2-3473749905 .background-color-B3{background-color:#E3E9FD;} + .d2-3473749905 .background-color-B4{background-color:#E3E9FD;} + .d2-3473749905 .background-color-B5{background-color:#EDF0FD;} + .d2-3473749905 .background-color-B6{background-color:#F7F8FE;} + .d2-3473749905 .background-color-AA2{background-color:#4A6FF3;} + .d2-3473749905 .background-color-AA4{background-color:#EDF0FD;} + .d2-3473749905 .background-color-AA5{background-color:#F7F8FE;} + .d2-3473749905 .background-color-AB4{background-color:#EDF0FD;} + .d2-3473749905 .background-color-AB5{background-color:#F7F8FE;} + .d2-3473749905 .color-N1{color:#0A0F25;} + .d2-3473749905 .color-N2{color:#676C7E;} + .d2-3473749905 .color-N3{color:#9499AB;} + .d2-3473749905 .color-N4{color:#CFD2DD;} + .d2-3473749905 .color-N5{color:#DEE1EB;} + .d2-3473749905 .color-N6{color:#EEF1F8;} + .d2-3473749905 .color-N7{color:#FFFFFF;} + .d2-3473749905 .color-B1{color:#0D32B2;} + .d2-3473749905 .color-B2{color:#0D32B2;} + .d2-3473749905 .color-B3{color:#E3E9FD;} + .d2-3473749905 .color-B4{color:#E3E9FD;} + .d2-3473749905 .color-B5{color:#EDF0FD;} + .d2-3473749905 .color-B6{color:#F7F8FE;} + .d2-3473749905 .color-AA2{color:#4A6FF3;} + .d2-3473749905 .color-AA4{color:#EDF0FD;} + .d2-3473749905 .color-AA5{color:#F7F8FE;} + .d2-3473749905 .color-AB4{color:#EDF0FD;} + .d2-3473749905 .color-AB5{color:#F7F8FE;}.appendix text.text{fill:#0A0F25}.md{--color-fg-default:#0A0F25;--color-fg-muted:#676C7E;--color-fg-subtle:#9499AB;--color-canvas-default:#FFFFFF;--color-canvas-subtle:#EEF1F8;--color-border-default:#0D32B2;--color-border-muted:#0D32B2;--color-neutral-muted:#EEF1F8;--color-accent-fg:#0D32B2;--color-accent-emphasis:#0D32B2;--color-attention-subtle:#676C7E;--color-danger-fg:red;}.sketch-overlay-B1{fill:url(#streaks-darker-d2-3473749905);mix-blend-mode:lighten}.sketch-overlay-B2{fill:url(#streaks-darker-d2-3473749905);mix-blend-mode:lighten}.sketch-overlay-B3{fill:url(#streaks-bright-d2-3473749905);mix-blend-mode:darken}.sketch-overlay-B4{fill:url(#streaks-bright-d2-3473749905);mix-blend-mode:darken}.sketch-overlay-B5{fill:url(#streaks-bright-d2-3473749905);mix-blend-mode:darken}.sketch-overlay-B6{fill:url(#streaks-bright-d2-3473749905);mix-blend-mode:darken}.sketch-overlay-AA2{fill:url(#streaks-dark-d2-3473749905);mix-blend-mode:overlay}.sketch-overlay-AA4{fill:url(#streaks-bright-d2-3473749905);mix-blend-mode:darken}.sketch-overlay-AA5{fill:url(#streaks-bright-d2-3473749905);mix-blend-mode:darken}.sketch-overlay-AB4{fill:url(#streaks-bright-d2-3473749905);mix-blend-mode:darken}.sketch-overlay-AB5{fill:url(#streaks-bright-d2-3473749905);mix-blend-mode:darken}.sketch-overlay-N1{fill:url(#streaks-darker-d2-3473749905);mix-blend-mode:lighten}.sketch-overlay-N2{fill:url(#streaks-dark-d2-3473749905);mix-blend-mode:overlay}.sketch-overlay-N3{fill:url(#streaks-normal-d2-3473749905);mix-blend-mode:color-burn}.sketch-overlay-N4{fill:url(#streaks-normal-d2-3473749905);mix-blend-mode:color-burn}.sketch-overlay-N5{fill:url(#streaks-bright-d2-3473749905);mix-blend-mode:darken}.sketch-overlay-N6{fill:url(#streaks-bright-d2-3473749905);mix-blend-mode:darken}.sketch-overlay-N7{fill:url(#streaks-bright-d2-3473749905);mix-blend-mode:darken}.light-code{display: block}.dark-code{display: none}]]>cross112244881515 1 2 4 8 15 - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/e2etests/testdata/stable/cross_arrowhead/elk/board.exp.json b/e2etests/testdata/stable/cross_arrowhead/elk/board.exp.json index 6a9896c61..2d33a9d2d 100644 --- a/e2etests/testdata/stable/cross_arrowhead/elk/board.exp.json +++ b/e2etests/testdata/stable/cross_arrowhead/elk/board.exp.json @@ -1,5 +1,13 @@ { "name": "", + "config": { + "sketch": false, + "themeID": 0, + "darkThemeID": null, + "pad": null, + "center": null, + "layoutEngine": null + }, "isFolderOnly": false, "fontFamily": "SourceSansPro", "shapes": [ @@ -18,6 +26,7 @@ "borderRadius": 0, "fill": "B4", "stroke": "B1", + "animated": false, "shadow": false, "3d": false, "multiple": false, @@ -59,6 +68,7 @@ "borderRadius": 0, "fill": "B5", "stroke": "B1", + "animated": false, "shadow": false, "3d": false, "multiple": false, @@ -99,6 +109,7 @@ "borderRadius": 0, "fill": "B5", "stroke": "B1", + "animated": false, "shadow": false, "3d": false, "multiple": false, @@ -139,6 +150,7 @@ "borderRadius": 0, "fill": "B6", "stroke": "B1", + "animated": false, "shadow": false, "3d": false, "multiple": false, @@ -180,6 +192,7 @@ "borderRadius": 0, "fill": "B6", "stroke": "B1", + "animated": false, "shadow": false, "3d": false, "multiple": false, @@ -221,6 +234,7 @@ "borderRadius": 0, "fill": "B6", "stroke": "B1", + "animated": false, "shadow": false, "3d": false, "multiple": false, @@ -262,6 +276,7 @@ "borderRadius": 0, "fill": "B6", "stroke": "B1", + "animated": false, "shadow": false, "3d": false, "multiple": false, @@ -303,6 +318,7 @@ "borderRadius": 0, "fill": "B6", "stroke": "B1", + "animated": false, "shadow": false, "3d": false, "multiple": false, @@ -344,6 +360,7 @@ "borderRadius": 0, "fill": "B6", "stroke": "B1", + "animated": false, "shadow": false, "3d": false, "multiple": false, @@ -385,6 +402,7 @@ "borderRadius": 0, "fill": "B6", "stroke": "B1", + "animated": false, "shadow": false, "3d": false, "multiple": false, @@ -426,6 +444,7 @@ "borderRadius": 0, "fill": "B6", "stroke": "B1", + "animated": false, "shadow": false, "3d": false, "multiple": false, @@ -467,6 +486,7 @@ "borderRadius": 0, "fill": "B6", "stroke": "B1", + "animated": false, "shadow": false, "3d": false, "multiple": false, @@ -508,6 +528,7 @@ "borderRadius": 0, "fill": "B6", "stroke": "B1", + "animated": false, "shadow": false, "3d": false, "multiple": false, @@ -559,6 +580,7 @@ "labelHeight": 21, "labelPosition": "INSIDE_MIDDLE_CENTER", "labelPercentage": 0, + "link": "", "route": [ { "x": 138, @@ -597,6 +619,7 @@ "labelHeight": 21, "labelPosition": "INSIDE_MIDDLE_CENTER", "labelPercentage": 0, + "link": "", "route": [ { "x": 210.5, @@ -635,6 +658,7 @@ "labelHeight": 21, "labelPosition": "INSIDE_MIDDLE_CENTER", "labelPercentage": 0, + "link": "", "route": [ { "x": 284, @@ -673,6 +697,7 @@ "labelHeight": 21, "labelPosition": "INSIDE_MIDDLE_CENTER", "labelPercentage": 0, + "link": "", "route": [ { "x": 357.5, @@ -711,6 +736,7 @@ "labelHeight": 21, "labelPosition": "INSIDE_MIDDLE_CENTER", "labelPercentage": 0, + "link": "", "route": [ { "x": 434.5, @@ -742,6 +768,7 @@ "borderRadius": 0, "fill": "N7", "stroke": "", + "animated": false, "shadow": false, "3d": false, "multiple": false, diff --git a/e2etests/testdata/stable/cross_arrowhead/elk/sketch.exp.svg b/e2etests/testdata/stable/cross_arrowhead/elk/sketch.exp.svg index 0b024b080..632579a37 100644 --- a/e2etests/testdata/stable/cross_arrowhead/elk/sketch.exp.svg +++ b/e2etests/testdata/stable/cross_arrowhead/elk/sketch.exp.svg @@ -1,23 +1,23 @@ -cross112244881515 1 2 4 8 15 + .d2-3147431782 .fill-N1{fill:#0A0F25;} + .d2-3147431782 .fill-N2{fill:#676C7E;} + .d2-3147431782 .fill-N3{fill:#9499AB;} + .d2-3147431782 .fill-N4{fill:#CFD2DD;} + .d2-3147431782 .fill-N5{fill:#DEE1EB;} + .d2-3147431782 .fill-N6{fill:#EEF1F8;} + .d2-3147431782 .fill-N7{fill:#FFFFFF;} + .d2-3147431782 .fill-B1{fill:#0D32B2;} + .d2-3147431782 .fill-B2{fill:#0D32B2;} + .d2-3147431782 .fill-B3{fill:#E3E9FD;} + .d2-3147431782 .fill-B4{fill:#E3E9FD;} + .d2-3147431782 .fill-B5{fill:#EDF0FD;} + .d2-3147431782 .fill-B6{fill:#F7F8FE;} + .d2-3147431782 .fill-AA2{fill:#4A6FF3;} + .d2-3147431782 .fill-AA4{fill:#EDF0FD;} + .d2-3147431782 .fill-AA5{fill:#F7F8FE;} + .d2-3147431782 .fill-AB4{fill:#EDF0FD;} + .d2-3147431782 .fill-AB5{fill:#F7F8FE;} + .d2-3147431782 .stroke-N1{stroke:#0A0F25;} + .d2-3147431782 .stroke-N2{stroke:#676C7E;} + .d2-3147431782 .stroke-N3{stroke:#9499AB;} + .d2-3147431782 .stroke-N4{stroke:#CFD2DD;} + .d2-3147431782 .stroke-N5{stroke:#DEE1EB;} + .d2-3147431782 .stroke-N6{stroke:#EEF1F8;} + .d2-3147431782 .stroke-N7{stroke:#FFFFFF;} + .d2-3147431782 .stroke-B1{stroke:#0D32B2;} + .d2-3147431782 .stroke-B2{stroke:#0D32B2;} + .d2-3147431782 .stroke-B3{stroke:#E3E9FD;} + .d2-3147431782 .stroke-B4{stroke:#E3E9FD;} + .d2-3147431782 .stroke-B5{stroke:#EDF0FD;} + .d2-3147431782 .stroke-B6{stroke:#F7F8FE;} + .d2-3147431782 .stroke-AA2{stroke:#4A6FF3;} + .d2-3147431782 .stroke-AA4{stroke:#EDF0FD;} + .d2-3147431782 .stroke-AA5{stroke:#F7F8FE;} + .d2-3147431782 .stroke-AB4{stroke:#EDF0FD;} + .d2-3147431782 .stroke-AB5{stroke:#F7F8FE;} + .d2-3147431782 .background-color-N1{background-color:#0A0F25;} + .d2-3147431782 .background-color-N2{background-color:#676C7E;} + .d2-3147431782 .background-color-N3{background-color:#9499AB;} + .d2-3147431782 .background-color-N4{background-color:#CFD2DD;} + .d2-3147431782 .background-color-N5{background-color:#DEE1EB;} + .d2-3147431782 .background-color-N6{background-color:#EEF1F8;} + .d2-3147431782 .background-color-N7{background-color:#FFFFFF;} + .d2-3147431782 .background-color-B1{background-color:#0D32B2;} + .d2-3147431782 .background-color-B2{background-color:#0D32B2;} + .d2-3147431782 .background-color-B3{background-color:#E3E9FD;} + .d2-3147431782 .background-color-B4{background-color:#E3E9FD;} + .d2-3147431782 .background-color-B5{background-color:#EDF0FD;} + .d2-3147431782 .background-color-B6{background-color:#F7F8FE;} + .d2-3147431782 .background-color-AA2{background-color:#4A6FF3;} + .d2-3147431782 .background-color-AA4{background-color:#EDF0FD;} + .d2-3147431782 .background-color-AA5{background-color:#F7F8FE;} + .d2-3147431782 .background-color-AB4{background-color:#EDF0FD;} + .d2-3147431782 .background-color-AB5{background-color:#F7F8FE;} + .d2-3147431782 .color-N1{color:#0A0F25;} + .d2-3147431782 .color-N2{color:#676C7E;} + .d2-3147431782 .color-N3{color:#9499AB;} + .d2-3147431782 .color-N4{color:#CFD2DD;} + .d2-3147431782 .color-N5{color:#DEE1EB;} + .d2-3147431782 .color-N6{color:#EEF1F8;} + .d2-3147431782 .color-N7{color:#FFFFFF;} + .d2-3147431782 .color-B1{color:#0D32B2;} + .d2-3147431782 .color-B2{color:#0D32B2;} + .d2-3147431782 .color-B3{color:#E3E9FD;} + .d2-3147431782 .color-B4{color:#E3E9FD;} + .d2-3147431782 .color-B5{color:#EDF0FD;} + .d2-3147431782 .color-B6{color:#F7F8FE;} + .d2-3147431782 .color-AA2{color:#4A6FF3;} + .d2-3147431782 .color-AA4{color:#EDF0FD;} + .d2-3147431782 .color-AA5{color:#F7F8FE;} + .d2-3147431782 .color-AB4{color:#EDF0FD;} + .d2-3147431782 .color-AB5{color:#F7F8FE;}.appendix text.text{fill:#0A0F25}.md{--color-fg-default:#0A0F25;--color-fg-muted:#676C7E;--color-fg-subtle:#9499AB;--color-canvas-default:#FFFFFF;--color-canvas-subtle:#EEF1F8;--color-border-default:#0D32B2;--color-border-muted:#0D32B2;--color-neutral-muted:#EEF1F8;--color-accent-fg:#0D32B2;--color-accent-emphasis:#0D32B2;--color-attention-subtle:#676C7E;--color-danger-fg:red;}.sketch-overlay-B1{fill:url(#streaks-darker-d2-3147431782);mix-blend-mode:lighten}.sketch-overlay-B2{fill:url(#streaks-darker-d2-3147431782);mix-blend-mode:lighten}.sketch-overlay-B3{fill:url(#streaks-bright-d2-3147431782);mix-blend-mode:darken}.sketch-overlay-B4{fill:url(#streaks-bright-d2-3147431782);mix-blend-mode:darken}.sketch-overlay-B5{fill:url(#streaks-bright-d2-3147431782);mix-blend-mode:darken}.sketch-overlay-B6{fill:url(#streaks-bright-d2-3147431782);mix-blend-mode:darken}.sketch-overlay-AA2{fill:url(#streaks-dark-d2-3147431782);mix-blend-mode:overlay}.sketch-overlay-AA4{fill:url(#streaks-bright-d2-3147431782);mix-blend-mode:darken}.sketch-overlay-AA5{fill:url(#streaks-bright-d2-3147431782);mix-blend-mode:darken}.sketch-overlay-AB4{fill:url(#streaks-bright-d2-3147431782);mix-blend-mode:darken}.sketch-overlay-AB5{fill:url(#streaks-bright-d2-3147431782);mix-blend-mode:darken}.sketch-overlay-N1{fill:url(#streaks-darker-d2-3147431782);mix-blend-mode:lighten}.sketch-overlay-N2{fill:url(#streaks-dark-d2-3147431782);mix-blend-mode:overlay}.sketch-overlay-N3{fill:url(#streaks-normal-d2-3147431782);mix-blend-mode:color-burn}.sketch-overlay-N4{fill:url(#streaks-normal-d2-3147431782);mix-blend-mode:color-burn}.sketch-overlay-N5{fill:url(#streaks-bright-d2-3147431782);mix-blend-mode:darken}.sketch-overlay-N6{fill:url(#streaks-bright-d2-3147431782);mix-blend-mode:darken}.sketch-overlay-N7{fill:url(#streaks-bright-d2-3147431782);mix-blend-mode:darken}.light-code{display: block}.dark-code{display: none}]]>cross112244881515 1 2 4 8 15 - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/e2etests/testdata/txtar/sketch-cross-arrowhead/dagre/board.exp.json b/e2etests/testdata/txtar/sketch-cross-arrowhead/dagre/board.exp.json index bece2f65e..b27711f8e 100644 --- a/e2etests/testdata/txtar/sketch-cross-arrowhead/dagre/board.exp.json +++ b/e2etests/testdata/txtar/sketch-cross-arrowhead/dagre/board.exp.json @@ -2,7 +2,7 @@ "name": "", "config": { "sketch": true, - "themeID": null, + "themeID": 0, "darkThemeID": null, "pad": null, "center": null, @@ -26,6 +26,7 @@ "borderRadius": 0, "fill": "B6", "stroke": "B1", + "animated": false, "shadow": false, "3d": false, "multiple": false, @@ -67,6 +68,7 @@ "borderRadius": 0, "fill": "B6", "stroke": "B1", + "animated": false, "shadow": false, "3d": false, "multiple": false, @@ -118,6 +120,7 @@ "labelHeight": 0, "labelPosition": "", "labelPercentage": 0, + "link": "", "route": [ { "x": 43, @@ -158,6 +161,7 @@ "borderRadius": 0, "fill": "N7", "stroke": "", + "animated": false, "shadow": false, "3d": false, "multiple": false, diff --git a/e2etests/testdata/txtar/sketch-cross-arrowhead/dagre/sketch.exp.svg b/e2etests/testdata/txtar/sketch-cross-arrowhead/dagre/sketch.exp.svg index 0312c16c4..be668ebae 100644 --- a/e2etests/testdata/txtar/sketch-cross-arrowhead/dagre/sketch.exp.svg +++ b/e2etests/testdata/txtar/sketch-cross-arrowhead/dagre/sketch.exp.svg @@ -1,9 +1,9 @@ - + .d2-4079204864 .fill-N1{fill:#0A0F25;} + .d2-4079204864 .fill-N2{fill:#676C7E;} + .d2-4079204864 .fill-N3{fill:#9499AB;} + .d2-4079204864 .fill-N4{fill:#CFD2DD;} + .d2-4079204864 .fill-N5{fill:#DEE1EB;} + .d2-4079204864 .fill-N6{fill:#EEF1F8;} + .d2-4079204864 .fill-N7{fill:#FFFFFF;} + .d2-4079204864 .fill-B1{fill:#0D32B2;} + .d2-4079204864 .fill-B2{fill:#0D32B2;} + .d2-4079204864 .fill-B3{fill:#E3E9FD;} + .d2-4079204864 .fill-B4{fill:#E3E9FD;} + .d2-4079204864 .fill-B5{fill:#EDF0FD;} + .d2-4079204864 .fill-B6{fill:#F7F8FE;} + .d2-4079204864 .fill-AA2{fill:#4A6FF3;} + .d2-4079204864 .fill-AA4{fill:#EDF0FD;} + .d2-4079204864 .fill-AA5{fill:#F7F8FE;} + .d2-4079204864 .fill-AB4{fill:#EDF0FD;} + .d2-4079204864 .fill-AB5{fill:#F7F8FE;} + .d2-4079204864 .stroke-N1{stroke:#0A0F25;} + .d2-4079204864 .stroke-N2{stroke:#676C7E;} + .d2-4079204864 .stroke-N3{stroke:#9499AB;} + .d2-4079204864 .stroke-N4{stroke:#CFD2DD;} + .d2-4079204864 .stroke-N5{stroke:#DEE1EB;} + .d2-4079204864 .stroke-N6{stroke:#EEF1F8;} + .d2-4079204864 .stroke-N7{stroke:#FFFFFF;} + .d2-4079204864 .stroke-B1{stroke:#0D32B2;} + .d2-4079204864 .stroke-B2{stroke:#0D32B2;} + .d2-4079204864 .stroke-B3{stroke:#E3E9FD;} + .d2-4079204864 .stroke-B4{stroke:#E3E9FD;} + .d2-4079204864 .stroke-B5{stroke:#EDF0FD;} + .d2-4079204864 .stroke-B6{stroke:#F7F8FE;} + .d2-4079204864 .stroke-AA2{stroke:#4A6FF3;} + .d2-4079204864 .stroke-AA4{stroke:#EDF0FD;} + .d2-4079204864 .stroke-AA5{stroke:#F7F8FE;} + .d2-4079204864 .stroke-AB4{stroke:#EDF0FD;} + .d2-4079204864 .stroke-AB5{stroke:#F7F8FE;} + .d2-4079204864 .background-color-N1{background-color:#0A0F25;} + .d2-4079204864 .background-color-N2{background-color:#676C7E;} + .d2-4079204864 .background-color-N3{background-color:#9499AB;} + .d2-4079204864 .background-color-N4{background-color:#CFD2DD;} + .d2-4079204864 .background-color-N5{background-color:#DEE1EB;} + .d2-4079204864 .background-color-N6{background-color:#EEF1F8;} + .d2-4079204864 .background-color-N7{background-color:#FFFFFF;} + .d2-4079204864 .background-color-B1{background-color:#0D32B2;} + .d2-4079204864 .background-color-B2{background-color:#0D32B2;} + .d2-4079204864 .background-color-B3{background-color:#E3E9FD;} + .d2-4079204864 .background-color-B4{background-color:#E3E9FD;} + .d2-4079204864 .background-color-B5{background-color:#EDF0FD;} + .d2-4079204864 .background-color-B6{background-color:#F7F8FE;} + .d2-4079204864 .background-color-AA2{background-color:#4A6FF3;} + .d2-4079204864 .background-color-AA4{background-color:#EDF0FD;} + .d2-4079204864 .background-color-AA5{background-color:#F7F8FE;} + .d2-4079204864 .background-color-AB4{background-color:#EDF0FD;} + .d2-4079204864 .background-color-AB5{background-color:#F7F8FE;} + .d2-4079204864 .color-N1{color:#0A0F25;} + .d2-4079204864 .color-N2{color:#676C7E;} + .d2-4079204864 .color-N3{color:#9499AB;} + .d2-4079204864 .color-N4{color:#CFD2DD;} + .d2-4079204864 .color-N5{color:#DEE1EB;} + .d2-4079204864 .color-N6{color:#EEF1F8;} + .d2-4079204864 .color-N7{color:#FFFFFF;} + .d2-4079204864 .color-B1{color:#0D32B2;} + .d2-4079204864 .color-B2{color:#0D32B2;} + .d2-4079204864 .color-B3{color:#E3E9FD;} + .d2-4079204864 .color-B4{color:#E3E9FD;} + .d2-4079204864 .color-B5{color:#EDF0FD;} + .d2-4079204864 .color-B6{color:#F7F8FE;} + .d2-4079204864 .color-AA2{color:#4A6FF3;} + .d2-4079204864 .color-AA4{color:#EDF0FD;} + .d2-4079204864 .color-AA5{color:#F7F8FE;} + .d2-4079204864 .color-AB4{color:#EDF0FD;} + .d2-4079204864 .color-AB5{color:#F7F8FE;}.appendix text.text{fill:#0A0F25}.md{--color-fg-default:#0A0F25;--color-fg-muted:#676C7E;--color-fg-subtle:#9499AB;--color-canvas-default:#FFFFFF;--color-canvas-subtle:#EEF1F8;--color-border-default:#0D32B2;--color-border-muted:#0D32B2;--color-neutral-muted:#EEF1F8;--color-accent-fg:#0D32B2;--color-accent-emphasis:#0D32B2;--color-attention-subtle:#676C7E;--color-danger-fg:red;}.sketch-overlay-B1{fill:url(#streaks-darker-d2-4079204864);mix-blend-mode:lighten}.sketch-overlay-B2{fill:url(#streaks-darker-d2-4079204864);mix-blend-mode:lighten}.sketch-overlay-B3{fill:url(#streaks-bright-d2-4079204864);mix-blend-mode:darken}.sketch-overlay-B4{fill:url(#streaks-bright-d2-4079204864);mix-blend-mode:darken}.sketch-overlay-B5{fill:url(#streaks-bright-d2-4079204864);mix-blend-mode:darken}.sketch-overlay-B6{fill:url(#streaks-bright-d2-4079204864);mix-blend-mode:darken}.sketch-overlay-AA2{fill:url(#streaks-dark-d2-4079204864);mix-blend-mode:overlay}.sketch-overlay-AA4{fill:url(#streaks-bright-d2-4079204864);mix-blend-mode:darken}.sketch-overlay-AA5{fill:url(#streaks-bright-d2-4079204864);mix-blend-mode:darken}.sketch-overlay-AB4{fill:url(#streaks-bright-d2-4079204864);mix-blend-mode:darken}.sketch-overlay-AB5{fill:url(#streaks-bright-d2-4079204864);mix-blend-mode:darken}.sketch-overlay-N1{fill:url(#streaks-darker-d2-4079204864);mix-blend-mode:lighten}.sketch-overlay-N2{fill:url(#streaks-dark-d2-4079204864);mix-blend-mode:overlay}.sketch-overlay-N3{fill:url(#streaks-normal-d2-4079204864);mix-blend-mode:color-burn}.sketch-overlay-N4{fill:url(#streaks-normal-d2-4079204864);mix-blend-mode:color-burn}.sketch-overlay-N5{fill:url(#streaks-bright-d2-4079204864);mix-blend-mode:darken}.sketch-overlay-N6{fill:url(#streaks-bright-d2-4079204864);mix-blend-mode:darken}.sketch-overlay-N7{fill:url(#streaks-bright-d2-4079204864);mix-blend-mode:darken}.light-code{display: block}.dark-code{display: none}]]> - + + - + + - + + -startend + +startend - - + + \ No newline at end of file diff --git a/e2etests/testdata/txtar/sketch-cross-arrowhead/elk/board.exp.json b/e2etests/testdata/txtar/sketch-cross-arrowhead/elk/board.exp.json index 018c8a94e..83c6ec006 100644 --- a/e2etests/testdata/txtar/sketch-cross-arrowhead/elk/board.exp.json +++ b/e2etests/testdata/txtar/sketch-cross-arrowhead/elk/board.exp.json @@ -2,7 +2,7 @@ "name": "", "config": { "sketch": true, - "themeID": null, + "themeID": 0, "darkThemeID": null, "pad": null, "center": null, @@ -26,6 +26,7 @@ "borderRadius": 0, "fill": "B6", "stroke": "B1", + "animated": false, "shadow": false, "3d": false, "multiple": false, @@ -67,6 +68,7 @@ "borderRadius": 0, "fill": "B6", "stroke": "B1", + "animated": false, "shadow": false, "3d": false, "multiple": false, @@ -118,6 +120,7 @@ "labelHeight": 0, "labelPosition": "", "labelPercentage": 0, + "link": "", "route": [ { "x": 55, @@ -149,6 +152,7 @@ "borderRadius": 0, "fill": "N7", "stroke": "", + "animated": false, "shadow": false, "3d": false, "multiple": false, diff --git a/e2etests/testdata/txtar/sketch-cross-arrowhead/elk/sketch.exp.svg b/e2etests/testdata/txtar/sketch-cross-arrowhead/elk/sketch.exp.svg index f82c243f2..10bc46be9 100644 --- a/e2etests/testdata/txtar/sketch-cross-arrowhead/elk/sketch.exp.svg +++ b/e2etests/testdata/txtar/sketch-cross-arrowhead/elk/sketch.exp.svg @@ -1,9 +1,9 @@ - + .d2-2914609308 .fill-N1{fill:#0A0F25;} + .d2-2914609308 .fill-N2{fill:#676C7E;} + .d2-2914609308 .fill-N3{fill:#9499AB;} + .d2-2914609308 .fill-N4{fill:#CFD2DD;} + .d2-2914609308 .fill-N5{fill:#DEE1EB;} + .d2-2914609308 .fill-N6{fill:#EEF1F8;} + .d2-2914609308 .fill-N7{fill:#FFFFFF;} + .d2-2914609308 .fill-B1{fill:#0D32B2;} + .d2-2914609308 .fill-B2{fill:#0D32B2;} + .d2-2914609308 .fill-B3{fill:#E3E9FD;} + .d2-2914609308 .fill-B4{fill:#E3E9FD;} + .d2-2914609308 .fill-B5{fill:#EDF0FD;} + .d2-2914609308 .fill-B6{fill:#F7F8FE;} + .d2-2914609308 .fill-AA2{fill:#4A6FF3;} + .d2-2914609308 .fill-AA4{fill:#EDF0FD;} + .d2-2914609308 .fill-AA5{fill:#F7F8FE;} + .d2-2914609308 .fill-AB4{fill:#EDF0FD;} + .d2-2914609308 .fill-AB5{fill:#F7F8FE;} + .d2-2914609308 .stroke-N1{stroke:#0A0F25;} + .d2-2914609308 .stroke-N2{stroke:#676C7E;} + .d2-2914609308 .stroke-N3{stroke:#9499AB;} + .d2-2914609308 .stroke-N4{stroke:#CFD2DD;} + .d2-2914609308 .stroke-N5{stroke:#DEE1EB;} + .d2-2914609308 .stroke-N6{stroke:#EEF1F8;} + .d2-2914609308 .stroke-N7{stroke:#FFFFFF;} + .d2-2914609308 .stroke-B1{stroke:#0D32B2;} + .d2-2914609308 .stroke-B2{stroke:#0D32B2;} + .d2-2914609308 .stroke-B3{stroke:#E3E9FD;} + .d2-2914609308 .stroke-B4{stroke:#E3E9FD;} + .d2-2914609308 .stroke-B5{stroke:#EDF0FD;} + .d2-2914609308 .stroke-B6{stroke:#F7F8FE;} + .d2-2914609308 .stroke-AA2{stroke:#4A6FF3;} + .d2-2914609308 .stroke-AA4{stroke:#EDF0FD;} + .d2-2914609308 .stroke-AA5{stroke:#F7F8FE;} + .d2-2914609308 .stroke-AB4{stroke:#EDF0FD;} + .d2-2914609308 .stroke-AB5{stroke:#F7F8FE;} + .d2-2914609308 .background-color-N1{background-color:#0A0F25;} + .d2-2914609308 .background-color-N2{background-color:#676C7E;} + .d2-2914609308 .background-color-N3{background-color:#9499AB;} + .d2-2914609308 .background-color-N4{background-color:#CFD2DD;} + .d2-2914609308 .background-color-N5{background-color:#DEE1EB;} + .d2-2914609308 .background-color-N6{background-color:#EEF1F8;} + .d2-2914609308 .background-color-N7{background-color:#FFFFFF;} + .d2-2914609308 .background-color-B1{background-color:#0D32B2;} + .d2-2914609308 .background-color-B2{background-color:#0D32B2;} + .d2-2914609308 .background-color-B3{background-color:#E3E9FD;} + .d2-2914609308 .background-color-B4{background-color:#E3E9FD;} + .d2-2914609308 .background-color-B5{background-color:#EDF0FD;} + .d2-2914609308 .background-color-B6{background-color:#F7F8FE;} + .d2-2914609308 .background-color-AA2{background-color:#4A6FF3;} + .d2-2914609308 .background-color-AA4{background-color:#EDF0FD;} + .d2-2914609308 .background-color-AA5{background-color:#F7F8FE;} + .d2-2914609308 .background-color-AB4{background-color:#EDF0FD;} + .d2-2914609308 .background-color-AB5{background-color:#F7F8FE;} + .d2-2914609308 .color-N1{color:#0A0F25;} + .d2-2914609308 .color-N2{color:#676C7E;} + .d2-2914609308 .color-N3{color:#9499AB;} + .d2-2914609308 .color-N4{color:#CFD2DD;} + .d2-2914609308 .color-N5{color:#DEE1EB;} + .d2-2914609308 .color-N6{color:#EEF1F8;} + .d2-2914609308 .color-N7{color:#FFFFFF;} + .d2-2914609308 .color-B1{color:#0D32B2;} + .d2-2914609308 .color-B2{color:#0D32B2;} + .d2-2914609308 .color-B3{color:#E3E9FD;} + .d2-2914609308 .color-B4{color:#E3E9FD;} + .d2-2914609308 .color-B5{color:#EDF0FD;} + .d2-2914609308 .color-B6{color:#F7F8FE;} + .d2-2914609308 .color-AA2{color:#4A6FF3;} + .d2-2914609308 .color-AA4{color:#EDF0FD;} + .d2-2914609308 .color-AA5{color:#F7F8FE;} + .d2-2914609308 .color-AB4{color:#EDF0FD;} + .d2-2914609308 .color-AB5{color:#F7F8FE;}.appendix text.text{fill:#0A0F25}.md{--color-fg-default:#0A0F25;--color-fg-muted:#676C7E;--color-fg-subtle:#9499AB;--color-canvas-default:#FFFFFF;--color-canvas-subtle:#EEF1F8;--color-border-default:#0D32B2;--color-border-muted:#0D32B2;--color-neutral-muted:#EEF1F8;--color-accent-fg:#0D32B2;--color-accent-emphasis:#0D32B2;--color-attention-subtle:#676C7E;--color-danger-fg:red;}.sketch-overlay-B1{fill:url(#streaks-darker-d2-2914609308);mix-blend-mode:lighten}.sketch-overlay-B2{fill:url(#streaks-darker-d2-2914609308);mix-blend-mode:lighten}.sketch-overlay-B3{fill:url(#streaks-bright-d2-2914609308);mix-blend-mode:darken}.sketch-overlay-B4{fill:url(#streaks-bright-d2-2914609308);mix-blend-mode:darken}.sketch-overlay-B5{fill:url(#streaks-bright-d2-2914609308);mix-blend-mode:darken}.sketch-overlay-B6{fill:url(#streaks-bright-d2-2914609308);mix-blend-mode:darken}.sketch-overlay-AA2{fill:url(#streaks-dark-d2-2914609308);mix-blend-mode:overlay}.sketch-overlay-AA4{fill:url(#streaks-bright-d2-2914609308);mix-blend-mode:darken}.sketch-overlay-AA5{fill:url(#streaks-bright-d2-2914609308);mix-blend-mode:darken}.sketch-overlay-AB4{fill:url(#streaks-bright-d2-2914609308);mix-blend-mode:darken}.sketch-overlay-AB5{fill:url(#streaks-bright-d2-2914609308);mix-blend-mode:darken}.sketch-overlay-N1{fill:url(#streaks-darker-d2-2914609308);mix-blend-mode:lighten}.sketch-overlay-N2{fill:url(#streaks-dark-d2-2914609308);mix-blend-mode:overlay}.sketch-overlay-N3{fill:url(#streaks-normal-d2-2914609308);mix-blend-mode:color-burn}.sketch-overlay-N4{fill:url(#streaks-normal-d2-2914609308);mix-blend-mode:color-burn}.sketch-overlay-N5{fill:url(#streaks-bright-d2-2914609308);mix-blend-mode:darken}.sketch-overlay-N6{fill:url(#streaks-bright-d2-2914609308);mix-blend-mode:darken}.sketch-overlay-N7{fill:url(#streaks-bright-d2-2914609308);mix-blend-mode:darken}.light-code{display: block}.dark-code{display: none}]]> - + + - + + - + + -startend + +startend - - + + \ No newline at end of file