Skip to content

Commit

Permalink
fix: color needs to be set to strokeColor for lines to show (#550)
Browse files Browse the repository at this point in the history
* fix: color needs to be set to strokColor for lines to show (backup is color property, which is used in TEI relationships)
  • Loading branch information
jenniferarnesen authored Oct 23, 2023
1 parent 98dc05c commit e4ec3d5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/layers/GeoJson.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ class GeoJson extends Layer {
opacityFactor,
})
this.addLayer(outlineLayer({ id, color: strokeColor, width }))
this.addLayer(lineLayer({ id, color, width }), { isInteractive })
this.addLayer(lineLayer({ id, color: strokeColor || color, width }), {
isInteractive,
})
this.addLayer(pointLayer({ id, color, strokeColor, width, radius }), {
isInteractive,
})
Expand Down
2 changes: 1 addition & 1 deletion src/utils/layers.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export const lineLayer = ({ id, color, width, opacity, source, filter }) => ({
type: 'line',
source: source || id,
paint: {
'line-color': color,
'line-color': color || defaults.strokeColor,
'line-width': widthExpr(width),
'line-opacity': opacity ?? defaults.opacity,
},
Expand Down

0 comments on commit e4ec3d5

Please sign in to comment.