midudev / tailwind-animations

Easy peasy animations for your Tailwind project
https://tailwindcss-animations.vercel.app/
MIT License
518 stars 64 forks source link

princesinghrajput-Fixed-Animate all toggle button is receiving to many event listeners #45

Closed princesinghrajput closed 7 months ago

princesinghrajput commented 7 months ago

What does this PR do?

This PR addresses the issue #41 by optimizing event listener management for the "Animate all" toggle button. It ensures that event listeners are added only once and removed when no longer needed, preventing accumulation and improving performance.

Why are we doing this?

Currently, the "Animate all" toggle button accumulates event listeners, leading to performance issues. By optimizing event listener management, we can enhance the user experience and maintain code efficiency.


Test Case(s):

Test Result(s):

All test cases passed successfully, demonstrating that the "Animate all" toggle button now functions correctly with optimized event listener management. Performance improvements were noticeable, particularly when handling a large number of elements.


Checklist

vercel[bot] commented 7 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
tailwind-animations ❌ Failed (Inspect) Feb 11, 2024 8:45am
midudev commented 7 months ago

Thanks for the PR! I think somebody already fixed that in a previous PR!