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

Remove animation properties after animation is completed #65

Open
carlmathisen opened this issue Jan 29, 2015 · 4 comments
Open

Remove animation properties after animation is completed #65

carlmathisen opened this issue Jan 29, 2015 · 4 comments

Comments

@carlmathisen
Copy link

Hi!

Thank you for a great library.

I was wondering, if I first animate a box like this:

move('#square').to(300, 200).end();

And then I want to position the box without an animation, like in this pure JS example:

document.getElementById('square').style.transform = "translate(200px, 200px)";

It will animate with move.js's settings, because

transition-duration: 500ms;

is not removed from element styles when the animation is completed. By design?

I think those styles should be removed when end() is triggered.

Carl

@carlmathisen
Copy link
Author

The question is, how does one know which ones to keep and which ones to discard? By using .to() to position the element, I still want to keep the translate property while removing everything else. There probably are similar "end state" issues with every animation.

@jamesaspence
Copy link

Could you not just remove that style manually from the ones you want?

@jlma7
Copy link

jlma7 commented Nov 16, 2015

I just use jquery to solve the problem.
http://api.jquery.com/animate/

@carlmathisen
Copy link
Author

@jamesaspence Sure, but it should be handled my move.js.

@jlma7 So if I use jQuery.animate, what's the point of using move.js then? :-)

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

3 participants