mirror of
https://github.com/maputnik/editor.git
synced 2025-12-25 15:40:00 +00:00
Merge pull request #134 from tschaub/close-open-dialog
Close the "open" dialog after choosing a new style
This commit is contained in:
@@ -68,6 +68,7 @@ class OpenModal extends React.Component {
|
||||
const mapStyle = style.ensureStyleValidity(JSON.parse(body))
|
||||
console.log('Loaded style ', mapStyle.id)
|
||||
this.props.onStyleOpen(mapStyle)
|
||||
this.onOpenToggle()
|
||||
} else {
|
||||
console.warn('Could not open the style URL', styleUrl)
|
||||
}
|
||||
@@ -94,6 +95,7 @@ class OpenModal extends React.Component {
|
||||
}
|
||||
mapStyle = style.ensureStyleValidity(mapStyle)
|
||||
this.props.onStyleOpen(mapStyle);
|
||||
this.onOpenToggle();
|
||||
}
|
||||
reader.onerror = e => console.log(e.target);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user