From 108b744f3c528cd589b714d7844e6b5feed22dc8 Mon Sep 17 00:00:00 2001 From: Alexander Wang Date: Tue, 14 Mar 2023 18:36:16 -0700 Subject: [PATCH] fix bug --- .../testdata/elk_corners/sketch.exp.svg | 154 +++++++++--------- .../TestCLI_E2E/internal_linked_pdf.exp.pdf | Bin 81564 -> 81564 bytes .../circular_dependency/elk/board.exp.json | 4 +- .../circular_dependency/elk/sketch.exp.svg | 152 ++++++++--------- .../testdata/stable/dense/elk/board.exp.json | 8 + .../testdata/stable/dense/elk/sketch.exp.svg | 152 ++++++++--------- .../stable/multiple_trees/elk/board.exp.json | 16 ++ .../stable/multiple_trees/elk/sketch.exp.svg | 152 ++++++++--------- .../stable/n22_e32/elk/board.exp.json | 8 + .../stable/n22_e32/elk/sketch.exp.svg | 152 ++++++++--------- .../testdata/stable/us_map/elk/board.exp.json | 12 +- .../testdata/stable/us_map/elk/sketch.exp.svg | 152 ++++++++--------- lib/geo/segment.go | 8 +- 13 files changed, 505 insertions(+), 465 deletions(-) diff --git a/d2renderers/d2sketch/testdata/elk_corners/sketch.exp.svg b/d2renderers/d2sketch/testdata/elk_corners/sketch.exp.svg index cb4cc2f3a..c110ca200 100644 --- a/d2renderers/d2sketch/testdata/elk_corners/sketch.exp.svg +++ b/d2renderers/d2sketch/testdata/elk_corners/sketch.exp.svg @@ -1,9 +1,9 @@ - + .d2-1972917360 .fill-N1{fill:#0A0F25;} + .d2-1972917360 .fill-N2{fill:#676C7E;} + .d2-1972917360 .fill-N3{fill:#9499AB;} + .d2-1972917360 .fill-N4{fill:#CFD2DD;} + .d2-1972917360 .fill-N5{fill:#DEE1EB;} + .d2-1972917360 .fill-N6{fill:#EEF1F8;} + .d2-1972917360 .fill-N7{fill:#FFFFFF;} + .d2-1972917360 .fill-B1{fill:#0D32B2;} + .d2-1972917360 .fill-B2{fill:#0D32B2;} + .d2-1972917360 .fill-B3{fill:#E3E9FD;} + .d2-1972917360 .fill-B4{fill:#E3E9FD;} + .d2-1972917360 .fill-B5{fill:#EDF0FD;} + .d2-1972917360 .fill-B6{fill:#F7F8FE;} + .d2-1972917360 .fill-AA2{fill:#4A6FF3;} + .d2-1972917360 .fill-AA4{fill:#EDF0FD;} + .d2-1972917360 .fill-AA5{fill:#F7F8FE;} + .d2-1972917360 .fill-AB4{fill:#EDF0FD;} + .d2-1972917360 .fill-AB5{fill:#F7F8FE;} + .d2-1972917360 .stroke-N1{stroke:#0A0F25;} + .d2-1972917360 .stroke-N2{stroke:#676C7E;} + .d2-1972917360 .stroke-N3{stroke:#9499AB;} + .d2-1972917360 .stroke-N4{stroke:#CFD2DD;} + .d2-1972917360 .stroke-N5{stroke:#DEE1EB;} + .d2-1972917360 .stroke-N6{stroke:#EEF1F8;} + .d2-1972917360 .stroke-N7{stroke:#FFFFFF;} + .d2-1972917360 .stroke-B1{stroke:#0D32B2;} + .d2-1972917360 .stroke-B2{stroke:#0D32B2;} + .d2-1972917360 .stroke-B3{stroke:#E3E9FD;} + .d2-1972917360 .stroke-B4{stroke:#E3E9FD;} + .d2-1972917360 .stroke-B5{stroke:#EDF0FD;} + .d2-1972917360 .stroke-B6{stroke:#F7F8FE;} + .d2-1972917360 .stroke-AA2{stroke:#4A6FF3;} + .d2-1972917360 .stroke-AA4{stroke:#EDF0FD;} + .d2-1972917360 .stroke-AA5{stroke:#F7F8FE;} + .d2-1972917360 .stroke-AB4{stroke:#EDF0FD;} + .d2-1972917360 .stroke-AB5{stroke:#F7F8FE;} + .d2-1972917360 .background-color-N1{background-color:#0A0F25;} + .d2-1972917360 .background-color-N2{background-color:#676C7E;} + .d2-1972917360 .background-color-N3{background-color:#9499AB;} + .d2-1972917360 .background-color-N4{background-color:#CFD2DD;} + .d2-1972917360 .background-color-N5{background-color:#DEE1EB;} + .d2-1972917360 .background-color-N6{background-color:#EEF1F8;} + .d2-1972917360 .background-color-N7{background-color:#FFFFFF;} + .d2-1972917360 .background-color-B1{background-color:#0D32B2;} + .d2-1972917360 .background-color-B2{background-color:#0D32B2;} + .d2-1972917360 .background-color-B3{background-color:#E3E9FD;} + .d2-1972917360 .background-color-B4{background-color:#E3E9FD;} + .d2-1972917360 .background-color-B5{background-color:#EDF0FD;} + .d2-1972917360 .background-color-B6{background-color:#F7F8FE;} + .d2-1972917360 .background-color-AA2{background-color:#4A6FF3;} + .d2-1972917360 .background-color-AA4{background-color:#EDF0FD;} + .d2-1972917360 .background-color-AA5{background-color:#F7F8FE;} + .d2-1972917360 .background-color-AB4{background-color:#EDF0FD;} + .d2-1972917360 .background-color-AB5{background-color:#F7F8FE;} + .d2-1972917360 .color-N1{color:#0A0F25;} + .d2-1972917360 .color-N2{color:#676C7E;} + .d2-1972917360 .color-N3{color:#9499AB;} + .d2-1972917360 .color-N4{color:#CFD2DD;} + .d2-1972917360 .color-N5{color:#DEE1EB;} + .d2-1972917360 .color-N6{color:#EEF1F8;} + .d2-1972917360 .color-N7{color:#FFFFFF;} + .d2-1972917360 .color-B1{color:#0D32B2;} + .d2-1972917360 .color-B2{color:#0D32B2;} + .d2-1972917360 .color-B3{color:#E3E9FD;} + .d2-1972917360 .color-B4{color:#E3E9FD;} + .d2-1972917360 .color-B5{color:#EDF0FD;} + .d2-1972917360 .color-B6{color:#F7F8FE;} + .d2-1972917360 .color-AA2{color:#4A6FF3;} + .d2-1972917360 .color-AA4{color:#EDF0FD;} + .d2-1972917360 .color-AA5{color:#F7F8FE;} + .d2-1972917360 .color-AB4{color:#EDF0FD;} + .d2-1972917360 .color-AB5{color:#F7F8FE;}.appendix text.text{fill:#0A0F25}.md{--color-fg-default:#0A0F25;--color-fg-muted:#676C7E;--color-fg-subtle:#9499AB;--color-canvas-default:#FFFFFF;--color-canvas-subtle:#EEF1F8;--color-border-default:#0D32B2;--color-border-muted:#0D32B2;--color-neutral-muted:#EEF1F8;--color-accent-fg:#0D32B2;--color-accent-emphasis:#0D32B2;--color-attention-subtle:#676C7E;--color-danger-fg:red;}.sketch-overlay-B1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B2{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B3{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-AA4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-N2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-N3{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N4{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N7{fill:url(#streaks-bright);mix-blend-mode:darken}.light-code{display: block}.dark-code{display: none}]]> @@ -97,7 +97,7 @@ -abc +abc \ No newline at end of file diff --git a/e2etests-cli/testdata/TestCLI_E2E/internal_linked_pdf.exp.pdf b/e2etests-cli/testdata/TestCLI_E2E/internal_linked_pdf.exp.pdf index 605b355cbd6405d9690eff06ba30e5e04cc60a4a..6dbddb060560fa3658d8327cbb917d2d81d4fdfe 100644 GIT binary patch delta 51 zcmbR9mu1dhmWC~i3#=6_jE#+rG`aMB^HW?BOHvgyT&#=?jEoJ84NVNea@!ADGu~zb E0Jwe+i2wiq delta 51 zcmbR9mu1dhmWC~i3#=8*O$`lAHM#VC^HW?BOHvgyT&#=?jEoJ84NVNea@!ADGu~zb E0JwG!i2wiq diff --git a/e2etests/testdata/stable/circular_dependency/elk/board.exp.json b/e2etests/testdata/stable/circular_dependency/elk/board.exp.json index 79574c40a..6edd3e0c5 100644 --- a/e2etests/testdata/stable/circular_dependency/elk/board.exp.json +++ b/e2etests/testdata/stable/circular_dependency/elk/board.exp.json @@ -195,11 +195,11 @@ "labelPercentage": 0, "route": [ { - "x": 43.16666666666667, + "x": 38.66666666666667, "y": 274 }, { - "x": 43.16666666666667, + "x": 38.66666666666667, "y": 404 } ], diff --git a/e2etests/testdata/stable/circular_dependency/elk/sketch.exp.svg b/e2etests/testdata/stable/circular_dependency/elk/sketch.exp.svg index 8c37ec8a3..8cd2d4599 100644 --- a/e2etests/testdata/stable/circular_dependency/elk/sketch.exp.svg +++ b/e2etests/testdata/stable/circular_dependency/elk/sketch.exp.svg @@ -1,9 +1,9 @@ -abc + .d2-275598678 .fill-N1{fill:#0A0F25;} + .d2-275598678 .fill-N2{fill:#676C7E;} + .d2-275598678 .fill-N3{fill:#9499AB;} + .d2-275598678 .fill-N4{fill:#CFD2DD;} + .d2-275598678 .fill-N5{fill:#DEE1EB;} + .d2-275598678 .fill-N6{fill:#EEF1F8;} + .d2-275598678 .fill-N7{fill:#FFFFFF;} + .d2-275598678 .fill-B1{fill:#0D32B2;} + .d2-275598678 .fill-B2{fill:#0D32B2;} + .d2-275598678 .fill-B3{fill:#E3E9FD;} + .d2-275598678 .fill-B4{fill:#E3E9FD;} + .d2-275598678 .fill-B5{fill:#EDF0FD;} + .d2-275598678 .fill-B6{fill:#F7F8FE;} + .d2-275598678 .fill-AA2{fill:#4A6FF3;} + .d2-275598678 .fill-AA4{fill:#EDF0FD;} + .d2-275598678 .fill-AA5{fill:#F7F8FE;} + .d2-275598678 .fill-AB4{fill:#EDF0FD;} + .d2-275598678 .fill-AB5{fill:#F7F8FE;} + .d2-275598678 .stroke-N1{stroke:#0A0F25;} + .d2-275598678 .stroke-N2{stroke:#676C7E;} + .d2-275598678 .stroke-N3{stroke:#9499AB;} + .d2-275598678 .stroke-N4{stroke:#CFD2DD;} + .d2-275598678 .stroke-N5{stroke:#DEE1EB;} + .d2-275598678 .stroke-N6{stroke:#EEF1F8;} + .d2-275598678 .stroke-N7{stroke:#FFFFFF;} + .d2-275598678 .stroke-B1{stroke:#0D32B2;} + .d2-275598678 .stroke-B2{stroke:#0D32B2;} + .d2-275598678 .stroke-B3{stroke:#E3E9FD;} + .d2-275598678 .stroke-B4{stroke:#E3E9FD;} + .d2-275598678 .stroke-B5{stroke:#EDF0FD;} + .d2-275598678 .stroke-B6{stroke:#F7F8FE;} + .d2-275598678 .stroke-AA2{stroke:#4A6FF3;} + .d2-275598678 .stroke-AA4{stroke:#EDF0FD;} + .d2-275598678 .stroke-AA5{stroke:#F7F8FE;} + .d2-275598678 .stroke-AB4{stroke:#EDF0FD;} + .d2-275598678 .stroke-AB5{stroke:#F7F8FE;} + .d2-275598678 .background-color-N1{background-color:#0A0F25;} + .d2-275598678 .background-color-N2{background-color:#676C7E;} + .d2-275598678 .background-color-N3{background-color:#9499AB;} + .d2-275598678 .background-color-N4{background-color:#CFD2DD;} + .d2-275598678 .background-color-N5{background-color:#DEE1EB;} + .d2-275598678 .background-color-N6{background-color:#EEF1F8;} + .d2-275598678 .background-color-N7{background-color:#FFFFFF;} + .d2-275598678 .background-color-B1{background-color:#0D32B2;} + .d2-275598678 .background-color-B2{background-color:#0D32B2;} + .d2-275598678 .background-color-B3{background-color:#E3E9FD;} + .d2-275598678 .background-color-B4{background-color:#E3E9FD;} + .d2-275598678 .background-color-B5{background-color:#EDF0FD;} + .d2-275598678 .background-color-B6{background-color:#F7F8FE;} + .d2-275598678 .background-color-AA2{background-color:#4A6FF3;} + .d2-275598678 .background-color-AA4{background-color:#EDF0FD;} + .d2-275598678 .background-color-AA5{background-color:#F7F8FE;} + .d2-275598678 .background-color-AB4{background-color:#EDF0FD;} + .d2-275598678 .background-color-AB5{background-color:#F7F8FE;} + .d2-275598678 .color-N1{color:#0A0F25;} + .d2-275598678 .color-N2{color:#676C7E;} + .d2-275598678 .color-N3{color:#9499AB;} + .d2-275598678 .color-N4{color:#CFD2DD;} + .d2-275598678 .color-N5{color:#DEE1EB;} + .d2-275598678 .color-N6{color:#EEF1F8;} + .d2-275598678 .color-N7{color:#FFFFFF;} + .d2-275598678 .color-B1{color:#0D32B2;} + .d2-275598678 .color-B2{color:#0D32B2;} + .d2-275598678 .color-B3{color:#E3E9FD;} + .d2-275598678 .color-B4{color:#E3E9FD;} + .d2-275598678 .color-B5{color:#EDF0FD;} + .d2-275598678 .color-B6{color:#F7F8FE;} + .d2-275598678 .color-AA2{color:#4A6FF3;} + .d2-275598678 .color-AA4{color:#EDF0FD;} + .d2-275598678 .color-AA5{color:#F7F8FE;} + .d2-275598678 .color-AB4{color:#EDF0FD;} + .d2-275598678 .color-AB5{color:#F7F8FE;}.appendix text.text{fill:#0A0F25}.md{--color-fg-default:#0A0F25;--color-fg-muted:#676C7E;--color-fg-subtle:#9499AB;--color-canvas-default:#FFFFFF;--color-canvas-subtle:#EEF1F8;--color-border-default:#0D32B2;--color-border-muted:#0D32B2;--color-neutral-muted:#EEF1F8;--color-accent-fg:#0D32B2;--color-accent-emphasis:#0D32B2;--color-attention-subtle:#676C7E;--color-danger-fg:red;}.sketch-overlay-B1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B2{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B3{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-AA4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-N2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-N3{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N4{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N7{fill:url(#streaks-bright);mix-blend-mode:darken}.light-code{display: block}.dark-code{display: none}]]>abc \ No newline at end of file diff --git a/e2etests/testdata/stable/dense/elk/board.exp.json b/e2etests/testdata/stable/dense/elk/board.exp.json index 10ca86dbd..c3bb3761a 100644 --- a/e2etests/testdata/stable/dense/elk/board.exp.json +++ b/e2etests/testdata/stable/dense/elk/board.exp.json @@ -814,6 +814,14 @@ }, { "x": 421, + "y": 802 + }, + { + "x": 444.3333333333333, + "y": 802 + }, + { + "x": 444.3333333333333, "y": 942 } ], diff --git a/e2etests/testdata/stable/dense/elk/sketch.exp.svg b/e2etests/testdata/stable/dense/elk/sketch.exp.svg index af0c54494..680414591 100644 --- a/e2etests/testdata/stable/dense/elk/sketch.exp.svg +++ b/e2etests/testdata/stable/dense/elk/sketch.exp.svg @@ -1,9 +1,9 @@ -abcdefghijklmnopq + .d2-625346191 .fill-N1{fill:#0A0F25;} + .d2-625346191 .fill-N2{fill:#676C7E;} + .d2-625346191 .fill-N3{fill:#9499AB;} + .d2-625346191 .fill-N4{fill:#CFD2DD;} + .d2-625346191 .fill-N5{fill:#DEE1EB;} + .d2-625346191 .fill-N6{fill:#EEF1F8;} + .d2-625346191 .fill-N7{fill:#FFFFFF;} + .d2-625346191 .fill-B1{fill:#0D32B2;} + .d2-625346191 .fill-B2{fill:#0D32B2;} + .d2-625346191 .fill-B3{fill:#E3E9FD;} + .d2-625346191 .fill-B4{fill:#E3E9FD;} + .d2-625346191 .fill-B5{fill:#EDF0FD;} + .d2-625346191 .fill-B6{fill:#F7F8FE;} + .d2-625346191 .fill-AA2{fill:#4A6FF3;} + .d2-625346191 .fill-AA4{fill:#EDF0FD;} + .d2-625346191 .fill-AA5{fill:#F7F8FE;} + .d2-625346191 .fill-AB4{fill:#EDF0FD;} + .d2-625346191 .fill-AB5{fill:#F7F8FE;} + .d2-625346191 .stroke-N1{stroke:#0A0F25;} + .d2-625346191 .stroke-N2{stroke:#676C7E;} + .d2-625346191 .stroke-N3{stroke:#9499AB;} + .d2-625346191 .stroke-N4{stroke:#CFD2DD;} + .d2-625346191 .stroke-N5{stroke:#DEE1EB;} + .d2-625346191 .stroke-N6{stroke:#EEF1F8;} + .d2-625346191 .stroke-N7{stroke:#FFFFFF;} + .d2-625346191 .stroke-B1{stroke:#0D32B2;} + .d2-625346191 .stroke-B2{stroke:#0D32B2;} + .d2-625346191 .stroke-B3{stroke:#E3E9FD;} + .d2-625346191 .stroke-B4{stroke:#E3E9FD;} + .d2-625346191 .stroke-B5{stroke:#EDF0FD;} + .d2-625346191 .stroke-B6{stroke:#F7F8FE;} + .d2-625346191 .stroke-AA2{stroke:#4A6FF3;} + .d2-625346191 .stroke-AA4{stroke:#EDF0FD;} + .d2-625346191 .stroke-AA5{stroke:#F7F8FE;} + .d2-625346191 .stroke-AB4{stroke:#EDF0FD;} + .d2-625346191 .stroke-AB5{stroke:#F7F8FE;} + .d2-625346191 .background-color-N1{background-color:#0A0F25;} + .d2-625346191 .background-color-N2{background-color:#676C7E;} + .d2-625346191 .background-color-N3{background-color:#9499AB;} + .d2-625346191 .background-color-N4{background-color:#CFD2DD;} + .d2-625346191 .background-color-N5{background-color:#DEE1EB;} + .d2-625346191 .background-color-N6{background-color:#EEF1F8;} + .d2-625346191 .background-color-N7{background-color:#FFFFFF;} + .d2-625346191 .background-color-B1{background-color:#0D32B2;} + .d2-625346191 .background-color-B2{background-color:#0D32B2;} + .d2-625346191 .background-color-B3{background-color:#E3E9FD;} + .d2-625346191 .background-color-B4{background-color:#E3E9FD;} + .d2-625346191 .background-color-B5{background-color:#EDF0FD;} + .d2-625346191 .background-color-B6{background-color:#F7F8FE;} + .d2-625346191 .background-color-AA2{background-color:#4A6FF3;} + .d2-625346191 .background-color-AA4{background-color:#EDF0FD;} + .d2-625346191 .background-color-AA5{background-color:#F7F8FE;} + .d2-625346191 .background-color-AB4{background-color:#EDF0FD;} + .d2-625346191 .background-color-AB5{background-color:#F7F8FE;} + .d2-625346191 .color-N1{color:#0A0F25;} + .d2-625346191 .color-N2{color:#676C7E;} + .d2-625346191 .color-N3{color:#9499AB;} + .d2-625346191 .color-N4{color:#CFD2DD;} + .d2-625346191 .color-N5{color:#DEE1EB;} + .d2-625346191 .color-N6{color:#EEF1F8;} + .d2-625346191 .color-N7{color:#FFFFFF;} + .d2-625346191 .color-B1{color:#0D32B2;} + .d2-625346191 .color-B2{color:#0D32B2;} + .d2-625346191 .color-B3{color:#E3E9FD;} + .d2-625346191 .color-B4{color:#E3E9FD;} + .d2-625346191 .color-B5{color:#EDF0FD;} + .d2-625346191 .color-B6{color:#F7F8FE;} + .d2-625346191 .color-AA2{color:#4A6FF3;} + .d2-625346191 .color-AA4{color:#EDF0FD;} + .d2-625346191 .color-AA5{color:#F7F8FE;} + .d2-625346191 .color-AB4{color:#EDF0FD;} + .d2-625346191 .color-AB5{color:#F7F8FE;}.appendix text.text{fill:#0A0F25}.md{--color-fg-default:#0A0F25;--color-fg-muted:#676C7E;--color-fg-subtle:#9499AB;--color-canvas-default:#FFFFFF;--color-canvas-subtle:#EEF1F8;--color-border-default:#0D32B2;--color-border-muted:#0D32B2;--color-neutral-muted:#EEF1F8;--color-accent-fg:#0D32B2;--color-accent-emphasis:#0D32B2;--color-attention-subtle:#676C7E;--color-danger-fg:red;}.sketch-overlay-B1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B2{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B3{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-AA4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-N2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-N3{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N4{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N7{fill:url(#streaks-bright);mix-blend-mode:darken}.light-code{display: block}.dark-code{display: none}]]>abcdefghijklmnopq \ No newline at end of file diff --git a/e2etests/testdata/stable/multiple_trees/elk/board.exp.json b/e2etests/testdata/stable/multiple_trees/elk/board.exp.json index c74035438..dd3d5dded 100644 --- a/e2etests/testdata/stable/multiple_trees/elk/board.exp.json +++ b/e2etests/testdata/stable/multiple_trees/elk/board.exp.json @@ -1308,6 +1308,14 @@ }, { "x": 106.5, + "y": 400 + }, + { + "x": 89.25, + "y": 400 + }, + { + "x": 89.25, "y": 590 } ], @@ -1916,6 +1924,14 @@ }, { "x": 744.5, + "y": 400 + }, + { + "x": 767, + "y": 400 + }, + { + "x": 767, "y": 590 } ], diff --git a/e2etests/testdata/stable/multiple_trees/elk/sketch.exp.svg b/e2etests/testdata/stable/multiple_trees/elk/sketch.exp.svg index f72fbbf94..b42e542ed 100644 --- a/e2etests/testdata/stable/multiple_trees/elk/sketch.exp.svg +++ b/e2etests/testdata/stable/multiple_trees/elk/sketch.exp.svg @@ -1,9 +1,9 @@ -abcdefghijklmnopqrstuvw + .d2-393352562 .fill-N1{fill:#0A0F25;} + .d2-393352562 .fill-N2{fill:#676C7E;} + .d2-393352562 .fill-N3{fill:#9499AB;} + .d2-393352562 .fill-N4{fill:#CFD2DD;} + .d2-393352562 .fill-N5{fill:#DEE1EB;} + .d2-393352562 .fill-N6{fill:#EEF1F8;} + .d2-393352562 .fill-N7{fill:#FFFFFF;} + .d2-393352562 .fill-B1{fill:#0D32B2;} + .d2-393352562 .fill-B2{fill:#0D32B2;} + .d2-393352562 .fill-B3{fill:#E3E9FD;} + .d2-393352562 .fill-B4{fill:#E3E9FD;} + .d2-393352562 .fill-B5{fill:#EDF0FD;} + .d2-393352562 .fill-B6{fill:#F7F8FE;} + .d2-393352562 .fill-AA2{fill:#4A6FF3;} + .d2-393352562 .fill-AA4{fill:#EDF0FD;} + .d2-393352562 .fill-AA5{fill:#F7F8FE;} + .d2-393352562 .fill-AB4{fill:#EDF0FD;} + .d2-393352562 .fill-AB5{fill:#F7F8FE;} + .d2-393352562 .stroke-N1{stroke:#0A0F25;} + .d2-393352562 .stroke-N2{stroke:#676C7E;} + .d2-393352562 .stroke-N3{stroke:#9499AB;} + .d2-393352562 .stroke-N4{stroke:#CFD2DD;} + .d2-393352562 .stroke-N5{stroke:#DEE1EB;} + .d2-393352562 .stroke-N6{stroke:#EEF1F8;} + .d2-393352562 .stroke-N7{stroke:#FFFFFF;} + .d2-393352562 .stroke-B1{stroke:#0D32B2;} + .d2-393352562 .stroke-B2{stroke:#0D32B2;} + .d2-393352562 .stroke-B3{stroke:#E3E9FD;} + .d2-393352562 .stroke-B4{stroke:#E3E9FD;} + .d2-393352562 .stroke-B5{stroke:#EDF0FD;} + .d2-393352562 .stroke-B6{stroke:#F7F8FE;} + .d2-393352562 .stroke-AA2{stroke:#4A6FF3;} + .d2-393352562 .stroke-AA4{stroke:#EDF0FD;} + .d2-393352562 .stroke-AA5{stroke:#F7F8FE;} + .d2-393352562 .stroke-AB4{stroke:#EDF0FD;} + .d2-393352562 .stroke-AB5{stroke:#F7F8FE;} + .d2-393352562 .background-color-N1{background-color:#0A0F25;} + .d2-393352562 .background-color-N2{background-color:#676C7E;} + .d2-393352562 .background-color-N3{background-color:#9499AB;} + .d2-393352562 .background-color-N4{background-color:#CFD2DD;} + .d2-393352562 .background-color-N5{background-color:#DEE1EB;} + .d2-393352562 .background-color-N6{background-color:#EEF1F8;} + .d2-393352562 .background-color-N7{background-color:#FFFFFF;} + .d2-393352562 .background-color-B1{background-color:#0D32B2;} + .d2-393352562 .background-color-B2{background-color:#0D32B2;} + .d2-393352562 .background-color-B3{background-color:#E3E9FD;} + .d2-393352562 .background-color-B4{background-color:#E3E9FD;} + .d2-393352562 .background-color-B5{background-color:#EDF0FD;} + .d2-393352562 .background-color-B6{background-color:#F7F8FE;} + .d2-393352562 .background-color-AA2{background-color:#4A6FF3;} + .d2-393352562 .background-color-AA4{background-color:#EDF0FD;} + .d2-393352562 .background-color-AA5{background-color:#F7F8FE;} + .d2-393352562 .background-color-AB4{background-color:#EDF0FD;} + .d2-393352562 .background-color-AB5{background-color:#F7F8FE;} + .d2-393352562 .color-N1{color:#0A0F25;} + .d2-393352562 .color-N2{color:#676C7E;} + .d2-393352562 .color-N3{color:#9499AB;} + .d2-393352562 .color-N4{color:#CFD2DD;} + .d2-393352562 .color-N5{color:#DEE1EB;} + .d2-393352562 .color-N6{color:#EEF1F8;} + .d2-393352562 .color-N7{color:#FFFFFF;} + .d2-393352562 .color-B1{color:#0D32B2;} + .d2-393352562 .color-B2{color:#0D32B2;} + .d2-393352562 .color-B3{color:#E3E9FD;} + .d2-393352562 .color-B4{color:#E3E9FD;} + .d2-393352562 .color-B5{color:#EDF0FD;} + .d2-393352562 .color-B6{color:#F7F8FE;} + .d2-393352562 .color-AA2{color:#4A6FF3;} + .d2-393352562 .color-AA4{color:#EDF0FD;} + .d2-393352562 .color-AA5{color:#F7F8FE;} + .d2-393352562 .color-AB4{color:#EDF0FD;} + .d2-393352562 .color-AB5{color:#F7F8FE;}.appendix text.text{fill:#0A0F25}.md{--color-fg-default:#0A0F25;--color-fg-muted:#676C7E;--color-fg-subtle:#9499AB;--color-canvas-default:#FFFFFF;--color-canvas-subtle:#EEF1F8;--color-border-default:#0D32B2;--color-border-muted:#0D32B2;--color-neutral-muted:#EEF1F8;--color-accent-fg:#0D32B2;--color-accent-emphasis:#0D32B2;--color-attention-subtle:#676C7E;--color-danger-fg:red;}.sketch-overlay-B1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B2{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B3{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-AA4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-N2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-N3{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N4{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N7{fill:url(#streaks-bright);mix-blend-mode:darken}.light-code{display: block}.dark-code{display: none}]]>abcdefghijklmnopqrstuvw \ No newline at end of file diff --git a/e2etests/testdata/stable/n22_e32/elk/board.exp.json b/e2etests/testdata/stable/n22_e32/elk/board.exp.json index 76ac9c48f..966ee5350 100644 --- a/e2etests/testdata/stable/n22_e32/elk/board.exp.json +++ b/e2etests/testdata/stable/n22_e32/elk/board.exp.json @@ -2082,6 +2082,14 @@ }, { "x": 366.6666666666667, + "y": 400 + }, + { + "x": 341.8333333333333, + "y": 400 + }, + { + "x": 341.8333333333333, "y": 540 } ], diff --git a/e2etests/testdata/stable/n22_e32/elk/sketch.exp.svg b/e2etests/testdata/stable/n22_e32/elk/sketch.exp.svg index 19189504c..17ac6bd17 100644 --- a/e2etests/testdata/stable/n22_e32/elk/sketch.exp.svg +++ b/e2etests/testdata/stable/n22_e32/elk/sketch.exp.svg @@ -1,9 +1,9 @@ -abcdefghijklmnopqrstu + .d2-4069483948 .fill-N1{fill:#0A0F25;} + .d2-4069483948 .fill-N2{fill:#676C7E;} + .d2-4069483948 .fill-N3{fill:#9499AB;} + .d2-4069483948 .fill-N4{fill:#CFD2DD;} + .d2-4069483948 .fill-N5{fill:#DEE1EB;} + .d2-4069483948 .fill-N6{fill:#EEF1F8;} + .d2-4069483948 .fill-N7{fill:#FFFFFF;} + .d2-4069483948 .fill-B1{fill:#0D32B2;} + .d2-4069483948 .fill-B2{fill:#0D32B2;} + .d2-4069483948 .fill-B3{fill:#E3E9FD;} + .d2-4069483948 .fill-B4{fill:#E3E9FD;} + .d2-4069483948 .fill-B5{fill:#EDF0FD;} + .d2-4069483948 .fill-B6{fill:#F7F8FE;} + .d2-4069483948 .fill-AA2{fill:#4A6FF3;} + .d2-4069483948 .fill-AA4{fill:#EDF0FD;} + .d2-4069483948 .fill-AA5{fill:#F7F8FE;} + .d2-4069483948 .fill-AB4{fill:#EDF0FD;} + .d2-4069483948 .fill-AB5{fill:#F7F8FE;} + .d2-4069483948 .stroke-N1{stroke:#0A0F25;} + .d2-4069483948 .stroke-N2{stroke:#676C7E;} + .d2-4069483948 .stroke-N3{stroke:#9499AB;} + .d2-4069483948 .stroke-N4{stroke:#CFD2DD;} + .d2-4069483948 .stroke-N5{stroke:#DEE1EB;} + .d2-4069483948 .stroke-N6{stroke:#EEF1F8;} + .d2-4069483948 .stroke-N7{stroke:#FFFFFF;} + .d2-4069483948 .stroke-B1{stroke:#0D32B2;} + .d2-4069483948 .stroke-B2{stroke:#0D32B2;} + .d2-4069483948 .stroke-B3{stroke:#E3E9FD;} + .d2-4069483948 .stroke-B4{stroke:#E3E9FD;} + .d2-4069483948 .stroke-B5{stroke:#EDF0FD;} + .d2-4069483948 .stroke-B6{stroke:#F7F8FE;} + .d2-4069483948 .stroke-AA2{stroke:#4A6FF3;} + .d2-4069483948 .stroke-AA4{stroke:#EDF0FD;} + .d2-4069483948 .stroke-AA5{stroke:#F7F8FE;} + .d2-4069483948 .stroke-AB4{stroke:#EDF0FD;} + .d2-4069483948 .stroke-AB5{stroke:#F7F8FE;} + .d2-4069483948 .background-color-N1{background-color:#0A0F25;} + .d2-4069483948 .background-color-N2{background-color:#676C7E;} + .d2-4069483948 .background-color-N3{background-color:#9499AB;} + .d2-4069483948 .background-color-N4{background-color:#CFD2DD;} + .d2-4069483948 .background-color-N5{background-color:#DEE1EB;} + .d2-4069483948 .background-color-N6{background-color:#EEF1F8;} + .d2-4069483948 .background-color-N7{background-color:#FFFFFF;} + .d2-4069483948 .background-color-B1{background-color:#0D32B2;} + .d2-4069483948 .background-color-B2{background-color:#0D32B2;} + .d2-4069483948 .background-color-B3{background-color:#E3E9FD;} + .d2-4069483948 .background-color-B4{background-color:#E3E9FD;} + .d2-4069483948 .background-color-B5{background-color:#EDF0FD;} + .d2-4069483948 .background-color-B6{background-color:#F7F8FE;} + .d2-4069483948 .background-color-AA2{background-color:#4A6FF3;} + .d2-4069483948 .background-color-AA4{background-color:#EDF0FD;} + .d2-4069483948 .background-color-AA5{background-color:#F7F8FE;} + .d2-4069483948 .background-color-AB4{background-color:#EDF0FD;} + .d2-4069483948 .background-color-AB5{background-color:#F7F8FE;} + .d2-4069483948 .color-N1{color:#0A0F25;} + .d2-4069483948 .color-N2{color:#676C7E;} + .d2-4069483948 .color-N3{color:#9499AB;} + .d2-4069483948 .color-N4{color:#CFD2DD;} + .d2-4069483948 .color-N5{color:#DEE1EB;} + .d2-4069483948 .color-N6{color:#EEF1F8;} + .d2-4069483948 .color-N7{color:#FFFFFF;} + .d2-4069483948 .color-B1{color:#0D32B2;} + .d2-4069483948 .color-B2{color:#0D32B2;} + .d2-4069483948 .color-B3{color:#E3E9FD;} + .d2-4069483948 .color-B4{color:#E3E9FD;} + .d2-4069483948 .color-B5{color:#EDF0FD;} + .d2-4069483948 .color-B6{color:#F7F8FE;} + .d2-4069483948 .color-AA2{color:#4A6FF3;} + .d2-4069483948 .color-AA4{color:#EDF0FD;} + .d2-4069483948 .color-AA5{color:#F7F8FE;} + .d2-4069483948 .color-AB4{color:#EDF0FD;} + .d2-4069483948 .color-AB5{color:#F7F8FE;}.appendix text.text{fill:#0A0F25}.md{--color-fg-default:#0A0F25;--color-fg-muted:#676C7E;--color-fg-subtle:#9499AB;--color-canvas-default:#FFFFFF;--color-canvas-subtle:#EEF1F8;--color-border-default:#0D32B2;--color-border-muted:#0D32B2;--color-neutral-muted:#EEF1F8;--color-accent-fg:#0D32B2;--color-accent-emphasis:#0D32B2;--color-attention-subtle:#676C7E;--color-danger-fg:red;}.sketch-overlay-B1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B2{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B3{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-AA4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-N2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-N3{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N4{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N7{fill:url(#streaks-bright);mix-blend-mode:darken}.light-code{display: block}.dark-code{display: none}]]>abcdefghijklmnopqrstu \ No newline at end of file diff --git a/e2etests/testdata/stable/us_map/elk/board.exp.json b/e2etests/testdata/stable/us_map/elk/board.exp.json index ebda440e3..32c358399 100644 --- a/e2etests/testdata/stable/us_map/elk/board.exp.json +++ b/e2etests/testdata/stable/us_map/elk/board.exp.json @@ -2570,11 +2570,11 @@ "y": 1338 }, { - "x": 774.8333333333334, + "x": 752.5000000000001, "y": 1338 }, { - "x": 774.8333333333334, + "x": 752.5000000000001, "y": 2520 } ], @@ -3023,6 +3023,14 @@ }, { "x": 1559.1666666666667, + "y": 3518 + }, + { + "x": 1583.7142857142858, + "y": 3518 + }, + { + "x": 1583.7142857142858, "y": 3708 } ], diff --git a/e2etests/testdata/stable/us_map/elk/sketch.exp.svg b/e2etests/testdata/stable/us_map/elk/sketch.exp.svg index 1d7391c15..44ef121bd 100644 --- a/e2etests/testdata/stable/us_map/elk/sketch.exp.svg +++ b/e2etests/testdata/stable/us_map/elk/sketch.exp.svg @@ -1,9 +1,9 @@ -ALFLGAMSTNAKAZCANVNMUTARLAMOOKTXORCOKSNEWYCTMANYRIDEMDNJPANCSCHIIDMTWAILINIAMIKYWIOHMNSDVAWVMENHVTND + .d2-3481387151 .fill-N1{fill:#0A0F25;} + .d2-3481387151 .fill-N2{fill:#676C7E;} + .d2-3481387151 .fill-N3{fill:#9499AB;} + .d2-3481387151 .fill-N4{fill:#CFD2DD;} + .d2-3481387151 .fill-N5{fill:#DEE1EB;} + .d2-3481387151 .fill-N6{fill:#EEF1F8;} + .d2-3481387151 .fill-N7{fill:#FFFFFF;} + .d2-3481387151 .fill-B1{fill:#0D32B2;} + .d2-3481387151 .fill-B2{fill:#0D32B2;} + .d2-3481387151 .fill-B3{fill:#E3E9FD;} + .d2-3481387151 .fill-B4{fill:#E3E9FD;} + .d2-3481387151 .fill-B5{fill:#EDF0FD;} + .d2-3481387151 .fill-B6{fill:#F7F8FE;} + .d2-3481387151 .fill-AA2{fill:#4A6FF3;} + .d2-3481387151 .fill-AA4{fill:#EDF0FD;} + .d2-3481387151 .fill-AA5{fill:#F7F8FE;} + .d2-3481387151 .fill-AB4{fill:#EDF0FD;} + .d2-3481387151 .fill-AB5{fill:#F7F8FE;} + .d2-3481387151 .stroke-N1{stroke:#0A0F25;} + .d2-3481387151 .stroke-N2{stroke:#676C7E;} + .d2-3481387151 .stroke-N3{stroke:#9499AB;} + .d2-3481387151 .stroke-N4{stroke:#CFD2DD;} + .d2-3481387151 .stroke-N5{stroke:#DEE1EB;} + .d2-3481387151 .stroke-N6{stroke:#EEF1F8;} + .d2-3481387151 .stroke-N7{stroke:#FFFFFF;} + .d2-3481387151 .stroke-B1{stroke:#0D32B2;} + .d2-3481387151 .stroke-B2{stroke:#0D32B2;} + .d2-3481387151 .stroke-B3{stroke:#E3E9FD;} + .d2-3481387151 .stroke-B4{stroke:#E3E9FD;} + .d2-3481387151 .stroke-B5{stroke:#EDF0FD;} + .d2-3481387151 .stroke-B6{stroke:#F7F8FE;} + .d2-3481387151 .stroke-AA2{stroke:#4A6FF3;} + .d2-3481387151 .stroke-AA4{stroke:#EDF0FD;} + .d2-3481387151 .stroke-AA5{stroke:#F7F8FE;} + .d2-3481387151 .stroke-AB4{stroke:#EDF0FD;} + .d2-3481387151 .stroke-AB5{stroke:#F7F8FE;} + .d2-3481387151 .background-color-N1{background-color:#0A0F25;} + .d2-3481387151 .background-color-N2{background-color:#676C7E;} + .d2-3481387151 .background-color-N3{background-color:#9499AB;} + .d2-3481387151 .background-color-N4{background-color:#CFD2DD;} + .d2-3481387151 .background-color-N5{background-color:#DEE1EB;} + .d2-3481387151 .background-color-N6{background-color:#EEF1F8;} + .d2-3481387151 .background-color-N7{background-color:#FFFFFF;} + .d2-3481387151 .background-color-B1{background-color:#0D32B2;} + .d2-3481387151 .background-color-B2{background-color:#0D32B2;} + .d2-3481387151 .background-color-B3{background-color:#E3E9FD;} + .d2-3481387151 .background-color-B4{background-color:#E3E9FD;} + .d2-3481387151 .background-color-B5{background-color:#EDF0FD;} + .d2-3481387151 .background-color-B6{background-color:#F7F8FE;} + .d2-3481387151 .background-color-AA2{background-color:#4A6FF3;} + .d2-3481387151 .background-color-AA4{background-color:#EDF0FD;} + .d2-3481387151 .background-color-AA5{background-color:#F7F8FE;} + .d2-3481387151 .background-color-AB4{background-color:#EDF0FD;} + .d2-3481387151 .background-color-AB5{background-color:#F7F8FE;} + .d2-3481387151 .color-N1{color:#0A0F25;} + .d2-3481387151 .color-N2{color:#676C7E;} + .d2-3481387151 .color-N3{color:#9499AB;} + .d2-3481387151 .color-N4{color:#CFD2DD;} + .d2-3481387151 .color-N5{color:#DEE1EB;} + .d2-3481387151 .color-N6{color:#EEF1F8;} + .d2-3481387151 .color-N7{color:#FFFFFF;} + .d2-3481387151 .color-B1{color:#0D32B2;} + .d2-3481387151 .color-B2{color:#0D32B2;} + .d2-3481387151 .color-B3{color:#E3E9FD;} + .d2-3481387151 .color-B4{color:#E3E9FD;} + .d2-3481387151 .color-B5{color:#EDF0FD;} + .d2-3481387151 .color-B6{color:#F7F8FE;} + .d2-3481387151 .color-AA2{color:#4A6FF3;} + .d2-3481387151 .color-AA4{color:#EDF0FD;} + .d2-3481387151 .color-AA5{color:#F7F8FE;} + .d2-3481387151 .color-AB4{color:#EDF0FD;} + .d2-3481387151 .color-AB5{color:#F7F8FE;}.appendix text.text{fill:#0A0F25}.md{--color-fg-default:#0A0F25;--color-fg-muted:#676C7E;--color-fg-subtle:#9499AB;--color-canvas-default:#FFFFFF;--color-canvas-subtle:#EEF1F8;--color-border-default:#0D32B2;--color-border-muted:#0D32B2;--color-neutral-muted:#EEF1F8;--color-accent-fg:#0D32B2;--color-accent-emphasis:#0D32B2;--color-attention-subtle:#676C7E;--color-danger-fg:red;}.sketch-overlay-B1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B2{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B3{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-AA4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-N2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-N3{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N4{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N7{fill:url(#streaks-bright);mix-blend-mode:darken}.light-code{display: block}.dark-code{display: none}]]>ALFLGAMSTNAKAZCANVNMUTARLAMOOKTXORCOKSNEWYCTMANYRIDEMDNJPANCSCHIIDMTWAILINIAMIKYWIOHMNSDVAWVMENHVTND \ No newline at end of file diff --git a/lib/geo/segment.go b/lib/geo/segment.go index bd88ac2cf..be71812f8 100644 --- a/lib/geo/segment.go +++ b/lib/geo/segment.go @@ -20,18 +20,18 @@ func NewSegment(from, to *Point) *Segment { func (s Segment) Overlaps(otherS Segment, isHorizontal bool, buffer float64) bool { if isHorizontal { - if s.Start.Y-otherS.End.Y >= buffer { + if math.Min(s.Start.Y, s.End.Y)-math.Max(otherS.Start.Y, otherS.End.Y) >= buffer { return false } - if otherS.Start.Y-s.End.Y >= buffer { + if math.Min(otherS.Start.Y, otherS.End.Y)-math.Max(s.Start.Y, s.End.Y) >= buffer { return false } return true } else { - if s.Start.X-otherS.End.X >= buffer { + if math.Min(s.Start.X, s.End.X)-math.Max(otherS.Start.X, otherS.End.X) >= buffer { return false } - if otherS.Start.X-s.End.X >= buffer { + if math.Min(otherS.Start.X, otherS.End.X)-math.Max(s.Start.X, s.End.X) >= buffer { return false } return true