Remove Immutable JS

This commit is contained in:
Lukas Martinelli
2016-12-20 16:08:49 +01:00
parent ed87425f01
commit 36c4032063
22 changed files with 100 additions and 199 deletions
+3 -12
View File
@@ -1,6 +1,4 @@
import Immutable from 'immutable'
import throttle from 'lodash.throttle'
import entries from 'lodash.topairs'
/** Listens to map events to build up a store of available vector
* layers contained in the tiles */
@@ -47,22 +45,15 @@ export default class LayerWatcher {
this._vectorLayers[vectorLayerId] = knownProperties
})
})
console.log(this.vectorLayers.toJSON())
console.log(this.vectorLayers)
}
/** Access all known sources and their vector tile ids */
get sources() {
return Immutable.Map(Object.keys(this._sources).map(key => {
return [key, Immutable.Set(this._sources[key])]
}))
return this._sources
}
get vectorLayers() {
return Immutable.Map(entries(this._vectorLayers).map(([key, layer]) => {
return [key, Immutable.Map(entries(layer).map(([propId, values]) => {
return [propId, Immutable.Set(Object.keys(values))]
}))]
}))
return this._vectorLayers
}
}