Merge pull request #1227 from colouring-cities/interface/ui-tweaks
Interface/UI tweaks
This commit is contained in:
commit
0cc0ed385f
@ -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>
|
||||||
|
@ -297,7 +297,7 @@ export const DisplayPreferencesProvider: React.FC<{}> = ({children}) => {
|
|||||||
}
|
}
|
||||||
flipHistoricData(e);
|
flipHistoricData(e);
|
||||||
},
|
},
|
||||||
[historicData],
|
[historicData, historicMap],
|
||||||
)
|
)
|
||||||
const historicDataSwitchOnClick = (e) => {
|
const historicDataSwitchOnClick = (e) => {
|
||||||
flipHistoricData(e)
|
flipHistoricData(e)
|
||||||
@ -315,7 +315,7 @@ export const DisplayPreferencesProvider: React.FC<{}> = ({children}) => {
|
|||||||
}
|
}
|
||||||
fliphistoricMap(e);
|
fliphistoricMap(e);
|
||||||
},
|
},
|
||||||
[historicMap],
|
[historicMap, historicData],
|
||||||
)
|
)
|
||||||
const historicMapSwitchOnClick = (e) => {
|
const historicMapSwitchOnClick = (e) => {
|
||||||
fliphistoricMap(e)
|
fliphistoricMap(e)
|
||||||
|
Loading…
Reference in New Issue
Block a user