Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Force full placement on every frame when fadeDuration === 0 #7610

Merged
merged 1 commit into from
Nov 21, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/style/style.js
Original file line number Diff line number Diff line change
Expand Up @@ -1101,7 +1101,9 @@ class Style extends Evented {
// to start over. When we start over, we do a full placement instead of incremental
// to prevent starvation.
// We need to restart placement to keep layer indices in sync.
const forceFullPlacement = this._layerOrderChanged;
// Also force full placement when fadeDuration === 0 to ensure that newly loaded
// tiles will fully display symbols in their first frame
const forceFullPlacement = this._layerOrderChanged || fadeDuration === 0;

if (forceFullPlacement || !this.pauseablePlacement || (this.pauseablePlacement.isDone() && !this.placement.stillRecent(browser.now()))) {
this.pauseablePlacement = new PauseablePlacement(transform, this._order, forceFullPlacement, showCollisionBoxes, fadeDuration, crossSourceCollisions);
Expand Down