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

Update mousePosition check #426

Merged
merged 1 commit into from
May 15, 2024

Conversation

KaiVolland
Copy link
Contributor

This updates the mousePostion check for the transform-origin calculation.

In some rare cases, e.g. in a TestEnvironment (react-testing-library with Jest) the mousePosition can look like this:

{
  x: undefined,
  y : undefined
}

which leads to transform-origin: NaNpx NaNpx; in the element itself.

This check fixes this issue.

Copy link

vercel bot commented May 15, 2024

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

Name Status Preview Comments Updated (UTC)
dialog ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 15, 2024 9:55am

@yoyo837 yoyo837 merged commit d08ea9e into react-component:master May 15, 2024
7 checks passed
@KaiVolland KaiVolland deleted the fix-mouseposition-check branch May 15, 2024 10:57
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.

None yet

2 participants