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

fix: round compass margins and attribution position to nearest integers [android] #294

Merged
merged 5 commits into from
Jul 4, 2024

Conversation

caspg
Copy link
Contributor

@caspg caspg commented Mar 17, 2024

Description

Fixes compass margins and attribution positions.

At the moment, we are casting density (float) to integer which is loosing decimal part. In same cases it leads to big differences. For example, Xiomi Redmi 12 has density 2.75.

Instead we should round to the nearest integer.

Checklist

  • I have tested this on a device/simulator for each compatible OS
  • I formatted JS and TS files with running yarn lint:fix in the root folder
  • I have run tests via yarn test in the root folder
  • I updated the documentation with running yarn generate in the root folder
  • I mentioned this change in CHANGELOG.md
  • I updated the typings files (index.d.ts)
  • I added/updated a sample (/example)

Screenshot OR Video

Screenshot_2024-03-17-21-45-29-137_com caspg velomapa

@caspg caspg changed the title [fix] [android] round density factor to nearest integer when setting compass margin [fix] [android] round compass margins and attribution position to nearest integers Mar 17, 2024
@caspg caspg changed the title [fix] [android] round compass margins and attribution position to nearest integers fix: round compass margins and attribution position to nearest integers [android] Mar 17, 2024
@tyrauber
Copy link
Collaborator

Hey @caspg, can you resolve these conflicts and I'll merge it in? Sorry for the delay.

@caspg
Copy link
Contributor Author

caspg commented May 14, 2024

@tyrauber done

@tyrauber tyrauber merged commit c89c842 into maplibre:main Jul 4, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants