Make repositioning less glitchy
rijk opened this issue · comments
Rijk van Wel commented
Here's a screen capture of what I mean:
Screen.Recording.2021-01-21.at.10.34.06.mov
There's a 1 frame glitch where the tooltip grows and is then repositioned:
This looks bad. Ideas for improvement:
- Maybe it's possible to do a calculation before render, like Framer Motion?
- Be smarter how to position the layer. In this case, use
bottom
instead oftop
. - Add an option to disable repositioning after initial positioning (related to #55)
Rijk van Wel commented
Be smarter how to position the layer. In this case, use bottom instead of top.
Popper JS does this BTW: https://popper.js.org/docs/v2/modifiers/compute-styles/#adaptive
Add an option to disable repositioning after initial positioning
I also enjoy the way Popper gives you more control over this (with an update()
function you can call when you see fit). But it might not fit your vision for this library.