mirror of
https://github.com/a-nyx/maputnik-with-pmtiles.git
synced 2024-12-28 15:51:16 +01:00
Delay modal rendering until open
This commit is contained in:
parent
a5a7dab8e7
commit
fed8c6b0ea
1 changed files with 19 additions and 16 deletions
|
@ -121,22 +121,25 @@ export default class Toolbar extends React.Component {
|
||||||
top: 0,
|
top: 0,
|
||||||
backgroundColor: colors.black
|
backgroundColor: colors.black
|
||||||
}}>
|
}}>
|
||||||
<SettingsModal
|
{this.state.openSettingsModal && <SettingsModal
|
||||||
mapStyle={this.props.mapStyle}
|
mapStyle={this.props.mapStyle}
|
||||||
onStyleChanged={this.props.onStyleChanged}
|
onStyleChanged={this.props.onStyleChanged}
|
||||||
isOpen={this.state.openSettingsModal}
|
isOpen={this.state.openSettingsModal}
|
||||||
toggle={() => this.toggleSettings.bind(this)}
|
toggle={() => this.toggleSettings.bind(this)}
|
||||||
/>
|
/>
|
||||||
<OpenModal
|
}
|
||||||
isOpen={this.state.openOpenModal}
|
{this.state.openOpenModal &&<OpenModal
|
||||||
toggle={() => this.toggleOpen.bind(this)}
|
isOpen={this.state.openOpenModal}
|
||||||
/>
|
toggle={() => this.toggleOpen.bind(this)}
|
||||||
<SourcesModal
|
/>
|
||||||
mapStyle={this.props.mapStyle}
|
}
|
||||||
onStyleChanged={this.props.onStyleChanged}
|
{this.state.openSourcesModal && <SourcesModal
|
||||||
isOpen={this.state.openSourcesModal}
|
mapStyle={this.props.mapStyle}
|
||||||
toggle={() => this.toggleSources.bind(this)}
|
onStyleChanged={this.props.onStyleChanged}
|
||||||
/>
|
isOpen={this.state.openSourcesModal}
|
||||||
|
toggle={() => this.toggleSources.bind(this)}
|
||||||
|
/>
|
||||||
|
}
|
||||||
<ToolbarAction style={{
|
<ToolbarAction style={{
|
||||||
width: 180,
|
width: 180,
|
||||||
textAlign: 'left',
|
textAlign: 'left',
|
||||||
|
|
Loading…
Reference in a new issue