Skip to content

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
@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.

2 participants