1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-07-26 04:28:31 +00:00
* Changed: Metadata now uses the global FFZ tool-tip handler when rendering tool-tips.
* Fixed: Metadata pop-ups not appearing when an element is open fullscreen.
* API Added: Callback for changing popper options before opening a tool-tip.
* API Added: Timing for module loading. WIP.
This commit is contained in:
SirStendec 2020-07-23 02:33:20 -04:00
parent 1c2bf202fc
commit 3d88836a0e
9 changed files with 172 additions and 17 deletions

View file

@ -291,7 +291,7 @@ export class Tooltip {
const use_html = maybe_call(opts.html, null, target, tip),
setter = use_html ? 'innerHTML' : 'textContent';
const pop_opts = Object.assign({
let pop_opts = Object.assign({
modifiers: {
flip: {
behavior: ['top', 'bottom', 'left', 'right']
@ -300,6 +300,9 @@ export class Tooltip {
arrowElement: arrow
}, opts.popper);
if ( opts.popperConfig )
pop_opts = opts.popperConfig(target, tip, pop_opts) ?? pop_opts;
pop_opts.onUpdate = tip._on_update = debounce(() => {
if ( ! opts.no_auto_remove && ! document.contains(tip.target) )
this.hide(tip);