Hide source layer for raster source

This commit is contained in:
Lukas Martinelli 2017-01-08 19:47:43 +01:00
parent 7c9dcb3083
commit 118f0360d0

View file

@ -32,8 +32,10 @@ class AddModal extends React.Component {
if(this.state.type !== 'background') { if(this.state.type !== 'background') {
layer.source = this.state.source layer.source = this.state.source
if(this.state.type !== 'raster') {
layer['source-layer'] = this.state['source-layer'] layer['source-layer'] = this.state['source-layer']
} }
}
changedLayers.push(layer) changedLayers.push(layer)
@ -91,7 +93,7 @@ class AddModal extends React.Component {
onChange={v => this.setState({ source: v })} onChange={v => this.setState({ source: v })}
/> />
} }
{this.state.type !== 'background' && {this.state.type !== 'background' && this.state.type !== 'raster' &&
<LayerSourceLayerBlock <LayerSourceLayerBlock
sourceLayerIds={this.props.sources[this.state.source] || []} sourceLayerIds={this.props.sources[this.state.source] || []}
value={this.state['source-layer']} value={this.state['source-layer']}