jerosoler / Drawflow

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

Import with multiple Jsons #549

Closed reshmakarunan closed 2 years ago

reshmakarunan commented 2 years ago

Hi,

I am using the Drawflow library and thank you for such a wonderful Library :)

I have a query related with Editor.Import functionality. Is there any way to import multiple jsons to the same editor? The Jsons which are already saved before.

jerosoler commented 2 years ago

Hello,

Thank you!

Only one json can be imported at a time. You can import it as many times as you want.

If you want to import several json, you can transform-them before importing into one.

For this, I would use the uuid, since otherwise the id of the nodes is consecutive.

editor.useuuid = true;
reshmakarunan commented 2 years ago

Thank you for the response.
I have already tried the option you suggested. I am using uuid and transforming the Json before importing. It is working as expected.

Thank you once again