cvdlab / react-planner

:pencil2: A React Component for plans design. Draw a 2D floorplan and navigate it in 3D mode.
https://cvdlab.github.io/react-planner
MIT License
1.28k stars 456 forks source link

refresh will clean the state #190

Open GEEKTEDDY opened 4 years ago

GEEKTEDDY commented 4 years ago

Try to add something on canvas, and then refresh the page, it turns out that the item added is still on canvas but I can't get the item data when I click the save button.

GEEKTEDDY commented 4 years ago

One solution: add a flag for compoment 'toolBar', reset the flag in compomentWillMount when browser refresh, and put flag into the return statement inside shouldComponentUpdate.

Laksmaprabhu commented 4 years ago

flag

flag means?

GEEKTEDDY commented 4 years ago

flag

flag means?

a bool variable that determines whether to update toolBar component or not

Magnuti commented 2 years ago

Possible duplicate of #188