revert part of whitespace changes
This commit is contained in:
parent
611772efa8
commit
6551d9742f
@ -51,7 +51,7 @@ class ColouringMap extends Component<ColouringMapProps, ColouringMapState> {
|
|||||||
this.themeSwitch = this.themeSwitch.bind(this);
|
this.themeSwitch = this.themeSwitch.bind(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
handleLocate(lat: number, lng: number, zoom: number) {
|
handleLocate(lat: number, lng: number, zoom: number){
|
||||||
this.setState({
|
this.setState({
|
||||||
position: [lat, lng],
|
position: [lat, lng],
|
||||||
zoom: zoom
|
zoom: zoom
|
||||||
@ -69,8 +69,8 @@ class ColouringMap extends Component<ColouringMapProps, ColouringMapState> {
|
|||||||
|
|
||||||
themeSwitch(e) {
|
themeSwitch(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
const newTheme = (this.state.theme === 'light') ? 'night' : 'light';
|
const newTheme = (this.state.theme === 'light')? 'night' : 'light';
|
||||||
this.setState({ theme: newTheme });
|
this.setState({theme: newTheme});
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
@ -99,7 +99,7 @@ class ColouringMap extends Component<ColouringMapProps, ColouringMapState> {
|
|||||||
<Pane
|
<Pane
|
||||||
key={this.state.theme}
|
key={this.state.theme}
|
||||||
name={'cc-base-pane'}
|
name={'cc-base-pane'}
|
||||||
style={{ zIndex: 50 }}
|
style={{zIndex: 50}}
|
||||||
>
|
>
|
||||||
<CityBaseMapLayer theme={this.state.theme} />
|
<CityBaseMapLayer theme={this.state.theme} />
|
||||||
<BuildingBaseLayer theme={this.state.theme} />
|
<BuildingBaseLayer theme={this.state.theme} />
|
||||||
@ -115,7 +115,7 @@ class ColouringMap extends Component<ColouringMapProps, ColouringMapState> {
|
|||||||
|
|
||||||
<Pane
|
<Pane
|
||||||
name='cc-overlay-pane'
|
name='cc-overlay-pane'
|
||||||
style={{ zIndex: 300 }}
|
style={{zIndex: 300}}
|
||||||
>
|
>
|
||||||
<CityBoundaryLayer />
|
<CityBoundaryLayer />
|
||||||
<BuildingNumbersLayer revisionId={this.props.revisionId} />
|
<BuildingNumbersLayer revisionId={this.props.revisionId} />
|
||||||
@ -129,7 +129,7 @@ class ColouringMap extends Component<ColouringMapProps, ColouringMapState> {
|
|||||||
</Pane>
|
</Pane>
|
||||||
|
|
||||||
<ZoomControl position="topright" />
|
<ZoomControl position="topright" />
|
||||||
<AttributionControl prefix="" />
|
<AttributionControl prefix=""/>
|
||||||
</MapContainer>
|
</MapContainer>
|
||||||
{
|
{
|
||||||
this.props.mode !== 'basic' &&
|
this.props.mode !== 'basic' &&
|
||||||
@ -150,13 +150,13 @@ class ColouringMap extends Component<ColouringMapProps, ColouringMapState> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function ClickHandler({ onClick }: { onClick: (e) => void }) {
|
function ClickHandler({ onClick }: {onClick: (e) => void}) {
|
||||||
useMapEvent('click', (e) => onClick(e));
|
useMapEvent('click', (e) => onClick(e));
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
function MapBackgroundColor({ theme }: { theme: MapTheme }) {
|
function MapBackgroundColor({ theme}: {theme: MapTheme}) {
|
||||||
const map = useMap();
|
const map = useMap();
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
map.getContainer().style.backgroundColor = mapBackgroundColor[theme];
|
map.getContainer().style.backgroundColor = mapBackgroundColor[theme];
|
||||||
|
Loading…
Reference in New Issue
Block a user