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

[@mantine/core] FloatingIndicator: fix translate calculations #7267

Conversation

lamualfa
Copy link
Contributor

Descriptions

The borderTopWidth & borderLeftWidth from parent & target should added to translate calculation because getBoundingClientRect included that on calculation.

Before

image

After

Screenshot from 2024-12-16 16-24-48

It's a little bit difficult to see the difference unless you use wider border width.

Notes

  • I reuse toInt helper from ScrollArea utils to convert computed style to int. That helper should be on more generic folder/file other than ScrollArea. I'm not sure where to put it. This refactor must be in different commit.

@rtivital rtivital merged commit d2e42d8 into mantinedev:master Dec 23, 2024
1 check passed
@rtivital
Copy link
Member

Thanks!

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