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

Support preferred vertical and horizontal relative position used for the tooltip, if window width/height permits it #735

Open
stenzengel opened this issue Feb 3, 2023 · 0 comments

Comments

@stenzengel
Copy link

It would be great to be able to specify the preferred vertical and/or horizontal relative position used for the tooltip, if the window width/height allows it.

Currently, if the inner width/height of the window allows it, the tooltip is displayed below and to the right of the cursor. Only if no space is available, the tooltip is displayed above and/or to the left of the cursor.

This can be uncomfortable, especially on a smartphone, where your finger often gets in the way.

I propose two news options to be able to specify the preferred vertical and horizontal position with the values above/below and left/right. The default values would remain as before.

defaults.ts:

export const DEFAULT_OPTIONS = {
  preferredHorizontalPosition: "right",
  preferredVerticalPosition: "below",
...
}

If you agree with this (or a similar) proposal, I would be happy to prepare a PR.

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