Direction of animateTo

29 views
Skip to first unread message

Quammy

unread,
Apr 10, 2013, 7:33:02 PM4/10/13
to jquery...@googlegroups.com
Hi,

Great plugin!!!!

What about an ability to control the direction of the animation? Now it always animate from low degree to high clockwise and from high to low counter-clockwise. I would like to control that...

thanks.

Paweł Witkowski

unread,
Apr 11, 2013, 2:53:20 AM4/11/13
to jquery...@googlegroups.com

Hello,

I'm not sure what are you talk about. Why would you like to animate counterclockwise from low degree to high one ? You can control it manually in current solution, for example:

Angle from : 50
Angle to : 10

Animation clockwise - just add 360 to second angle, or subtract 360 from first one

Another example:

Angle from 10
Angle to 50

Animation counterclockwise - just 360 to first angle, or subtract 360 from second one

I hope you get the idea. Setting "angle" parameter is never animated - it will directly set required angle. This way you can control what direction its animating.

Cheers,

--
Otrzymujesz tę wiadomość, ponieważ subskrybujesz grupę dyskusyjną Google o nazwie „jQueryRotate”.
 
Aby anulować subskrypcję tej grupy i przestać otrzymywać z niej wiadomości, wyślij e-maila do jqueryrotate...@googlegroups.com.
Więcej opcji znajdziesz na https://groups.google.com/groups/opt_out
 
 



--
Pawel Witkowski
Senior JavaScript Developer / QML / Silverlight
webpage: http://wilq32.blogspot.com

Quammy

unread,
Apr 11, 2013, 10:24:33 AM4/11/13
to jquery...@googlegroups.com
Think of a compass. When the current angle is 350 and now the compass is changing position to 10, the arrow, using the command:
$("#arrow").rotate({
                animateTo: 10
            });

will go counterclockwise the complete circle instead of just moving clockwise and arrive to 10 faster (and more logical to the eye). I believe that with adding several conditions, your idea of adding 360  might work but I think it will be much easier if the option will exist.

thanks.
Reply all
Reply to author
Forward
0 new messages