tippyjs
tippyjs copied to clipboard
`.show()` to allow for `x,y` coordinate overrides for alternative placement
Problem
Sometimes I want a tippy tooltip to appear at my target object as if the mouse was at a given location. Tippy doesn't currently seem to support this even though it seems simple to add as optional parameters.
Solution
Add optional x,y
coordinates to the .show()
method such that tippy uses those instead of the mouse coordinates.
The tooltip would then appear based on the various placement rules as usual.
Perhaps a 'relativeTo' parameter could be useful so you can either give "local" coordinates (within the target object's coordinate system where 0,0 is the top-left corner) or "global" (the document coordinate system).