Example zimjs.com/heart to 016 : problem line: animating does not stop

I added https://zimjs.com/heart to 016

only added some extras

  • line to animate along the curve..
    but when clicking stop, it should stop the line and restart..
    anybody idea to fix this?
    thanks

I can't tell... and YOU probably can't tell either... because you do not have correct indenting. It is probably a scope issue, where animatedLine is declared inside a function and you are trying to access it outside the function. But... like I said, hard to read without proper indenting.