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

Tooltip: Flipping the Tooltip position to the left while preserving boundary detection #1747

Open
chromodome opened this issue Sep 3, 2023 · 0 comments

Comments

@chromodome
Copy link

chromodome commented Sep 3, 2023

Hello,
I'm trying to position my Tooltip to the left of the cross hair/cursor.
Currently I do this either by:

  • setting a css transform:translateX(calc(-100% - someAdditionalOffset) on a child container of <TooltipWithBounds>
  • or i pass it directly as a prop to left={tooltipLeft - theTooltipWidthCalculatedUsingARef - someAdditionalOffset}

In both cases however the boundary. detection doesn't occur and the tooltip gets clipped.
Is there a known pattern for implementing this?
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

No branches or pull requests

1 participant