eugenii / jqueryrotate

Automatically exported from code.google.com/p/jqueryrotate
1 stars 0 forks source link

Linear easing function breaks plugin #92

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
If I use the "easing" function for linear (no easing), the animation always 
starts from 0 degrees, instead of from the "angle" property or the current 
angle of the image. this doesn't happen if i use an easing equation. this is my 
code:

            $("#speedometer img").rotate({
                duration: 500,
                animateTo: 354,
                easing: function(x, t, b, c, d) { return (t/d)*c ; }
            });

What is the expected output? What do you see instead?
I expect this to animate from the current angle to the "animateTo" angle - this 
works fine with easing, but not when using the linear function.

What version of the product are you using? On what operating system?
jquery.rotate V2.2 and jQuery 1.9

Please provide any additional information below.
Can you suggest a fix for this so i can get a linear rotation from a value 
other than zero? Currently, the linear function you provide seems to set the 
image to zero degrees, then animate from that point...

Original issue reported on code.google.com by kyledunc...@googlemail.com on 30 Jan 2013 at 11:26

GoogleCodeExporter commented 9 years ago
You're absolutly right - the function described in documentation is wrong (does 
not use start value), however on example page where i also use linear easing 
the code is correct. You can also see how it works here.

http://jsfiddle.net/CQyNp/

I'm updating documentation, thanks for finding!

Original comment by wil...@gmail.com on 31 Jan 2013 at 9:18

GoogleCodeExporter commented 9 years ago
Thanks so much! Happy to have helped :)

Original comment by kyledunc...@googlemail.com on 31 Jan 2013 at 10:26

GoogleCodeExporter commented 9 years ago

Original comment by wil...@gmail.com on 30 Jun 2013 at 8:14