Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Commit

Permalink
speed up fading when zooming even more
Browse files Browse the repository at this point in the history
And a linear adjustment seems to make more sense.
  • Loading branch information
ansis authored and pozdnyakov committed Aug 20, 2019
1 parent 7d9b54a commit 888d2b0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/mbgl/text/placement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -942,7 +942,7 @@ float Placement::zoomAdjustment(const float zoom) const {
// adjustment is used to reduce the fade duration for symbols while zooming out quickly.
// It is also used to reduce the interval between placement calculations. Reducing the
// interval between placements means collisions are discovered and eliminated sooner.
return std::max(0.0, 1.0 - std::pow(2.0, zoom - placementZoom));
return std::max(0.0, (placementZoom - zoom) / 1.5);
}

bool Placement::hasTransitions(TimePoint now) const {
Expand Down

0 comments on commit 888d2b0

Please sign in to comment.