Skip to content

Commit

Permalink
fix translucent background overlays
Browse files Browse the repository at this point in the history
Closes #2925
  • Loading branch information
mourner committed Nov 3, 2016
1 parent 2fc3651 commit b6a1af9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion js/render/draw_background.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ function drawBackground(painter, sourceCache, layer) {
const image = layer.paint['background-pattern'];
const opacity = layer.paint['background-opacity'];

if (painter.isOpaquePass !== (!image && color[3] === 1)) return;
const isOpaque = !image && color[3] === 1 && opacity === 1;
if (painter.isOpaquePass !== isOpaque) return;

// if the background layer is bottommost and not patterned,
// we render it with gl.clearColor earlier
Expand Down

0 comments on commit b6a1af9

Please sign in to comment.