Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicate points on edges #305

Open
tylerlong opened this issue Oct 30, 2024 · 3 comments
Open

Duplicate points on edges #305

tylerlong opened this issue Oct 30, 2024 · 3 comments
Labels

Comments

@tylerlong
Copy link

tylerlong commented Oct 30, 2024

Describe the bug
There are duplicate points on edges. It makes the SVG marker-end arrow head have a wrong direction.
Screenshot 2024-10-30 at 10 50 55 AM

Reproduce it

You can see that the arrow head on top is facing left, but it is supposed to face down. Root cause is there are two duplicate points on the edge, which makes SVG cannot decide the direction, so it use the default direction.

Expected behavior
There shouldn't be duplicate points on an edge.

ELK Version
0.9.3

Additional context

"startPoint": {
            "x": 194.4,
            "y": 210.39999999999998
          },
          "endPoint": {
            "x": 133.6,
            "y": 44
          },
          "bendPoints": [
            {
              "x": 194.4,
              "y": 210.39999999999998
            },
            {
              "x": 194.39999999999998,
              "y": 226.39999999999998
            },
            {
              "x": 163.99999999999994,
              "y": 234.39999999999995
            },
            {
              "x": 133.59999999999997,
              "y": 242.39999999999995
            },
            {
              "x": 72.80000000000001,
              "y": 242.39999999999995
            },
            {
              "x": 42.40000000000002,
              "y": 237.0666666666666
            },
            {
              "x": 12,
              "y": 231.7333333333333
            },
            {
              "x": 12,
              "y": 221.06666666666666
            },
            {
              "x": 12,
              "y": 201.86666666666662
            },
            {
              "x": 12,
              "y": 182.66666666666663
            },
            {
              "x": 12,
              "y": 154.9333333333333
            },
            {
              "x": 12,
              "y": 134.13333333333333
            },
            {
              "x": 12,
              "y": 113.33333333333331
            },
            {
              "x": 12,
              "y": 99.46666666666665
            },
            {
              "x": 12,
              "y": 85.59999999999998
            },
            {
              "x": 12,
              "y": 71.73333333333332
            },
            {
              "x": 12,
              "y": 57.86666666666666
            },
            {
              "x": 12,
              "y": 45.599999999999994
            },
            {
              "x": 12,
              "y": 33.33333333333333
            },
            {
              "x": 12,
              "y": 22.666666666666664
            },
            {
              "x": 32.266666666666666,
              "y": 17.333333333333332
            },
            {
              "x": 52.53333333333333,
              "y": 12
            },
            {
              "x": 93.06666666666666,
              "y": 12
            },
            {
              "x": 113.3333333333333,
              "y": 20
            },
            {
              "x": 133.59999999999997,
              "y": 28
            },
            {
              "x": 133.6,
              "y": 44
            }
          ],

You can see that startPoint === bendPoints[0] and endPoint === bendPoints[bendPoints.length-1].

But this doesn't happen to other edges, only this edge has the issue.

@soerendomroes
Copy link
Member

This seems to be an issue with the SPLINES edge routing, correct?

@tylerlong
Copy link
Author

This seems to be an issue with the SPLINES edge routing, correct?

Confirmed. SPLINES edge routing only issue.

@soerendomroes
Copy link
Member

Thanks, we will investigate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants