Skip to content

Commit 55c5fd9

Browse files
authored
Merge pull request #243 from ucdavis/srk/button-names
update some text and set some auto-disabled
2 parents f433f82 + 260a8d3 commit 55c5fd9

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/components/Map/MapContainer.tsx

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -502,6 +502,9 @@ export const MapContainer = () => {
502502
const style = {
503503
height: window.innerHeight
504504
};
505+
506+
const allResultsSelected = selectedYearIndex === years.length;
507+
505508
return (
506509
<div style={style}>
507510
{(yearlyResults.length > 0 || loading) && (
@@ -511,6 +514,8 @@ export const MapContainer = () => {
511514
toggleMoveInGeoJson(h => !h);
512515
}}
513516
active={showMoveInGeoJson}
517+
disabled={allResultsSelected}
518+
title='Show Move-In Geometry in selected year'
514519
color='primary'
515520
className='toggle-buttons movein-toggle'
516521
>
@@ -522,6 +527,8 @@ export const MapContainer = () => {
522527
toggleTransportationGeoJson(h => !h);
523528
}}
524529
active={showTransportationGeoJson}
530+
disabled={allResultsSelected}
531+
title='Show Transportation Geometry in selected year'
525532
color='primary'
526533
className='toggle-buttons transportation-toggle'
527534
>
@@ -539,6 +546,7 @@ export const MapContainer = () => {
539546
toggleHeatmap(h => !h);
540547
}}
541548
active={showHeatmap}
549+
title='Heatmap scaled by density of biomass'
542550
color='primary'
543551
className='toggle-buttons heatmap-toggle'
544552
>
@@ -551,10 +559,11 @@ export const MapContainer = () => {
551559
toggleErrorGeoJson(!showErrorGeoJson);
552560
}}
553561
active={showErrorGeoJson}
562+
title='Cluster zones which cannot be used for biomass'
554563
color='primary'
555564
className='toggle-buttons error-toggle'
556565
>
557-
<span>{isErrorZone ? 'Show Error Zones' : 'Hide Error Zones'}</span>
566+
<span>{isErrorZone ? 'Show Unusable Zones' : 'Hide Unusable Zones'}</span>
558567
<FontAwesomeIcon icon={isErrorZone ? faEye : faEyeSlash} />
559568
</Button>
560569
<Button

0 commit comments

Comments
 (0)