Open ianthedev opened 9 years ago
Hey, currently there is no disable option. I might add this in the future.
Bumping this, this functionality would be amazing to have.
I agree. Destroy is far too committing for situations where one needs to instantiate and destroy in a cyclical way.
Well I have the same issue, please make multiple intiation possible, or tell us what to do?
You can try this :
disable: function() { var a = this.container; n(a, q, this._onStart); },
By the way @Stereobit your non minified file (dragend.js) doesn't match your minified file (dragend.min.js), but it's a great and very useful piece of code :)
Thanks @badoubadou. I will try it if I need it in the future.
Bumping this. I'm using a toggle for scroll or swipe action (both web and mobile). It works once if you toggle from scroll to swipe which initiates dragend and then back to scroll if you destroy dragend which is needed as the swipe and scroll work on the same elements.
But then if you toggle back to swipe dragend no longer works so disable would be a great option in this case.
Also, as an aside, the destroy method in the docs did not work for me, I used destroy: true
as an option and that works.
Instead of destroying it, can we just disable it and resume it later?