Skip to content

Commit

Permalink
Don't clamp crossfade in the event of fadeout (#4379)
Browse files Browse the repository at this point in the history
* Don't clamp crossfade in the event of fadeout
  • Loading branch information
Lauren Budorick authored Mar 8, 2017
1 parent de769b0 commit 5fa31ef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/render/draw_raster.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ function getFadeValues(tile, parentTile, layer, transform) {
// if no parent or parent is older, fade in; if parent is younger, fade out
const fadeIn = !parentTile || Math.abs(parentTile.coord.z - idealZ) > Math.abs(tile.coord.z - idealZ);

const childOpacity = tile.refreshedUponExpiration ? 1 : util.clamp(fadeIn ? sinceTile : 1 - sinceParent, 0, 1);
const childOpacity = (fadeIn && tile.refreshedUponExpiration) ? 1 : util.clamp(fadeIn ? sinceTile : 1 - sinceParent, 0, 1);

// we don't crossfade tiles that were just refreshed upon expiring:
// once they're old enough to pass the crossfading threshold
Expand Down

0 comments on commit 5fa31ef

Please sign in to comment.