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

round scaled numbers because half pixels don't exist #94

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

chrisvltn
Copy link

@chrisvltn chrisvltn commented Nov 26, 2024

Please make sure you do the following before filing your PR:

  • Provide a video or screenshots of any visual changes made
  • Run pnpm run check and make sure everything passes

Added Math.ceil to the displayed scaled resolution, as the user can input a custom scale factor which might generate a non-integer resolution.

Math.ceil instead of Math.round because after a few tests the browser was always rounding it down, independent of the fraction. Maybe it varies from browser to browser, but still more precise than not showing an integer.

Before:

image

After:

image

Copy link

vercel bot commented Nov 26, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
quickpic ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 26, 2024 2:44pm

@chrisvltn chrisvltn changed the title round scaled numbers because there is no half pixel round scaled numbers because half pixels don't exist Nov 26, 2024
@ghost
Copy link

ghost commented Nov 26, 2024

a slider bar would be better with a number at the bottom that you can change there too

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