From 9d9afcdfe34b7d9013b3364460042fb68164a65a Mon Sep 17 00:00:00 2001 From: Gavin Nishizawa Date: Tue, 7 Nov 2023 16:57:43 -0800 Subject: [PATCH 1/4] unfilled triangle arrowhead --- d2graph/d2graph.go | 5 ++-- d2renderers/d2svg/d2svg.go | 22 ++++++++++++++++++ d2target/d2target.go | 47 ++++++++++++++++++++------------------ 3 files changed, 50 insertions(+), 24 deletions(-) diff --git a/d2graph/d2graph.go b/d2graph/d2graph.go index 16345ed6f..0e3db323c 100644 --- a/d2graph/d2graph.go +++ b/d2graph/d2graph.go @@ -181,9 +181,10 @@ func (a *Attributes) ToArrowhead() d2target.Arrowhead { return d2target.NoArrowhead } - filled := false + var filled *bool if a.Style.Filled != nil { - filled, _ = strconv.ParseBool(a.Style.Filled.Value) + v, _ := strconv.ParseBool(a.Style.Filled.Value) + filled = go2.Pointer(v) } return d2target.ToArrowhead(a.Shape.Value, filled) } diff --git a/d2renderers/d2svg/d2svg.go b/d2renderers/d2svg/d2svg.go index 2e910d658..69b439bac 100644 --- a/d2renderers/d2svg/d2svg.go +++ b/d2renderers/d2svg/d2svg.go @@ -138,6 +138,28 @@ func arrowheadMarker(isTarget bool, id string, connection d2target.Connection) s ) } path = polygonEl.Render() + case d2target.UnfilledTriangleArrowhead: + polygonEl := d2themes.NewThemableElement("polygon") + polygonEl.Fill = d2target.BG_COLOR + polygonEl.Stroke = connection.Stroke + polygonEl.ClassName = "connection" + polygonEl.Attributes = fmt.Sprintf(`stroke-width="%d"`, connection.StrokeWidth) + + if isTarget { + polygonEl.Points = fmt.Sprintf("%f,%f %f,%f %f,%f", + 0., 0., + width, height/2.0, + 0., height, + ) + } else { + polygonEl.Points = fmt.Sprintf("%f,%f %f,%f %f,%f", + width, 0., + 0., height/2.0, + width, height, + ) + } + path = polygonEl.Render() + case d2target.TriangleArrowhead: polygonEl := d2themes.NewThemableElement("polygon") polygonEl.Fill = connection.Stroke diff --git a/d2target/d2target.go b/d2target/d2target.go index 9b69ff472..a20352bb7 100644 --- a/d2target/d2target.go +++ b/d2target/d2target.go @@ -720,13 +720,14 @@ func (c Connection) GetID() string { type Arrowhead string const ( - NoArrowhead Arrowhead = "none" - ArrowArrowhead Arrowhead = "arrow" - TriangleArrowhead Arrowhead = "triangle" - DiamondArrowhead Arrowhead = "diamond" - FilledDiamondArrowhead Arrowhead = "filled-diamond" - CircleArrowhead Arrowhead = "circle" - FilledCircleArrowhead Arrowhead = "filled-circle" + NoArrowhead Arrowhead = "none" + ArrowArrowhead Arrowhead = "arrow" + UnfilledTriangleArrowhead Arrowhead = "unfilled-triangle" + TriangleArrowhead Arrowhead = "triangle" + DiamondArrowhead Arrowhead = "diamond" + FilledDiamondArrowhead Arrowhead = "filled-diamond" + CircleArrowhead Arrowhead = "circle" + FilledCircleArrowhead Arrowhead = "filled-circle" // For fat arrows LineArrowhead Arrowhead = "line" @@ -740,29 +741,28 @@ const ( DefaultArrowhead Arrowhead = TriangleArrowhead ) +// valid values for arrowhead.shape var Arrowheads = map[string]struct{}{ - string(NoArrowhead): {}, - string(ArrowArrowhead): {}, - string(TriangleArrowhead): {}, - string(DiamondArrowhead): {}, - string(FilledDiamondArrowhead): {}, - string(CircleArrowhead): {}, - string(FilledCircleArrowhead): {}, - string(CfOne): {}, - string(CfMany): {}, - string(CfOneRequired): {}, - string(CfManyRequired): {}, + string(NoArrowhead): {}, + string(ArrowArrowhead): {}, + string(TriangleArrowhead): {}, + string(DiamondArrowhead): {}, + string(CircleArrowhead): {}, + string(CfOne): {}, + string(CfMany): {}, + string(CfOneRequired): {}, + string(CfManyRequired): {}, } -func ToArrowhead(arrowheadType string, filled bool) Arrowhead { +func ToArrowhead(arrowheadType string, filled *bool) Arrowhead { switch arrowheadType { case string(DiamondArrowhead): - if filled { + if filled != nil && *filled { return FilledDiamondArrowhead } return DiamondArrowhead case string(CircleArrowhead): - if filled { + if filled != nil && *filled { return FilledCircleArrowhead } return CircleArrowhead @@ -771,6 +771,9 @@ func ToArrowhead(arrowheadType string, filled bool) Arrowhead { case string(ArrowArrowhead): return ArrowArrowhead case string(TriangleArrowhead): + if filled != nil && !(*filled) { + return UnfilledTriangleArrowhead + } return TriangleArrowhead case string(CfOne): return CfOne @@ -794,7 +797,7 @@ func (arrowhead Arrowhead) Dimensions(strokeWidth float64) (width, height float6 baseHeight = 4 widthMultiplier = 4 heightMultiplier = 4 - case TriangleArrowhead: + case TriangleArrowhead, UnfilledTriangleArrowhead: baseWidth = 4 baseHeight = 4 widthMultiplier = 3 From 61f8e674546057056705e6bc8247be5b4f5d1156 Mon Sep 17 00:00:00 2001 From: Gavin Nishizawa Date: Tue, 7 Nov 2023 17:46:26 -0800 Subject: [PATCH 2/4] render unfilled triangle arrowhead --- d2exporter/export.go | 4 ++-- d2graph/d2graph.go | 4 ---- d2renderers/d2svg/d2svg.go | 13 +++++++------ d2target/d2target.go | 11 ++++++++++- 4 files changed, 19 insertions(+), 13 deletions(-) diff --git a/d2exporter/export.go b/d2exporter/export.go index f79e98af6..bf923c653 100644 --- a/d2exporter/export.go +++ b/d2exporter/export.go @@ -202,7 +202,7 @@ func toConnection(edge *d2graph.Edge, theme *d2themes.Theme) d2target.Connection if edge.SrcArrow { connection.SrcArrow = d2target.DefaultArrowhead - if edge.SrcArrowhead != nil && edge.SrcArrowhead.Shape.Value != "" { + if edge.SrcArrowhead != nil { connection.SrcArrow = edge.SrcArrowhead.ToArrowhead() } } @@ -220,7 +220,7 @@ func toConnection(edge *d2graph.Edge, theme *d2themes.Theme) d2target.Connection } if edge.DstArrow { connection.DstArrow = d2target.DefaultArrowhead - if edge.DstArrowhead != nil && edge.DstArrowhead.Shape.Value != "" { + if edge.DstArrowhead != nil { connection.DstArrow = edge.DstArrowhead.ToArrowhead() } } diff --git a/d2graph/d2graph.go b/d2graph/d2graph.go index 0e3db323c..1dc0942e0 100644 --- a/d2graph/d2graph.go +++ b/d2graph/d2graph.go @@ -177,10 +177,6 @@ func (a *Attributes) ApplyTextTransform() { } func (a *Attributes) ToArrowhead() d2target.Arrowhead { - if a.Shape.Value == "" { - return d2target.NoArrowhead - } - var filled *bool if a.Style.Filled != nil { v, _ := strconv.ParseBool(a.Style.Filled.Value) diff --git a/d2renderers/d2svg/d2svg.go b/d2renderers/d2svg/d2svg.go index 69b439bac..67db074c9 100644 --- a/d2renderers/d2svg/d2svg.go +++ b/d2renderers/d2svg/d2svg.go @@ -145,17 +145,18 @@ func arrowheadMarker(isTarget bool, id string, connection d2target.Connection) s polygonEl.ClassName = "connection" polygonEl.Attributes = fmt.Sprintf(`stroke-width="%d"`, connection.StrokeWidth) + inset := strokeWidth / 2 if isTarget { polygonEl.Points = fmt.Sprintf("%f,%f %f,%f %f,%f", - 0., 0., - width, height/2.0, - 0., height, + inset, inset, + width-inset, height/2.0, + inset, height-inset, ) } else { polygonEl.Points = fmt.Sprintf("%f,%f %f,%f %f,%f", - width, 0., - 0., height/2.0, - width, height, + width-inset, inset, + inset, height/2.0, + width-inset, height-inset, ) } path = polygonEl.Render() diff --git a/d2target/d2target.go b/d2target/d2target.go index a20352bb7..3c468b81d 100644 --- a/d2target/d2target.go +++ b/d2target/d2target.go @@ -784,6 +784,10 @@ func ToArrowhead(arrowheadType string, filled *bool) Arrowhead { case string(CfManyRequired): return CfManyRequired default: + if DefaultArrowhead == TriangleArrowhead && + filled != nil && !(*filled) { + return UnfilledTriangleArrowhead + } return DefaultArrowhead } } @@ -797,11 +801,16 @@ func (arrowhead Arrowhead) Dimensions(strokeWidth float64) (width, height float6 baseHeight = 4 widthMultiplier = 4 heightMultiplier = 4 - case TriangleArrowhead, UnfilledTriangleArrowhead: + case TriangleArrowhead: baseWidth = 4 baseHeight = 4 widthMultiplier = 3 heightMultiplier = 4 + case UnfilledTriangleArrowhead: + baseWidth = 7 + baseHeight = 7 + widthMultiplier = 3 + heightMultiplier = 4 case LineArrowhead: widthMultiplier = 5 heightMultiplier = 8 From 1e666e5b1f25b950e28981e74df2f834b1ae7985 Mon Sep 17 00:00:00 2001 From: Gavin Nishizawa Date: Tue, 7 Nov 2023 17:49:34 -0800 Subject: [PATCH 3/4] add unfilled_triangle test --- e2etests/stable_test.go | 1 + e2etests/testdata/files/unfilled_triangle.d2 | 16 + .../unfilled_triangle/dagre/board.exp.json | 307 ++++++++++++++++++ .../unfilled_triangle/dagre/sketch.exp.svg | 107 ++++++ .../unfilled_triangle/elk/board.exp.json | 289 +++++++++++++++++ .../unfilled_triangle/elk/sketch.exp.svg | 107 ++++++ 6 files changed, 827 insertions(+) create mode 100644 e2etests/testdata/files/unfilled_triangle.d2 create mode 100644 e2etests/testdata/stable/unfilled_triangle/dagre/board.exp.json create mode 100644 e2etests/testdata/stable/unfilled_triangle/dagre/sketch.exp.svg create mode 100644 e2etests/testdata/stable/unfilled_triangle/elk/board.exp.json create mode 100644 e2etests/testdata/stable/unfilled_triangle/elk/sketch.exp.svg diff --git a/e2etests/stable_test.go b/e2etests/stable_test.go index c62d1d625..e1f12172a 100644 --- a/e2etests/stable_test.go +++ b/e2etests/stable_test.go @@ -2868,6 +2868,7 @@ y: profits { loadFromFile(t, "grid_outside_labels"), loadFromFile(t, "grid_edge_across_cell"), loadFromFile(t, "nesting_power"), + loadFromFile(t, "unfilled_triangle"), } runa(t, tcs) diff --git a/e2etests/testdata/files/unfilled_triangle.d2 b/e2etests/testdata/files/unfilled_triangle.d2 new file mode 100644 index 000000000..3993c0743 --- /dev/null +++ b/e2etests/testdata/files/unfilled_triangle.d2 @@ -0,0 +1,16 @@ +direction: right + +A <-> B: default { + source-arrowhead.style.filled: false + target-arrowhead.style.filled: false +} +C <-> D: triangle { + source-arrowhead: { + shape: triangle + style.filled: false + } + target-arrowhead: { + shape: triangle + style.filled: false + } +} diff --git a/e2etests/testdata/stable/unfilled_triangle/dagre/board.exp.json b/e2etests/testdata/stable/unfilled_triangle/dagre/board.exp.json new file mode 100644 index 000000000..52742a5c9 --- /dev/null +++ b/e2etests/testdata/stable/unfilled_triangle/dagre/board.exp.json @@ -0,0 +1,307 @@ +{ + "name": "", + "isFolderOnly": false, + "fontFamily": "SourceSansPro", + "shapes": [ + { + "id": "A", + "type": "rectangle", + "pos": { + "x": 0, + "y": 0 + }, + "width": 56, + "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": "A", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 11, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "B", + "type": "rectangle", + "pos": { + "x": 208, + "y": 0 + }, + "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": "B", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 9, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "C", + "type": "rectangle", + "pos": { + "x": 1, + "y": 126 + }, + "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": "C", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 9, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "D", + "type": "rectangle", + "pos": { + "x": 208, + "y": 126 + }, + "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": "D", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 9, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 + } + ], + "connections": [ + { + "id": "(A <-> B)[0]", + "src": "A", + "srcArrow": "unfilled-triangle", + "dst": "B", + "dstArrow": "unfilled-triangle", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "B1", + "borderRadius": 10, + "label": "default", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 48, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "labelPercentage": 0, + "route": [ + { + "x": 56, + "y": 33 + }, + { + "x": 116.80000305175781, + "y": 33 + }, + { + "x": 147.1999969482422, + "y": 33 + }, + { + "x": 208, + "y": 33 + } + ], + "isCurve": true, + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 0 + }, + { + "id": "(C <-> D)[0]", + "src": "C", + "srcArrow": "unfilled-triangle", + "dst": "D", + "dstArrow": "unfilled-triangle", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "B1", + "borderRadius": 10, + "label": "triangle", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 52, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "labelPercentage": 0, + "route": [ + { + "x": 55, + "y": 159 + }, + { + "x": 116.5999984741211, + "y": 159 + }, + { + "x": 147.1999969482422, + "y": 159 + }, + { + "x": 208, + "y": 159 + } + ], + "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/unfilled_triangle/dagre/sketch.exp.svg b/e2etests/testdata/stable/unfilled_triangle/dagre/sketch.exp.svg new file mode 100644 index 000000000..d74d46599 --- /dev/null +++ b/e2etests/testdata/stable/unfilled_triangle/dagre/sketch.exp.svg @@ -0,0 +1,107 @@ +ABCD defaulttriangle + + + + + + + + \ No newline at end of file diff --git a/e2etests/testdata/stable/unfilled_triangle/elk/board.exp.json b/e2etests/testdata/stable/unfilled_triangle/elk/board.exp.json new file mode 100644 index 000000000..d9d7fbb48 --- /dev/null +++ b/e2etests/testdata/stable/unfilled_triangle/elk/board.exp.json @@ -0,0 +1,289 @@ +{ + "name": "", + "isFolderOnly": false, + "fontFamily": "SourceSansPro", + "shapes": [ + { + "id": "A", + "type": "rectangle", + "pos": { + "x": 12, + "y": 12 + }, + "width": 56, + "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": "A", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 11, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "B", + "type": "rectangle", + "pos": { + "x": 260, + "y": 12 + }, + "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": "B", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 9, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "C", + "type": "rectangle", + "pos": { + "x": 14, + "y": 98 + }, + "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": "C", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 9, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "D", + "type": "rectangle", + "pos": { + "x": 260, + "y": 98 + }, + "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": "D", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 9, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 + } + ], + "connections": [ + { + "id": "(A <-> B)[0]", + "src": "A", + "srcArrow": "unfilled-triangle", + "dst": "B", + "dstArrow": "unfilled-triangle", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "B1", + "borderRadius": 10, + "label": "default", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 48, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "labelPercentage": 0, + "route": [ + { + "x": 68, + "y": 45 + }, + { + "x": 260, + "y": 45 + } + ], + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 0 + }, + { + "id": "(C <-> D)[0]", + "src": "C", + "srcArrow": "unfilled-triangle", + "dst": "D", + "dstArrow": "unfilled-triangle", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "B1", + "borderRadius": 10, + "label": "triangle", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 52, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "labelPercentage": 0, + "route": [ + { + "x": 68, + "y": 131 + }, + { + "x": 260, + "y": 131 + } + ], + "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/unfilled_triangle/elk/sketch.exp.svg b/e2etests/testdata/stable/unfilled_triangle/elk/sketch.exp.svg new file mode 100644 index 000000000..2c80e0f5c --- /dev/null +++ b/e2etests/testdata/stable/unfilled_triangle/elk/sketch.exp.svg @@ -0,0 +1,107 @@ +ABCD defaulttriangle + + + + + + + + \ No newline at end of file From 7b2e4d6d43c869246221777dd08c9f2821b13a2e Mon Sep 17 00:00:00 2001 From: Gavin Nishizawa Date: Tue, 7 Nov 2023 17:55:26 -0800 Subject: [PATCH 4/4] changelog --- ci/release/changelogs/next.md | 1 + 1 file changed, 1 insertion(+) diff --git a/ci/release/changelogs/next.md b/ci/release/changelogs/next.md index 372655bca..e10f25c48 100644 --- a/ci/release/changelogs/next.md +++ b/ci/release/changelogs/next.md @@ -1,6 +1,7 @@ #### Features ๐Ÿš€ - ELK now routes `sql_table` edges to the exact columns (ty @landmaj) [#1681](https://github.com/terrastruct/d2/pull/1681) +- Adds new unfilled triangle arrowhead. [#1711](https://github.com/terrastruct/d2/pull/1711) #### Improvements ๐Ÿงน