mirror of
https://github.com/a-nyx/maputnik-with-pmtiles.git
synced 2025-01-30 23:15:28 +01:00
Only apply filter if defined.
This commit is contained in:
parent
b211f1cd12
commit
a0e2d68dae
1 changed files with 4 additions and 3 deletions
|
@ -430,9 +430,10 @@ export default class App extends React.Component {
|
||||||
onLayerSelect={this.onLayerSelect.bind(this)} />
|
onLayerSelect={this.onLayerSelect.bind(this)} />
|
||||||
}
|
}
|
||||||
|
|
||||||
const elementStyle = {
|
const elementStyle = {};
|
||||||
"filter": `url('#${this.state.mapFilter}')`
|
if(this.state.mapFilter) {
|
||||||
};
|
elementStyle.filter = `url('#${this.state.mapFilter}')`;
|
||||||
|
}
|
||||||
|
|
||||||
return <div style={elementStyle}>
|
return <div style={elementStyle}>
|
||||||
{mapElement}
|
{mapElement}
|
||||||
|
|
Loading…
Reference in a new issue