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

Reduce flicker by continuing to display for a short while when no longer hovering #548

Open
benatkin opened this issue May 13, 2021 · 6 comments

Comments

@benatkin
Copy link

In the examples I noticed that when moving the mouse over a graph with a lot of small hoverable areas, the tooltip would rapidly come and go. It would be nice to have an option to make it keep displaying for a short while when hovering only a few pixels outside the area, and use that in the demos.

For instance when you go between the bars in the bar chart in the demo the tooltip comes and goes.

An example of similar behavior is when using a menu with submenus.

@domoritz
Copy link
Member

Can you send a pull request?

@benatkin
Copy link
Author

benatkin commented May 13, 2021

I'll try. I was gauging interest as to whether others would think it would be worth the complexity it might add. Thanks.

@domoritz
Copy link
Member

I'll have to see how complex it is to judge whether it's worth the complexity.

@benatkin
Copy link
Author

benatkin commented May 13, 2021

Makes sense. I have a couple approaches I'm thinking of trying. I'll try to minimize the complexity.

@benatkin
Copy link
Author

benatkin commented May 13, 2021

I'm thinking of tracking the anchor of the last shown tooltip, if it isn't already tracked, and keeping the tooltip visible until the mouse moves a configurable distance from the last anchor, and also having a timeout after which it hides.

@domoritz
Copy link
Member

Is there a simpler way with just CSS and transitions?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants