jerosoler / Drawflow

Simple flow library 🖥️🖱️
https://jerosoler.github.io/Drawflow/
MIT License
4.41k stars 713 forks source link

Fix: maintain node order in JSON export #864

Open rahulsolanki001 opened 1 month ago

rahulsolanki001 commented 1 month ago

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

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

jerosoler commented 1 month ago

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.