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

Add padding to getLabelRotationOffset() #3276

Merged
merged 1 commit into from
Oct 9, 2024
Merged

Add padding to getLabelRotationOffset() #3276

merged 1 commit into from
Oct 9, 2024

Conversation

mikekucera
Copy link
Contributor

@mikekucera mikekucera commented Sep 24, 2024

Associated issues:

Notes re. the content of the pull request. Give context to reviewers or serve as a general record of the changes made. Add a screenshot or video to demonstrate your new feature, if possible.

  • Now when the label rotation offset is calculated it includes the margin/outline/border/padding that is part of the label bounds.
  • I don't know if this is the best way to fix the bug. I didn't want to change anything about how the bounding boxes are calculated or saved because I'm concerned I might break something. So instead it saves the "padding" along with the bounding box and uses it when calculating the rotation offset.

Checklist

Author:

  • The proper base branch has been selected. New features go on unstable. Bug-fix patches can go on either unstable or master.
  • Automated tests have been included in this pull request, if possible, for the new feature(s) or bug fix. Check this box if tests are not pragmatically possible (e.g. rendering features could include screenshots or videos instead of automated tests).
  • The associated GitHub issues are included (above).
  • Notes have been included (above).

Reviewers:

  • All automated checks are passing (green check next to latest commit).
  • At least one reviewer has signed off on the pull request.
  • For bug fixes: Just after this pull request is merged, it should be applied to both the master branch and the unstable branch. Normally, this just requires cherry-picking the corresponding merge commit from master to unstable -- or vice versa.

@mikekucera
Copy link
Contributor Author

test_label_position.html.zip

This is the test file I was using. It goes in the root of the project.

@mikekucera mikekucera merged commit a3b0fdf into unstable Oct 9, 2024
2 checks passed
@mikekucera mikekucera deleted the fix/3271 branch October 9, 2024 16:03
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.

1 participant