nanopop icon indicating copy to clipboard operation
nanopop copied to clipboard

suggestion: position relative to mouse pointer

Open yairEO opened this issue 4 years ago • 2 comments

Love this lib, and would like to see a feature for positioning by mouse and not by element

This is for tooltips which I want to show when hovering some elements, but I want the tooltip to follow the mouse as long as it is hovered on the element (which I will manage myself using mouseenter, mouseleave & mousemove events)

Suggested API:

NanoPop.reposition( 'pointer', tipElm )

yairEO avatar Feb 19 '21 11:02 yairEO

I really don't want to extend popper in that way. It should be kept as small as possible, it is meant to be used in a larger component - you should probably write your own tool which is using NanoPop to accomplish the task. That was my vision. If you need a full-fledged solution you should check out popperjs.

simonwep avatar Feb 25 '21 19:02 simonwep

Yes I know Popper since the day it was created and also its predecessor Tether, but I despise bloated scripts with all my heart, this is why I love your script so much - it's very lightweight and high-quality code.

File size means everything to me, it's the thing I check first in a package and for a simple tooltip I don't want the import a mountain.. Thanks for your replay though!

yairEO avatar Feb 26 '21 08:02 yairEO