From 460a118e749d3d0a88b55b8e6259ff3e3a1609a2 Mon Sep 17 00:00:00 2001 From: Mayank Mohapatra <125661248+Mayank77maruti@users.noreply.github.com> Date: Sun, 23 Feb 2025 16:57:48 +0000 Subject: [PATCH] try --- d2layouts/d2cycle/layout.go | 2 +- .../txtar/cycle-diagram/dagre/board.exp.json | 20 +-- .../txtar/cycle-diagram/dagre/sketch.exp.svg | 152 +++++++++--------- .../txtar/cycle-diagram/elk/board.exp.json | 20 +-- .../txtar/cycle-diagram/elk/sketch.exp.svg | 152 +++++++++--------- 5 files changed, 173 insertions(+), 173 deletions(-) diff --git a/d2layouts/d2cycle/layout.go b/d2layouts/d2cycle/layout.go index f19b43eca..30a3b958b 100644 --- a/d2layouts/d2cycle/layout.go +++ b/d2layouts/d2cycle/layout.go @@ -119,7 +119,7 @@ func createCircularArc(edge *d2graph.Edge) { tangentX /= mag tangentY /= mag } - const MIN_SEGMENT_LEN = 4.5 + const MIN_SEGMENT_LEN = 4.2 // Calculate current segment direction dx := lastPoint.X - secondLastPoint.X dy := lastPoint.Y - secondLastPoint.Y diff --git a/e2etests/testdata/txtar/cycle-diagram/dagre/board.exp.json b/e2etests/testdata/txtar/cycle-diagram/dagre/board.exp.json index 8f7dc1e95..3ee336ef2 100644 --- a/e2etests/testdata/txtar/cycle-diagram/dagre/board.exp.json +++ b/e2etests/testdata/txtar/cycle-diagram/dagre/board.exp.json @@ -864,8 +864,8 @@ "y": -37.47600173950195 }, { - "x": 196.50999450683594, - "y": -37.4379997253418 + "x": 196.5590057373047, + "y": -37.141998291015625 }, { "x": 197.2519989013672, @@ -1228,8 +1228,8 @@ "y": 197.53700256347656 }, { - "x": 30.959999084472656, - "y": 197.63400268554688 + "x": 30.66200065612793, + "y": 197.67300415039062 }, { "x": 26.5, @@ -1592,8 +1592,8 @@ "y": 37.47600173950195 }, { - "x": -196.50999450683594, - "y": 37.4379997253418 + "x": -196.5590057373047, + "y": 37.141998291015625 }, { "x": -197.2519989013672, @@ -1972,8 +1972,8 @@ "y": 111.8030014038086 }, { - "x": 702.9409790039062, - "y": 112.76000213623047 + "x": 702.8400268554688, + "y": 113.04199981689453 }, { "x": 701.4329833984375, @@ -2336,8 +2336,8 @@ "y": 186.90899658203125 }, { - "x": 366.635009765625, - "y": 186.36000061035156 + "x": 366.43499755859375, + "y": 186.13600158691406 }, { "x": 363.6419982910156, diff --git a/e2etests/testdata/txtar/cycle-diagram/dagre/sketch.exp.svg b/e2etests/testdata/txtar/cycle-diagram/dagre/sketch.exp.svg index 7fa010dec..39fc6f10a 100644 --- a/e2etests/testdata/txtar/cycle-diagram/dagre/sketch.exp.svg +++ b/e2etests/testdata/txtar/cycle-diagram/dagre/sketch.exp.svg @@ -1,9 +1,9 @@ -abcdabcab + .d2-1843864254 .fill-N1{fill:#0A0F25;} + .d2-1843864254 .fill-N2{fill:#676C7E;} + .d2-1843864254 .fill-N3{fill:#9499AB;} + .d2-1843864254 .fill-N4{fill:#CFD2DD;} + .d2-1843864254 .fill-N5{fill:#DEE1EB;} + .d2-1843864254 .fill-N6{fill:#EEF1F8;} + .d2-1843864254 .fill-N7{fill:#FFFFFF;} + .d2-1843864254 .fill-B1{fill:#0D32B2;} + .d2-1843864254 .fill-B2{fill:#0D32B2;} + .d2-1843864254 .fill-B3{fill:#E3E9FD;} + .d2-1843864254 .fill-B4{fill:#E3E9FD;} + .d2-1843864254 .fill-B5{fill:#EDF0FD;} + .d2-1843864254 .fill-B6{fill:#F7F8FE;} + .d2-1843864254 .fill-AA2{fill:#4A6FF3;} + .d2-1843864254 .fill-AA4{fill:#EDF0FD;} + .d2-1843864254 .fill-AA5{fill:#F7F8FE;} + .d2-1843864254 .fill-AB4{fill:#EDF0FD;} + .d2-1843864254 .fill-AB5{fill:#F7F8FE;} + .d2-1843864254 .stroke-N1{stroke:#0A0F25;} + .d2-1843864254 .stroke-N2{stroke:#676C7E;} + .d2-1843864254 .stroke-N3{stroke:#9499AB;} + .d2-1843864254 .stroke-N4{stroke:#CFD2DD;} + .d2-1843864254 .stroke-N5{stroke:#DEE1EB;} + .d2-1843864254 .stroke-N6{stroke:#EEF1F8;} + .d2-1843864254 .stroke-N7{stroke:#FFFFFF;} + .d2-1843864254 .stroke-B1{stroke:#0D32B2;} + .d2-1843864254 .stroke-B2{stroke:#0D32B2;} + .d2-1843864254 .stroke-B3{stroke:#E3E9FD;} + .d2-1843864254 .stroke-B4{stroke:#E3E9FD;} + .d2-1843864254 .stroke-B5{stroke:#EDF0FD;} + .d2-1843864254 .stroke-B6{stroke:#F7F8FE;} + .d2-1843864254 .stroke-AA2{stroke:#4A6FF3;} + .d2-1843864254 .stroke-AA4{stroke:#EDF0FD;} + .d2-1843864254 .stroke-AA5{stroke:#F7F8FE;} + .d2-1843864254 .stroke-AB4{stroke:#EDF0FD;} + .d2-1843864254 .stroke-AB5{stroke:#F7F8FE;} + .d2-1843864254 .background-color-N1{background-color:#0A0F25;} + .d2-1843864254 .background-color-N2{background-color:#676C7E;} + .d2-1843864254 .background-color-N3{background-color:#9499AB;} + .d2-1843864254 .background-color-N4{background-color:#CFD2DD;} + .d2-1843864254 .background-color-N5{background-color:#DEE1EB;} + .d2-1843864254 .background-color-N6{background-color:#EEF1F8;} + .d2-1843864254 .background-color-N7{background-color:#FFFFFF;} + .d2-1843864254 .background-color-B1{background-color:#0D32B2;} + .d2-1843864254 .background-color-B2{background-color:#0D32B2;} + .d2-1843864254 .background-color-B3{background-color:#E3E9FD;} + .d2-1843864254 .background-color-B4{background-color:#E3E9FD;} + .d2-1843864254 .background-color-B5{background-color:#EDF0FD;} + .d2-1843864254 .background-color-B6{background-color:#F7F8FE;} + .d2-1843864254 .background-color-AA2{background-color:#4A6FF3;} + .d2-1843864254 .background-color-AA4{background-color:#EDF0FD;} + .d2-1843864254 .background-color-AA5{background-color:#F7F8FE;} + .d2-1843864254 .background-color-AB4{background-color:#EDF0FD;} + .d2-1843864254 .background-color-AB5{background-color:#F7F8FE;} + .d2-1843864254 .color-N1{color:#0A0F25;} + .d2-1843864254 .color-N2{color:#676C7E;} + .d2-1843864254 .color-N3{color:#9499AB;} + .d2-1843864254 .color-N4{color:#CFD2DD;} + .d2-1843864254 .color-N5{color:#DEE1EB;} + .d2-1843864254 .color-N6{color:#EEF1F8;} + .d2-1843864254 .color-N7{color:#FFFFFF;} + .d2-1843864254 .color-B1{color:#0D32B2;} + .d2-1843864254 .color-B2{color:#0D32B2;} + .d2-1843864254 .color-B3{color:#E3E9FD;} + .d2-1843864254 .color-B4{color:#E3E9FD;} + .d2-1843864254 .color-B5{color:#EDF0FD;} + .d2-1843864254 .color-B6{color:#F7F8FE;} + .d2-1843864254 .color-AA2{color:#4A6FF3;} + .d2-1843864254 .color-AA4{color:#EDF0FD;} + .d2-1843864254 .color-AA5{color:#F7F8FE;} + .d2-1843864254 .color-AB4{color:#EDF0FD;} + .d2-1843864254 .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-1843864254);mix-blend-mode:lighten}.sketch-overlay-B2{fill:url(#streaks-darker-d2-1843864254);mix-blend-mode:lighten}.sketch-overlay-B3{fill:url(#streaks-bright-d2-1843864254);mix-blend-mode:darken}.sketch-overlay-B4{fill:url(#streaks-bright-d2-1843864254);mix-blend-mode:darken}.sketch-overlay-B5{fill:url(#streaks-bright-d2-1843864254);mix-blend-mode:darken}.sketch-overlay-B6{fill:url(#streaks-bright-d2-1843864254);mix-blend-mode:darken}.sketch-overlay-AA2{fill:url(#streaks-dark-d2-1843864254);mix-blend-mode:overlay}.sketch-overlay-AA4{fill:url(#streaks-bright-d2-1843864254);mix-blend-mode:darken}.sketch-overlay-AA5{fill:url(#streaks-bright-d2-1843864254);mix-blend-mode:darken}.sketch-overlay-AB4{fill:url(#streaks-bright-d2-1843864254);mix-blend-mode:darken}.sketch-overlay-AB5{fill:url(#streaks-bright-d2-1843864254);mix-blend-mode:darken}.sketch-overlay-N1{fill:url(#streaks-darker-d2-1843864254);mix-blend-mode:lighten}.sketch-overlay-N2{fill:url(#streaks-dark-d2-1843864254);mix-blend-mode:overlay}.sketch-overlay-N3{fill:url(#streaks-normal-d2-1843864254);mix-blend-mode:color-burn}.sketch-overlay-N4{fill:url(#streaks-normal-d2-1843864254);mix-blend-mode:color-burn}.sketch-overlay-N5{fill:url(#streaks-bright-d2-1843864254);mix-blend-mode:darken}.sketch-overlay-N6{fill:url(#streaks-bright-d2-1843864254);mix-blend-mode:darken}.sketch-overlay-N7{fill:url(#streaks-bright-d2-1843864254);mix-blend-mode:darken}.light-code{display: block}.dark-code{display: none}]]>abcdabcab diff --git a/e2etests/testdata/txtar/cycle-diagram/elk/board.exp.json b/e2etests/testdata/txtar/cycle-diagram/elk/board.exp.json index 47987011a..cdd83c710 100644 --- a/e2etests/testdata/txtar/cycle-diagram/elk/board.exp.json +++ b/e2etests/testdata/txtar/cycle-diagram/elk/board.exp.json @@ -864,8 +864,8 @@ "y": -25.47599983215332 }, { - "x": 208.50999450683594, - "y": -25.437999725341797 + "x": 208.5590057373047, + "y": -25.142000198364258 }, { "x": 209.2519989013672, @@ -1228,8 +1228,8 @@ "y": 209.53700256347656 }, { - "x": 42.959999084472656, - "y": 209.63400268554688 + "x": 42.6619987487793, + "y": 209.67300415039062 }, { "x": 38.5, @@ -1592,8 +1592,8 @@ "y": 49.47600173950195 }, { - "x": -184.50999450683594, - "y": 49.4379997253418 + "x": -184.5590057373047, + "y": 49.141998291015625 }, { "x": -185.2519989013672, @@ -1972,8 +1972,8 @@ "y": 123.8030014038086 }, { - "x": 675.4409790039062, - "y": 124.76000213623047 + "x": 675.3400268554688, + "y": 125.04199981689453 }, { "x": 673.9329833984375, @@ -2336,8 +2336,8 @@ "y": 198.90899658203125 }, { - "x": 339.135009765625, - "y": 198.36000061035156 + "x": 338.93499755859375, + "y": 198.13600158691406 }, { "x": 336.1419982910156, diff --git a/e2etests/testdata/txtar/cycle-diagram/elk/sketch.exp.svg b/e2etests/testdata/txtar/cycle-diagram/elk/sketch.exp.svg index 22603e02f..998c1c749 100644 --- a/e2etests/testdata/txtar/cycle-diagram/elk/sketch.exp.svg +++ b/e2etests/testdata/txtar/cycle-diagram/elk/sketch.exp.svg @@ -1,9 +1,9 @@ -abcdabcab + .d2-482289501 .fill-N1{fill:#0A0F25;} + .d2-482289501 .fill-N2{fill:#676C7E;} + .d2-482289501 .fill-N3{fill:#9499AB;} + .d2-482289501 .fill-N4{fill:#CFD2DD;} + .d2-482289501 .fill-N5{fill:#DEE1EB;} + .d2-482289501 .fill-N6{fill:#EEF1F8;} + .d2-482289501 .fill-N7{fill:#FFFFFF;} + .d2-482289501 .fill-B1{fill:#0D32B2;} + .d2-482289501 .fill-B2{fill:#0D32B2;} + .d2-482289501 .fill-B3{fill:#E3E9FD;} + .d2-482289501 .fill-B4{fill:#E3E9FD;} + .d2-482289501 .fill-B5{fill:#EDF0FD;} + .d2-482289501 .fill-B6{fill:#F7F8FE;} + .d2-482289501 .fill-AA2{fill:#4A6FF3;} + .d2-482289501 .fill-AA4{fill:#EDF0FD;} + .d2-482289501 .fill-AA5{fill:#F7F8FE;} + .d2-482289501 .fill-AB4{fill:#EDF0FD;} + .d2-482289501 .fill-AB5{fill:#F7F8FE;} + .d2-482289501 .stroke-N1{stroke:#0A0F25;} + .d2-482289501 .stroke-N2{stroke:#676C7E;} + .d2-482289501 .stroke-N3{stroke:#9499AB;} + .d2-482289501 .stroke-N4{stroke:#CFD2DD;} + .d2-482289501 .stroke-N5{stroke:#DEE1EB;} + .d2-482289501 .stroke-N6{stroke:#EEF1F8;} + .d2-482289501 .stroke-N7{stroke:#FFFFFF;} + .d2-482289501 .stroke-B1{stroke:#0D32B2;} + .d2-482289501 .stroke-B2{stroke:#0D32B2;} + .d2-482289501 .stroke-B3{stroke:#E3E9FD;} + .d2-482289501 .stroke-B4{stroke:#E3E9FD;} + .d2-482289501 .stroke-B5{stroke:#EDF0FD;} + .d2-482289501 .stroke-B6{stroke:#F7F8FE;} + .d2-482289501 .stroke-AA2{stroke:#4A6FF3;} + .d2-482289501 .stroke-AA4{stroke:#EDF0FD;} + .d2-482289501 .stroke-AA5{stroke:#F7F8FE;} + .d2-482289501 .stroke-AB4{stroke:#EDF0FD;} + .d2-482289501 .stroke-AB5{stroke:#F7F8FE;} + .d2-482289501 .background-color-N1{background-color:#0A0F25;} + .d2-482289501 .background-color-N2{background-color:#676C7E;} + .d2-482289501 .background-color-N3{background-color:#9499AB;} + .d2-482289501 .background-color-N4{background-color:#CFD2DD;} + .d2-482289501 .background-color-N5{background-color:#DEE1EB;} + .d2-482289501 .background-color-N6{background-color:#EEF1F8;} + .d2-482289501 .background-color-N7{background-color:#FFFFFF;} + .d2-482289501 .background-color-B1{background-color:#0D32B2;} + .d2-482289501 .background-color-B2{background-color:#0D32B2;} + .d2-482289501 .background-color-B3{background-color:#E3E9FD;} + .d2-482289501 .background-color-B4{background-color:#E3E9FD;} + .d2-482289501 .background-color-B5{background-color:#EDF0FD;} + .d2-482289501 .background-color-B6{background-color:#F7F8FE;} + .d2-482289501 .background-color-AA2{background-color:#4A6FF3;} + .d2-482289501 .background-color-AA4{background-color:#EDF0FD;} + .d2-482289501 .background-color-AA5{background-color:#F7F8FE;} + .d2-482289501 .background-color-AB4{background-color:#EDF0FD;} + .d2-482289501 .background-color-AB5{background-color:#F7F8FE;} + .d2-482289501 .color-N1{color:#0A0F25;} + .d2-482289501 .color-N2{color:#676C7E;} + .d2-482289501 .color-N3{color:#9499AB;} + .d2-482289501 .color-N4{color:#CFD2DD;} + .d2-482289501 .color-N5{color:#DEE1EB;} + .d2-482289501 .color-N6{color:#EEF1F8;} + .d2-482289501 .color-N7{color:#FFFFFF;} + .d2-482289501 .color-B1{color:#0D32B2;} + .d2-482289501 .color-B2{color:#0D32B2;} + .d2-482289501 .color-B3{color:#E3E9FD;} + .d2-482289501 .color-B4{color:#E3E9FD;} + .d2-482289501 .color-B5{color:#EDF0FD;} + .d2-482289501 .color-B6{color:#F7F8FE;} + .d2-482289501 .color-AA2{color:#4A6FF3;} + .d2-482289501 .color-AA4{color:#EDF0FD;} + .d2-482289501 .color-AA5{color:#F7F8FE;} + .d2-482289501 .color-AB4{color:#EDF0FD;} + .d2-482289501 .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-482289501);mix-blend-mode:lighten}.sketch-overlay-B2{fill:url(#streaks-darker-d2-482289501);mix-blend-mode:lighten}.sketch-overlay-B3{fill:url(#streaks-bright-d2-482289501);mix-blend-mode:darken}.sketch-overlay-B4{fill:url(#streaks-bright-d2-482289501);mix-blend-mode:darken}.sketch-overlay-B5{fill:url(#streaks-bright-d2-482289501);mix-blend-mode:darken}.sketch-overlay-B6{fill:url(#streaks-bright-d2-482289501);mix-blend-mode:darken}.sketch-overlay-AA2{fill:url(#streaks-dark-d2-482289501);mix-blend-mode:overlay}.sketch-overlay-AA4{fill:url(#streaks-bright-d2-482289501);mix-blend-mode:darken}.sketch-overlay-AA5{fill:url(#streaks-bright-d2-482289501);mix-blend-mode:darken}.sketch-overlay-AB4{fill:url(#streaks-bright-d2-482289501);mix-blend-mode:darken}.sketch-overlay-AB5{fill:url(#streaks-bright-d2-482289501);mix-blend-mode:darken}.sketch-overlay-N1{fill:url(#streaks-darker-d2-482289501);mix-blend-mode:lighten}.sketch-overlay-N2{fill:url(#streaks-dark-d2-482289501);mix-blend-mode:overlay}.sketch-overlay-N3{fill:url(#streaks-normal-d2-482289501);mix-blend-mode:color-burn}.sketch-overlay-N4{fill:url(#streaks-normal-d2-482289501);mix-blend-mode:color-burn}.sketch-overlay-N5{fill:url(#streaks-bright-d2-482289501);mix-blend-mode:darken}.sketch-overlay-N6{fill:url(#streaks-bright-d2-482289501);mix-blend-mode:darken}.sketch-overlay-N7{fill:url(#streaks-bright-d2-482289501);mix-blend-mode:darken}.light-code{display: block}.dark-code{display: none}]]>abcdabcab