Skip to content

Fix: maintain node order in JSON export#864

Open
rahulsolanki001 wants to merge 1 commit intojerosoler:masterfrom
rahulsolanki001:fix-export-json-order
Open

Fix: maintain node order in JSON export#864
rahulsolanki001 wants to merge 1 commit intojerosoler:masterfrom
rahulsolanki001:fix-export-json-order

Conversation

@rahulsolanki001
Copy link
Copy Markdown

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
Copy Markdown
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.

2 participants