svg.js icon indicating copy to clipboard operation
svg.js copied to clipboard

how to destory an animation?

Open webstermobile opened this issue 2 years ago • 5 comments

I made a scale animation test , you can visit https://codepen.io/echolove38/pen/oNEPKVE when I click 'start' button, the rect scale from 20% to 80%, when I click 'restore' button, restore the rect scale to 1, but when I click 'start' again , the rect become smaller than before, ..... ... loop the operates, the rect become more and more small.

so, why the animation still depends on last's result. how to destory the last animation and start a new scale animation.

webstermobile avatar Jun 08 '22 10:06 webstermobile

is there anyone could help

webstermobile avatar Jun 13 '22 01:06 webstermobile

is there anyone could help

Hello, have you solved this problem? I also had the same problem,This is causing me a lot of pain

xiaoxiaohuayu avatar Jul 21 '23 08:07 xiaoxiaohuayu

@xiaoxiaohuayu have not

echolove38 avatar Jul 21 '23 08:07 echolove38

I have a similar question. I have an animation that uses loop() and runs forever. I don't know what the proper way is to stop and destroy the animation? I found a few functions like timeline().stop() or runner.unschedule(), but I have no idea if that is the right way to stop/cancel an animation...

oliverschenk avatar Sep 18 '23 08:09 oliverschenk

I have a similar issue - i scale 200%, works fine, but if I mouseout, it doesn't scale down back to 100% (1). In fact, mouseout doesn't seem to work at all..

kirkbushell avatar Sep 19 '23 11:09 kirkbushell