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

easeOutElastic - NaN result #1271

Closed
cimak opened this issue Apr 11, 2014 · 4 comments · Fixed by #2888
Closed

easeOutElastic - NaN result #1271

cimak opened this issue Apr 11, 2014 · 4 comments · Fixed by #2888
Assignees
Labels

Comments

@cimak
Copy link

cimak commented Apr 11, 2014

fabric.util.ease['easeOutElastic'] returns NaN for these arguments: 2, 1, 0, 550
// 0 is the problem

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@kangax
Copy link
Member

kangax commented Apr 11, 2014

Why do you set 3rd argument at 0?

@cimak
Copy link
Author

cimak commented Apr 11, 2014

Its not me, look: http://jsfiddle.net/JvA8v/1/
Only first animation works fine. Next are just "jumping" because of "left" and "top" properties are wrongly calculated as NaN.
I just tracked down, that this 3rd argument is causing the problem.
Sorry I didn't describe it more precisely before.

@kangax kangax added the bug label Apr 14, 2014
@kangax
Copy link
Member

kangax commented May 25, 2014

If you could submit a PR that would be super awesome

@asturur asturur self-assigned this Sep 30, 2014
@asturur
Copy link
Member

asturur commented Apr 13, 2016

i resumed this old issue. I fixed the normalize function where there was a Math.sin(0/0).
The point is that the original fiddle for the issue is not supposed to animate animore after the first animation. After animating to 4,33, the next animation start from that point and is not going to move.
Effectively the bug was there, since after the first animation they were returning NaN.

new http://jsfiddle.net/JvA8v/4/
old http://jsfiddle.net/JvA8v/5/

They are both working if the animation start and end to a different point.

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

Successfully merging a pull request may close this issue.

3 participants