jerosoler / Drawflow

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

Checkbox is not checked when importing #783

Open heddock opened 8 months ago

heddock commented 8 months ago

Hi,

thanks for this great framework. I am using a checkbox to be able to disable a node. This value is written to the json output but when importing this json again the checkbox is not checked anymore.

image

image

After importing it will show up unchecked:

image

How can i fix this?

Thanks,

Frank

jerosoler commented 8 months ago

Hi, Thanks!

View this:

heddock commented 8 months ago

Hi,

thanks for the quick response. I already saw those articles but i was not able to get it to work. I saw your comment to use the import event but i do not know how yo use this. I have tried to add that event by adding

editor.on('import', (id) => { }

But this event is never triggered.

Can you point me in the right direction? Thanks.

jerosoler commented 8 months ago

View example in this coment.

In this comment forloop to import data.

The import event has to be before start.

heddock commented 7 months ago

Thanks. With your examples i managed to connect the dots.