mirror of
https://github.com/a-nyx/maputnik-with-pmtiles.git
synced 2024-12-31 00:20:32 +01:00
Close the "open" dialog after choosing a new style
This commit is contained in:
parent
0555fc48ad
commit
b8205f4c38
1 changed files with 2 additions and 0 deletions
|
@ -68,6 +68,7 @@ class OpenModal extends React.Component {
|
||||||
const mapStyle = style.ensureStyleValidity(JSON.parse(body))
|
const mapStyle = style.ensureStyleValidity(JSON.parse(body))
|
||||||
console.log('Loaded style ', mapStyle.id)
|
console.log('Loaded style ', mapStyle.id)
|
||||||
this.props.onStyleOpen(mapStyle)
|
this.props.onStyleOpen(mapStyle)
|
||||||
|
this.onOpenToggle()
|
||||||
} else {
|
} else {
|
||||||
console.warn('Could not open the style URL', styleUrl)
|
console.warn('Could not open the style URL', styleUrl)
|
||||||
}
|
}
|
||||||
|
@ -94,6 +95,7 @@ class OpenModal extends React.Component {
|
||||||
}
|
}
|
||||||
mapStyle = style.ensureStyleValidity(mapStyle)
|
mapStyle = style.ensureStyleValidity(mapStyle)
|
||||||
this.props.onStyleOpen(mapStyle);
|
this.props.onStyleOpen(mapStyle);
|
||||||
|
this.onOpenToggle();
|
||||||
}
|
}
|
||||||
reader.onerror = e => console.log(e.target);
|
reader.onerror = e => console.log(e.target);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue