You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I need to skip animations for a tooltip, so i'm trying to find a nice way to do it. This issue kind of gives an answer, but i have a follow up question
I've tried out @andrew-boyd solution with returning empty keyframes, but this removes animation for all the actions too. I ended up taking default keyframes from the source code, then it worked:
autoAnimate(parent, (el, action, oldCoords, newCoords) => {
// Do not animate tooltip
if (el.hasAttribute('data-tippy-root')) {
return new KeyframeEffect(el, [])
}
let keyframes
// Use default animation settings from @formkit/auto-animate source code
if (action === 'add') {
keyframes = [
...
]
}
if (action === 'remove') {
keyframes = [
...
]
}
if (action === 'remain') {
...
keyframes = [start, end]
}
return new KeyframeEffect(el, keyframes, { duration: 250, easing: 'ease-in-out' })
})
}
it seems like it could be done in an easier way. Maybe someone could help? Is there a way to "continue" with the defaults instead of overriding them?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Thanks for the awesome animation package!
I need to skip animations for a tooltip, so i'm trying to find a nice way to do it. This issue kind of gives an answer, but i have a follow up question
I've tried out @andrew-boyd solution with returning empty keyframes, but this removes animation for all the actions too. I ended up taking default keyframes from the source code, then it worked:
it seems like it could be done in an easier way. Maybe someone could help? Is there a way to "continue" with the defaults instead of overriding them?
Beta Was this translation helpful? Give feedback.
All reactions