jlfwong / speedscope

🔬 A fast, interactive web-based viewer for performance profiles.
https://www.speedscope.app
MIT License
5.58k stars 247 forks source link

Improve HoverTip placement logic #395

Closed jlfwong closed 2 years ago

jlfwong commented 2 years ago

This changes the HoverTip placement logic to use measurements from the actual DOM node rather than basing everything on the maximum sizes.

This avoids some counter-intuitive behaviour, most importantly situations where the label would overflow off the left side of the screen for no obvious reason.

Before After
image image

Fixes #394 Fixes #256

coveralls commented 2 years ago

Coverage Status

Coverage decreased (-0.06%) to 41.597% when pulling 779dbc42720c4b0f05f7b0c881fd33fc160718bf on jlfwong/improved-hovertip-placement into 48d692c2a330fcb1b183684836f2d73eb1e93bae on main.