interface: optimise reversing risk scales
Created by: famuvie
Currently, every time the user reverses the risk scale by clicking the Inverse
button, the interface calls risk_layer()
again (in server.R
), with the scale
argument reversed.
However, this involves recalculating the distances which takes time.
We can bypass this by simply modifying the raster values as 100 - x
.