mirror of
https://github.com/maputnik/editor.git
synced 2025-12-25 15:40:00 +00:00
Load OL3 code only once we need it
This commit is contained in:
@@ -23,8 +23,14 @@ class SettingsModal extends React.Component {
|
||||
this.props.onStyleChanged(changedStyle)
|
||||
}
|
||||
|
||||
onRendererChange(e) {
|
||||
const changedStyle = this.props.mapStyle.setIn(['metadata', 'maputnik:renderer'], e.target.value)
|
||||
onRendererChange(renderer) {
|
||||
const changedStyle = {
|
||||
...this.props.mapStyle,
|
||||
metadata: {
|
||||
...this.props.mapStyle.metadata,
|
||||
'maputnik:renderer': renderer,
|
||||
}
|
||||
}
|
||||
this.props.onStyleChanged(changedStyle)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user