Skip to content

Disallow sub 1 device pixel ratio #132

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

Merged

Conversation

anderoonies
Copy link
Contributor

Summary

There was a bug where a sub-1 devicePixelRatio would cause floating point values for getWidth(), getHeight(), etc.
This makes sure that devicePixelRatio can never be lower than 1 to prevent these issues.

Changes:

  • Groups and main Graphics instance don't allow sub-zero devicePixelRatios
  • Tests

Checklist

  • npm test passes
  • Unit tests are included / updated
  • Documentation has been updated where relevant

@anderoonies anderoonies merged commit af21ac0 into codehs:main Feb 28, 2022
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