Update map style even if inspectModeEnabled=true

This commit is contained in:
orangemug 2019-10-27 20:04:57 +00:00
parent be6aa559fb
commit ef81534a17

View file

@ -87,11 +87,9 @@ export default class MapboxGlMap extends React.Component {
const metadata = props.mapStyle.metadata || {}
MapboxGl.accessToken = metadata['maputnik:mapbox_access_token'] || tokens.mapbox
if(!props.inspectModeEnabled) {
//Mapbox GL now does diffing natively so we don't need to calculate
//the necessary operations ourselves!
this.state.map.setStyle(props.mapStyle, { diff: true})
}
//Mapbox GL now does diffing natively so we don't need to calculate
//the necessary operations ourselves!
this.state.map.setStyle(props.mapStyle, {diff: true})
}
componentDidUpdate(prevProps) {