mirror of
https://github.com/a-nyx/maputnik-with-pmtiles.git
synced 2024-12-27 08:25:24 +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,
|
||||
backgroundColor: colors.black
|
||||
}}>
|
||||
<SettingsModal
|
||||
mapStyle={this.props.mapStyle}
|
||||
onStyleChanged={this.props.onStyleChanged}
|
||||
isOpen={this.state.openSettingsModal}
|
||||
toggle={() => this.toggleSettings.bind(this)}
|
||||
/>
|
||||
<OpenModal
|
||||
isOpen={this.state.openOpenModal}
|
||||
toggle={() => this.toggleOpen.bind(this)}
|
||||
/>
|
||||
<SourcesModal
|
||||
mapStyle={this.props.mapStyle}
|
||||
onStyleChanged={this.props.onStyleChanged}
|
||||
isOpen={this.state.openSourcesModal}
|
||||
toggle={() => this.toggleSources.bind(this)}
|
||||
/>
|
||||
{this.state.openSettingsModal && <SettingsModal
|
||||
mapStyle={this.props.mapStyle}
|
||||
onStyleChanged={this.props.onStyleChanged}
|
||||
isOpen={this.state.openSettingsModal}
|
||||
toggle={() => this.toggleSettings.bind(this)}
|
||||
/>
|
||||
}
|
||||
{this.state.openOpenModal &&<OpenModal
|
||||
isOpen={this.state.openOpenModal}
|
||||
toggle={() => this.toggleOpen.bind(this)}
|
||||
/>
|
||||
}
|
||||
{this.state.openSourcesModal && <SourcesModal
|
||||
mapStyle={this.props.mapStyle}
|
||||
onStyleChanged={this.props.onStyleChanged}
|
||||
isOpen={this.state.openSourcesModal}
|
||||
toggle={() => this.toggleSources.bind(this)}
|
||||
/>
|
||||
}
|
||||
<ToolbarAction style={{
|
||||
width: 180,
|
||||
textAlign: 'left',
|
||||
|
|
Loading…
Reference in a new issue