-
Notifications
You must be signed in to change notification settings - Fork 28
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
Hint positioning both vertically and horizontally #26
Comments
Hi, that's a good idea, actually. I need to check how it's usually implemented. We can have a discussion here about the implementation details. I would prefer |
For a more dynamic approach maybe a In a pseudo code fashion I mean: const positions = "top-left".split('-');
if (positions.includes('top')) {
top = 0;
}
if (positions.includes('left')) {
left = -hintWidth;
} |
@matias-pool after a second thought, it doesn't seem to be a simple decision. I don't think there is a universal solution to align tooltips vertically + horizontally. For example, let's take "bottom-left", there are 3 possible implementations:
I don't think there could be a solution that fits everyone's needs and I don't want to include something which won't be useful for majority of users. Do you have thoughts on this? |
Closing this issue for now as there is no obvious solution which fits all cases. |
It would be great if it was possible to position the hint both vertically and horizontally, like
position="topLeft"
orhorizontalPosition="left" verticalPosition="top"
or similar.react-hint/src/index.js
Line 146 in 1cb28df
We extended the switch statement in
getHintData
to handle our particular use case, but this approach may not be practical as a general solution.What would be your suggestion?
The text was updated successfully, but these errors were encountered: