mirror of
https://github.com/a-nyx/maputnik-with-pmtiles.git
synced 2024-12-28 18:21:17 +01:00
Keep inspect mode consistent across renderer changes
If you were in inspect mode, switched to open layers, and back to MapboxGlMap, the state in MapboxGlMap and MapboxInspect diverged, meaning MapboxGlMap thought it was in inspect mode, while MapboxInspect had inspector mode disabled.
This commit is contained in:
parent
1375240bfa
commit
6cf861d44e
1 changed files with 3 additions and 0 deletions
|
@ -174,6 +174,9 @@ export default class MapboxGlMap extends React.Component {
|
|||
|
||||
map.on("style.load", () => {
|
||||
this.setState({ map, inspect });
|
||||
if(this.props.inspectModeEnabled) {
|
||||
inspect.toggleInspector();
|
||||
}
|
||||
})
|
||||
|
||||
map.on("data", e => {
|
||||
|
|
Loading…
Reference in a new issue