LandSciTech / ccviR

Implement NatureServe climate change vulnerability index in R
https://landscitech.github.io/ccviR/
Other
2 stars 1 forks source link

Spatial vuln Q's are changed when restore if cave checked #162

Open see24 opened 2 months ago

see24 commented 2 months ago

Though this had been fixed but if cave is checked it is recalculated and doesn't work.

Don't really understand how it was working before, need to thoroughly comment and understand the reactivity of restoring from file with running spatial

see24 commented 1 month ago

First trigger of spat_res2 is with spat_res updated but input_cave not updated

Then spatial analysis is triggered which sets spat_res2 to FALSE and triggers spat_res2 again input$cave still not updated

Changed the observe in spat_res2 to observe_event hopefully means it will only change when spatial is run

Moving to multiple reactive events because need to be inside new event for new inputs to have populated

Next plan is to create a reactive values for input$cave that is input$cave but can be changed during server, but first check if the same issue can happen for

This is a bigger problem it is also an issue for the raster classification matrix. I think it is anything that is modified in the loaded file and affects the rest of the calculations

See this SO https://stackoverflow.com/a/46370296/3277050, not satisfying answer but might lead to one