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

Generated flow have a lot of unnecessary edge crossing #248

Open
flyrobot27 opened this issue Apr 21, 2024 · 0 comments
Open

Generated flow have a lot of unnecessary edge crossing #248

flyrobot27 opened this issue Apr 21, 2024 · 0 comments

Comments

@flyrobot27
Copy link

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[x] Bug report  
[ ] Performance issue
[ ] Feature request
[ ] Documentation issue or request
[ ] Other... Please describe:

Current behavior

There are a lot of unnecessary edge crossing in the generated graph, especially when the network contains a look. See the following example:
unnecessary cross 1
unnecessary cross 2

Expected behavior

I expect no such crossings, unless absolute necessary (e.g. non planar graphs)

Minimal reproduction of the problem with instructions

Here is the list of nodes:

[
  {
    "id": "1",
    "text": "1 - Laborer Idle"
  },
  {
    "id": "2",
    "text": "2 - Resupply Stack"
  },
  {
    "id": "3",
    "text": "3 - Position Occupied"
  },
  {
    "id": "4",
    "text": "4 - Position Available"
  },
  {
    "id": "5",
    "text": "5 - Mason Removes Packet"
  },
  {
    "id": "6",
    "text": "6 - Mason Lays Brick"
  },
  {
    "id": "7",
    "text": "7 - Mason Waits Resupply"
  },
  {
    "id": "8",
    "text": "8 - function_counter"
  }
]

and the list of edges:

[
  {
    "id": "2-1",
    "from": "2",
    "to": "1"
  },
  {
    "id": "2-3",
    "from": "2",
    "to": "3"
  },
  {
    "id": "1-2",
    "from": "1",
    "to": "2"
  },
  {
    "id": "4-2",
    "from": "4",
    "to": "2"
  },
  {
    "id": "5-4",
    "from": "5",
    "to": "4"
  },
  {
    "id": "5-6",
    "from": "5",
    "to": "6"
  },
  {
    "id": "3-5",
    "from": "3",
    "to": "5"
  },
  {
    "id": "7-5",
    "from": "7",
    "to": "5"
  },
  {
    "id": "6-8",
    "from": "6",
    "to": "8"
  },
  {
    "id": "8-7",
    "from": "8",
    "to": "7"
  }
]

What is the motivation / use case for changing the behavior?

Easier readability, making the graph less cluttered

Environment


Libs:
- react version: 18.2.0
- reaflow version: 5.2.10


Browser:
- [x] Chrome (desktop) version 124.0.6367.60
- [ ] Chrome (Android) version XX
- [ ] Chrome (iOS) version XX
- [x] Firefox version 125.0.1
- [ ] Safari (desktop) version XX
- [ ] Safari (iOS) version XX
- [ ] IE version XX
- [ ] Edge version XX
 
For Tooling issues:
npm version is 10.2.4
node version is 18.19.1

Others:
Browser is on Windows 11
Server is on Ubuntu 22.04 LTS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant