asvd/dragscroll

Dynamically removing dragscroll from an element

zackwhedbee opened this issue · 5 comments

Great library, thanks. I'm trying to dynamically enable/disable dragscroll for an element. Enabling it works fine - I add the 'dragscroll' class and then call dragscroll.reset(). However, removing the class and again calling dragscroll.reset() does not remove the event listeners - the element is still draggable. Any suggestions on how to do this?

xcy7e commented

Having the same issue.

I added a simple condition to check if my own variable "draggable" is true. If not, dragscroll don't scroll anything. (https://github.com/inovek/dragscroll/blob/885180334b276094d81b761446fc679945d61057/dragscroll.js)

Any solution for this problem?

asvd commented

Reproduced, will prepare a solution shortly

asvd commented

Released in v0.0.6