Skip to content

Commit

Permalink
[drape] Fix infinite zoom in MAPSME-14796
Browse files Browse the repository at this point in the history
git diff eb7c804 eb7c804~ | git apply
  • Loading branch information
tomilov authored and mpimenov committed Oct 21, 2020
1 parent cb3b419 commit afc2916
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drape_frontend/visual_params.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ uint32_t CalculateTileSize(uint32_t screenWidth, uint32_t screenHeight)

int GetDrawTileScale(int baseScale, uint32_t tileSize, double visualScale)
{
return std::clamp(baseScale + GetTileScaleIncrement(tileSize, visualScale), 1, scales::GetUpperStyleScale());
return std::max(1, baseScale + GetTileScaleIncrement(tileSize, visualScale));
}

int GetDrawTileScale(ScreenBase const & s, uint32_t tileSize, double visualScale)
Expand Down

0 comments on commit afc2916

Please sign in to comment.