Skip to content

Commit

Permalink
(ISA-495) Respect transparency in esri-leaflet-renderers
Browse files Browse the repository at this point in the history
  • Loading branch information
Joshua Groombridge committed Jan 9, 2024
1 parent a875372 commit 5be6d66
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,13 @@

// color is an array [r,g,b,a]
colorValue: function (color) {
if (color.length === 3) {
return 'rgb(' + color[0] + ',' + color[1] + ',' + color[2] + ')';
} else if (color.length === 4) {
return 'rgba(' + color[0] + ',' + color[1] + ',' + color[2] + ',' + this.alphaValue(color) + ')';
} else {
throw new Error('Invalid color');
}
},

alphaValue: function (color) {
Expand Down

0 comments on commit 5be6d66

Please sign in to comment.