NaturalIntelligence / imglab

To speedup and simplify image labeling/ annotation process with multiple supported formats.
https://solothought.com/imglab/
MIT License
985 stars 609 forks source link

LabellingData is now saved on and retrieved from localStorage #45

Closed LandoLucas closed 6 years ago

LandoLucas commented 6 years ago

Purpose / Goal

Resolve issue: https://github.com/NaturalIntelligence/imglab/issues/37

The labellingData object will be saved to the browser localStorage every 5 seconds. When the application loads, it will try to retrieve the saved data if it exists and use it.

Type

amitguptagwl commented 6 years ago

Though the code seems perfect. Can you please confirm that you've tested it for following points?

Please also check console for any error on chrome and firefox.

LandoLucas commented 6 years ago

Yes, I tested all those scenarios and it's behaving correctly.

amitguptagwl commented 6 years ago

Thanks for your PR. I would like to appreciate your work.

amitguptagwl commented 6 years ago

An observation

VM2597:1 Uncaught SyntaxError: Unexpected token u in JSON at position 0
    at JSON.parse (<anonymous>)
    at getLabellingDataFromLocalStorage (storePersistor.js:10)
    at store.js:139

It happens when the application has no data in localstorage or when the application is just started.

LandoLucas commented 6 years ago

I'll take a look at that error

amitguptagwl commented 6 years ago

It's minor. I've fixed that. I'll push the changes. So don't worry.