mirror of
https://github.com/maputnik/editor.git
synced 2026-08-26 15:07:41 +00:00
Support resetting styles
This commit is contained in:
@@ -34,6 +34,11 @@ export default class App extends React.Component {
|
||||
}
|
||||
}
|
||||
|
||||
onReset() {
|
||||
this.styleStore.purge()
|
||||
loadDefaultStyle(mapStyle => this.onStyleUpload(mapStyle))
|
||||
}
|
||||
|
||||
getChildContext() {
|
||||
return {
|
||||
rebass: theme,
|
||||
@@ -98,6 +103,7 @@ export default class App extends React.Component {
|
||||
/>
|
||||
<WorkspaceDrawer
|
||||
onStyleChanged={this.onStyleChanged.bind(this)}
|
||||
onReset={this.onReset.bind(this)}
|
||||
workContext={this.state.workContext}
|
||||
mapStyle={this.state.currentStyle}
|
||||
accessToken={this.state.accessToken}
|
||||
|
||||
Reference in New Issue
Block a user