mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-07-26 04:28:31 +00:00
4.20.16
* 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:
parent
1c2bf202fc
commit
3d88836a0e
9 changed files with 172 additions and 17 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue