If a user selects an area by clicking on the map:
- The selected outlet is passed all the way up the
MapDisplay component chain to App
- The selected outlet is passed all the way down the
AreaDisplay component chain to AreaDisplay
3. AreaDisplay queries the backend and finds the watershed upstream of that outlet
- The watershed is passed all the way up the
AreaDisplay component chain to App
- The watershed is passed all the way down the
DataDisplayand MapDisplay component chains to DataMap and *DataDisplay for analysis and viewing
App, the top level component, "owns" both region and outlet state, to facilitate all this note-passing, despite doing nothing with them except passing them around. Storing the selected outlet and region in a Zustand store would be a lot less complicated.
@rod-glover also suggests loading configuration files directly into the store. We've currently got four; three region-whitelists and one that records default map colours for variables.
If a user selects an area by clicking on the map:
MapDisplaycomponent chain toAppAreaDisplaycomponent chain toAreaDisplay3.
AreaDisplayqueries the backend and finds the watershed upstream of that outletAreaDisplaycomponent chain toAppDataDisplayandMapDisplaycomponent chains toDataMapand*DataDisplayfor analysis and viewingApp, the top level component, "owns" both region and outlet state, to facilitate all this note-passing, despite doing nothing with them except passing them around. Storing the selected outlet and region in a Zustand store would be a lot less complicated.@rod-glover also suggests loading configuration files directly into the store. We've currently got four; three region-whitelists and one that records default map colours for variables.