mirror of
https://github.com/a-nyx/maputnik-with-pmtiles.git
synced 2025-02-06 17:25:41 +01:00
Merge pull request #348 from orangemug/fix/color-filter-undefined
Undefined filter fix (color accessibility)
This commit is contained in:
commit
530bfaf3b3
2 changed files with 5 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}
|
||||||
|
|
|
@ -66,6 +66,7 @@ export default class MapboxGlMap extends React.Component {
|
||||||
onDataChange: () => {},
|
onDataChange: () => {},
|
||||||
onLayerSelect: () => {},
|
onLayerSelect: () => {},
|
||||||
mapboxAccessToken: tokens.mapbox,
|
mapboxAccessToken: tokens.mapbox,
|
||||||
|
options: {},
|
||||||
}
|
}
|
||||||
|
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
|
|
Loading…
Reference in a new issue