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

Snap view center to pixel #7524

Merged
merged 4 commits into from Nov 30, 2017
Merged

Snap view center to pixel #7524

merged 4 commits into from Nov 30, 2017

Conversation

ahocevar
Copy link
Member

@ahocevar ahocevar commented Nov 29, 2017

This change also revealed two issues with label rendering:

  • 9307c35 improves vertical text placement in Firefox. It seems that Firefox measures font heights differently. By using a 'middle' textBaseline on the canvas, we get much closer to the placement in other browsers.
  • b468f1c adds the pixel ratio to the cache key. Otherwise, labels rendered with different pixel ratio get mixed up
  • 74bf846 fixes the tests to do geometry transforms on clones instead of the original. Otherwise, the result is different depending on which tests have run already.

Fixes #7500.

@ahocevar ahocevar force-pushed the view-pixel branch 3 times, most recently from d43f856 to b468f1c Compare November 30, 2017 00:06
Copy link
Member

@bartvde bartvde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

@ahocevar
Copy link
Member Author

Thanks for the review.

@ahocevar ahocevar merged commit 73f64a9 into openlayers:master Nov 30, 2017
@ahocevar ahocevar deleted the view-pixel branch November 30, 2017 14:13
mdastous-bentley pushed a commit to BentleySystems/openlayers that referenced this pull request May 27, 2020
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.

Jittery text and icons when panning around
2 participants