Skip to content

Commit

Permalink
Merge pull request #1054 from orangemug/fix/background-color-default
Browse files Browse the repository at this point in the history
Allow `background-color` to use default from spec
  • Loading branch information
ahocevar committed Dec 12, 2023
2 parents 9dc34ad + 53e0ac9 commit 7f05482
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions src/apply.js
Original file line number Diff line number Diff line change
Expand Up @@ -558,17 +558,15 @@ function getBackgroundColor(glLayer, resolution, options, functionCache) {
resolution,
options.resolutions || defaultResolutions
);
let bg, opacity;
if (paint['background-color'] !== undefined) {
bg = getValue(
background,
'paint',
'background-color',
zoom,
emptyObj,
functionCache
);
}
let opacity;
const bg = getValue(
background,
'paint',
'background-color',
zoom,
emptyObj,
functionCache
);
if (paint['background-opacity'] !== undefined) {
opacity = getValue(
background,
Expand Down

0 comments on commit 7f05482

Please sign in to comment.