-
-
Notifications
You must be signed in to change notification settings - Fork 246
-
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:
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?
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment