Closed dajoha closed 3 years ago
There seems to be an operator precedence issue here:
https://github.com/w8r/geojson2svg/blob/f079c10ad3facf9f65aa6bacbd36e125433dafd5/src/renderer.js#L875-L876
Because of precedence, this code is interpreted like this:
currentStyle['fill-rule'] = (styles.fillRule || (feature.geometry.type === 'MultiPolygon')) ? 'nonzero' : 'evenodd';
Because of this, it's not possible to set fill-rule to evenodd for MultiPolygons. In order to fix it, parentheses should be moved like this:
fill-rule
evenodd
currentStyle['fill-rule'] = styles.fillRule || (feature.geometry.type === 'MultiPolygon' ? 'nonzero' : 'evenodd');
There seems to be an operator precedence issue here:
https://github.com/w8r/geojson2svg/blob/f079c10ad3facf9f65aa6bacbd36e125433dafd5/src/renderer.js#L875-L876
Because of precedence, this code is interpreted like this:
Because of this, it's not possible to set
fill-rule
toevenodd
for MultiPolygons. In order to fix it, parentheses should be moved like this: