mirror of
https://github.com/maputnik/editor.git
synced 2025-12-07 14:50:02 +00:00
Merge pull request #585 from orangemug/fix/issue-403
Update map style even if inspectModeEnabled=true
This commit is contained in:
@@ -87,11 +87,9 @@ export default class MapboxGlMap extends React.Component {
|
|||||||
const metadata = props.mapStyle.metadata || {}
|
const metadata = props.mapStyle.metadata || {}
|
||||||
MapboxGl.accessToken = metadata['maputnik:mapbox_access_token'] || tokens.mapbox
|
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
|
||||||
//Mapbox GL now does diffing natively so we don't need to calculate
|
//the necessary operations ourselves!
|
||||||
//the necessary operations ourselves!
|
this.state.map.setStyle(props.mapStyle, {diff: true})
|
||||||
this.state.map.setStyle(props.mapStyle, { diff: true})
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
componentDidUpdate(prevProps) {
|
componentDidUpdate(prevProps) {
|
||||||
|
|||||||
Reference in New Issue
Block a user