mirror of
https://github.com/maputnik/editor.git
synced 2026-01-06 21:40:01 +00:00
Updated babel/webpack
This commit is contained in:
@@ -1,16 +1,16 @@
|
||||
import * as styleSpec from '@mapbox/mapbox-gl-style-spec/style-spec'
|
||||
import {latest} from '@mapbox/mapbox-gl-style-spec'
|
||||
|
||||
export function changeType(layer, newType) {
|
||||
const changedPaintProps = { ...layer.paint }
|
||||
Object.keys(changedPaintProps).forEach(propertyName => {
|
||||
if(!(propertyName in styleSpec.latest['paint_' + newType])) {
|
||||
if(!(propertyName in latest['paint_' + newType])) {
|
||||
delete changedPaintProps[propertyName]
|
||||
}
|
||||
})
|
||||
|
||||
const changedLayoutProps = { ...layer.layout }
|
||||
Object.keys(changedLayoutProps).forEach(propertyName => {
|
||||
if(!(propertyName in styleSpec.latest['layout_' + newType])) {
|
||||
if(!(propertyName in latest['layout_' + newType])) {
|
||||
delete changedLayoutProps[propertyName]
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user