We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I am using velocity in vue.js. As vue.js document said, I combined velocity with vue transition hooks like this:
<transition @before-enter='beforeEnter' @enter='enter' @leave='leave' > <img ref='img' v-if='isFloatingImgShow' class='floating-img' src="../assets/logo.png" > </transition>
in css
.floating-img { position: absolute; right: 50%; bottom: 50%; transform: translate(50%, 50%); }
and in my script, the enter hook call back function
enter(el, done) { Velocity(el, {opacity: 1}, {duration: 1000}); Velocity(el, { right: 0, bottom: 0, transform: ['translate(0, 0)', 'translate(50%, 50%)'] }, { duration: 1000, delay: 3000, } ); },
and now the question is, when the el is transforming to the bottom right of the screen, the frame rate is low, not smooth at all.
but if I use css to controll transform like this:
enter(el, done) { Velocity(el, {opacity: 1}, {duration: 1000, complete: () => {el.classList.add('aa')} }); },
.aa { transition: 1000ms; right: 0; bottom: 0; transform: translate(0%, 0%); }
then every thing works pretty smooth. So is the way I use velocity went wrong that caused this?
The text was updated successfully, but these errors were encountered:
How did you go about this issue?
I'm trying to do a staggered list transition that doesn't animate height and I notice a similar behaviour.
Sorry, something went wrong.
I went with Anime.js.
beforeEnter(el) { el.style.opacity = 0 el.style.transform = "translate(0, 26px)" }, enter(el, done) { const delay = el.dataset.index * 200 setTimeout(function () { anime({ targets: el, opacity: 1, translateY: -26, easing: 'easeInOutQuad', duration: 500, complete: done }) }, delay)
No branches or pull requests
macOS latest
Checklist
overview
I am using velocity in vue.js. As vue.js document said, I combined velocity with vue transition hooks like this:
in css
and in my script, the enter hook call back function
and now the question is, when the el is transforming to the bottom right of the screen, the frame rate is low, not smooth at all.
but if I use css to controll transform like this:
then every thing works pretty smooth.
So is the way I use velocity went wrong that caused this?
The text was updated successfully, but these errors were encountered: