mirror of
https://github.com/maputnik/editor.git
synced 2025-12-06 06:10:00 +00:00
Delay modal rendering until open
This commit is contained in:
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user