Updated babel/webpack

This commit is contained in:
orangemug
2018-10-06 21:05:33 +01:00
parent c8d23a534e
commit 802a7eb1be
20 changed files with 117 additions and 117 deletions

View File

@@ -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]
}
})