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

Fix: maintain node order in JSON export #864

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rahulsolanki001
Copy link

Description

This pull request addresses the issue where the JSON export from the drawflow library did not maintain the user-defined order of nodes after adding, removing, or repositioning them. The changes made ensure that nodes are exported in the correct sequence as per their connection sequence in the UI.

Changes Made

  • Ensured nodes are ordered correctly in the JSON export.
  • Used a traversal algorithm to determine the correct order of nodes.
  • Updated the export functionality to reflect the correct node sequence.

Fixes #864 order of the nodes not correct when changing in the UI & then exporting it

- Ensure nodes are ordered in the JSON export as per their connection sequence in the UI
- Use a traversal algorithm to determine the correct order of nodes
- Update the export functionality to reflect the correct node sequence
@jerosoler
Copy link
Owner

Thanks for the PR, I'll check it out. Even though I've never had a problem. But it is true that a JSON does not return correctly.

Be careful that sometimes the order is correct, but browsers display them in an orderly manner.

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

Successfully merging this pull request may close these issues.

None yet

2 participants