Skip to content
New issue

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

Jumps when animating from percentage to pixels #897

Open
oddpxl opened this issue May 16, 2024 · 0 comments
Open

Jumps when animating from percentage to pixels #897

oddpxl opened this issue May 16, 2024 · 0 comments

Comments

@oddpxl
Copy link

oddpxl commented May 16, 2024

update
Just realised I can fix this by using calc --> {top: ['50%', 'calc(0% + 100px)']},

Less intuitive perhaps...but works fine !

Describe the bug
Position jumps when animating from top:'50%' <--> top:'100px'

To Reproduce
anime({
targets: '.myobject',
keyframes: [
{top: ['50%', '100px']},
{top: ['100px', '50%']},
],
duration: 4000,
easing: 'easeInOutSine',
loop: true,
});

Expected behavior
Animate between top:50% <--> top:200px

Desktop (please complete the following information):

  • MAC
  • Safari
  • Latest

Additional context
Perhaps this was never intended to work - as I didn't have this problem with GSAP I got used to this being solved - it is very useful to animate from part of a screen to a known location... ..but hey I love AnimeJS regardless so thanks :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant