jerosoler / Drawflow

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

Node ids always start by 1 #736

Closed javierherreromajorel closed 11 months ago

javierherreromajorel commented 11 months ago

I dont know if is the usual or I am doing something wrong, but the node ids always start by one when i use the function editor.addNode(). No matter if i have imported other nodes previously with editor.import(), the first node i will add after refreshing will have id = 1. There is a way to make the nodes follow the sequence from the highest id node of the imported data?

Thanks a lot in advance!

jerosoler commented 11 months ago

You'll be doing something wrong.

The node id would have to start with the sum of the last node +1.

Show your code.

javierherreromajorel commented 11 months ago

Sorry, my mistake, i effectively did something wrong, I should have checked the demo before opening the issue. Again, thanks a lot for this project, you did a really amazing job. Sorry for the disturbance.