lazy-line-painter
lazy-line-painter copied to clipboard
Refocussing Chrome tab resumes playback
Hi! Great library!
I have an issue - I control an animation with .set()
and then change tab, when I click back on the tab, the animation automatically plays. How can I stop it playing automatically?
I think it' related to this. https://github.com/camoconnell/lazy-line-painter/blob/4908749499a03586cd9e026ad6b4e0b9231ede38/src/index.js#L67
Thanks
+1
I solved this by cloning svg element and calling destory
on complete
callback
_onVisibilityChange
probably should resume only if animation is playing