Fix for Historical Map Button logic
Remember to correctly turn both layers off when switching back to Age data
This commit is contained in:
parent
95d0fbd113
commit
86eb45477a
@ -65,12 +65,14 @@ const AgeView: React.FunctionComponent<CategoryViewProps> = (props) => {
|
|||||||
const switchToAgeMapStyle = (e) => {
|
const switchToAgeMapStyle = (e) => {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
|
||||||
if (props.mapColourScale == "survival_status")
|
if (historicData === 'enabled') {
|
||||||
{
|
|
||||||
historicDataSwitchOnClick(e);
|
historicDataSwitchOnClick(e);
|
||||||
}
|
}
|
||||||
|
if (historicMap === 'enabled') {
|
||||||
|
historicMapSwitchOnClick(e);
|
||||||
|
}
|
||||||
|
|
||||||
props.onMapColourScale('date_year')
|
props.onMapColourScale('date_year');
|
||||||
}
|
}
|
||||||
|
|
||||||
const switchToStylePeriodMapStyle = (e) => {
|
const switchToStylePeriodMapStyle = (e) => {
|
||||||
@ -498,7 +500,7 @@ const AgeView: React.FunctionComponent<CategoryViewProps> = (props) => {
|
|||||||
Choose a colour to indicate whether the building has survived.
|
Choose a colour to indicate whether the building has survived.
|
||||||
</i>
|
</i>
|
||||||
</div>
|
</div>
|
||||||
{(historicMap == "enabled") ?
|
{(historicMap === "enabled") ?
|
||||||
<button className={`map-switcher-inline enabled-state btn btn-outline btn-outline-dark ${darkLightTheme}`} onClick={switchToAgeMapStyle}>
|
<button className={`map-switcher-inline enabled-state btn btn-outline btn-outline-dark ${darkLightTheme}`} onClick={switchToAgeMapStyle}>
|
||||||
Click here to hide the 1890s OS historical map.
|
Click here to hide the 1890s OS historical map.
|
||||||
</button>
|
</button>
|
||||||
@ -507,7 +509,7 @@ const AgeView: React.FunctionComponent<CategoryViewProps> = (props) => {
|
|||||||
Click here to show the 1890s OS historical map.
|
Click here to show the 1890s OS historical map.
|
||||||
</button>
|
</button>
|
||||||
}
|
}
|
||||||
{(historicData == "enabled") ?
|
{(historicData === "enabled") ?
|
||||||
<button className={`map-switcher-inline enabled-state btn btn-outline btn-outline-dark ${darkLightTheme}`} onClick={switchToAgeMapStyle}>
|
<button className={`map-switcher-inline enabled-state btn btn-outline btn-outline-dark ${darkLightTheme}`} onClick={switchToAgeMapStyle}>
|
||||||
Click here to hide the 1890s OS historical map with modern footprints.
|
Click here to hide the 1890s OS historical map with modern footprints.
|
||||||
</button>
|
</button>
|
||||||
|
Loading…
Reference in New Issue
Block a user