jquery.path icon indicating copy to clipboard operation
jquery.path copied to clipboard

Can i stop animation before ending point?

Open ninmorfeo opened this issue 6 years ago • 3 comments

Hi i created animation of unfolding cards along a one bezier curve. Can i stop animation before ending's point?

I would need to position the cards like a folding fan

ninmorfeo avatar May 23 '19 11:05 ninmorfeo

can you just use jquery methods of stopping animation ?

On Thu, May 23, 2019 at 12:21 PM ninmorfeo [email protected] wrote:

Hi i created animation of unfolding cards along a one bezier curve. Can i stop animation before ending's point?

I would need to position the cards like a folding fan

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/weepy/jquery.path/issues/32?email_source=notifications&email_token=AAAAGNCEURYY4TOUWVSUBW3PWZ44FA5CNFSM4HO7LDS2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4GVNZQSQ, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAAGNC4PCRBOSPTFDKBGQLPWZ44FANCNFSM4HO7LDSQ .

weepy avatar May 23 '19 11:05 weepy

Yes i can but I can't understand where to enter the property detection of .square left property. this is the function:

$ (". square"). each (function () { for (var i in Paths [type]) { $ (this) .stop (). animate ({path: Paths [type] [i]}, 1000);

}

ninmorfeo avatar May 23 '19 13:05 ninmorfeo

ok i find it: is right ?

$(".quadrato").each(function () { for (var i in Paths[type]) { $(this).stop().animate({path: Paths[type][i]}, { duration: 5000, step: function (now, fx) { console.log($(this).css('left'));
var pos_corrente=parseInt($(this).css('left'), 10);
if(pos_corrente>500) { $(this).stop(); } } });

ninmorfeo avatar May 23 '19 13:05 ninmorfeo