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 outside of screen #225

Open
LinqLover opened this issue Aug 24, 2023 · 1 comment
Open

Tooltip outside of screen #225

LinqLover opened this issue Aug 24, 2023 · 1 comment

Comments

@LinqLover
Copy link

Describe the bug
When hovering a node of the flamegraph in the bottom right corner of my screen, the tooltip will be outside of the screen so the user cannot view it and the document's size will grow and scrollbars will be added to the window.

Reproduced on Desktop, but should occur on mobile as well (Chrome).

Expected behavior
Position the tooltip above the node instead of below it when hovering. Clamp the x coordinate to keep it inside the screen.

Additional context
The relevant logic seems to be here:

.style('left', event.pageX + 5 + 'px')
.style('top', event.pageY + 5 + 'px')

A solution as proposed here could be implemented:

https://stackoverflow.com/a/28540519/13994294

Are you accepting PRs?

@LinqLover
Copy link
Author

Possibly related to #109

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