ol-mapbox-style
Advanced tools
Comparing version 6.8.0 to 6.8.1
# Changelog | ||
## 6.8.1 | ||
* Fix color calculation for zero opacity when `renderTransparent(true)` is set. | ||
## 6.8.0 | ||
@@ -4,0 +8,0 @@ |
@@ -148,11 +148,13 @@ /* | ||
opacity = opacity === undefined ? 1 : opacity; | ||
return ('rgba(' + | ||
Math.round((color.r * 255) / a) + | ||
',' + | ||
Math.round((color.g * 255) / a) + | ||
',' + | ||
Math.round((color.b * 255) / a) + | ||
',' + | ||
a * opacity + | ||
')'); | ||
return a === 0 | ||
? 'transparent' | ||
: 'rgba(' + | ||
Math.round((color.r * 255) / a) + | ||
',' + | ||
Math.round((color.g * 255) / a) + | ||
',' + | ||
Math.round((color.b * 255) / a) + | ||
',' + | ||
a * opacity + | ||
')'; | ||
} | ||
@@ -159,0 +161,0 @@ return color; |
{ | ||
"name": "ol-mapbox-style", | ||
"version": "6.8.0", | ||
"version": "6.8.1", | ||
"description": "Create OpenLayers maps from Mapbox Style objects", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -185,13 +185,13 @@ /* | ||
opacity = opacity === undefined ? 1 : opacity; | ||
return ( | ||
'rgba(' + | ||
Math.round((color.r * 255) / a) + | ||
',' + | ||
Math.round((color.g * 255) / a) + | ||
',' + | ||
Math.round((color.b * 255) / a) + | ||
',' + | ||
a * opacity + | ||
')' | ||
); | ||
return a === 0 | ||
? 'transparent' | ||
: 'rgba(' + | ||
Math.round((color.r * 255) / a) + | ||
',' + | ||
Math.round((color.g * 255) / a) + | ||
',' + | ||
Math.round((color.b * 255) / a) + | ||
',' + | ||
a * opacity + | ||
')'; | ||
} | ||
@@ -198,0 +198,0 @@ return color; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
8633780
13418