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(ui): fit bbox to layers math #7297

Merged
merged 1 commit into from
Nov 8, 2024

Conversation

psychedelicious
Copy link
Collaborator

Summary

The math used to fit the bbox to layers was a bit off and could result in a bbox that was slightly too large.

Related Issues / Discussions

Issue that prompted me to review the logic: https://discord.com/channels/1020123559063990373/1020123559831539744/1304232644338384927

QA Instructions

The fit bbox to layers button should always result in the bbox being the same size as the composite of all raster layers, or smaller. The issue affects layers whose size is not already a multiple of the grid size (8px or 16px depending on model).

This image triggers the issue when it is the only layer - could test with it.
image

Checklist

  • The PR has a short but descriptive title, suitable for a changelog
  • Tests added / updated (if applicable)

@github-actions github-actions bot added the frontend PRs that change frontend files label Nov 8, 2024
@psychedelicious psychedelicious force-pushed the psyche/fix/ui/fit-bbox-to-layers-math branch from d532956 to 2ef07c6 Compare November 8, 2024 04:41
@psychedelicious psychedelicious merged commit 2d08078 into main Nov 8, 2024
14 checks passed
@psychedelicious psychedelicious deleted the psyche/fix/ui/fit-bbox-to-layers-math branch November 8, 2024 05:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
frontend PRs that change frontend files
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants