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

use getBoundingClientRect to account for decimals in container size #260

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

bodymovin
Copy link
Contributor

@bodymovin bodymovin commented May 28, 2024

clientWidth and clientHeight return element size without the decimals.
getBoundingClientRect instead returns a more precise size that we can use to make sure the canvas is not slightly smaller than the container

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