Skip to content

Commit

Permalink
Do not hide zoomed-out FSAs in Probabilistic Loss Exceedance Curve
Browse files Browse the repository at this point in the history
Also add a translucent red shade to the enclosed FSA to make it clear
which areas are inside or outside of the FSA.

Fixes OpenDRR/riskprofiler#125
  • Loading branch information
anthonyfok committed Mar 12, 2024
1 parent 1e5e61b commit 6e5fdcf
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions site/assets/themes/fw-child/resources/js/rp_risks.js
Original file line number Diff line number Diff line change
Expand Up @@ -1023,10 +1023,12 @@ var color_ramp = [

}

if (map.hasLayer(plugin_settings.map.layers.fsa)) {
plugin_settings.map.panes.fsa.style.display = 'none'
// map.removeLayer(plugin_settings.map.layers.fsa)
}
/* 2023-11-23: Commented out to keep huge FSA (e.g. "V0R") visible even if zoomed out to CSD aggregation;
* see https://github.com/OpenDRR/riskprofiler/issues/125 */
// if (map.hasLayer(plugin_settings.map.layers.fsa)) {
// plugin_settings.map.panes.fsa.style.display = 'none'
// // map.removeLayer(plugin_settings.map.layers.fsa)
// }

var indicator_key = plugin_settings.indicator.key + '_' + plugin_settings.api.retrofit

Expand Down Expand Up @@ -1854,7 +1856,9 @@ var color_ramp = [

plugin_settings.map.layers.fsa = new L.GeoJSON(source, {
style: {
fill: false,
fill: true,
fillColor: '#FF0000',
fillOpacity: 0.15,
color: '#FF0000',
weight: 4,
opacity: 0.6
Expand Down

0 comments on commit 6e5fdcf

Please sign in to comment.