manuelstofer/pinchzoom

Add .destroy() method

Closed this issue · 3 comments

Please add a destroy method for unbinding all event listeners and created elements to reset everything.

Actually you don't need destroy, or you can code without it.
You can destroy pinchzoom div in DOM and browser garbage collector must destroy object and free RAM

Thanks for thinking about how this project can be improved! Since this code is open-source, without anyone getting paid to work on it, it's difficult to satisfy all the wishes that people may have. I hope you understand! 🌻

So if you want something, a good first step is to explain in detail what you think should be changed. If others agree that it's a good idea, the next step would be for you to open a PR with the necessary code changes.

If you want to help out improving this project I'm happy to discuss and give feedback on a proposed change.

Fixed in #129