asvd / dragscroll

micro library for drag-n-drop scrolling style
http://asvd.github.io/dragscroll/
MIT License
1.1k stars 166 forks source link

Dynamically removing dragscroll from an element #4

Closed zackwhedbee closed 8 years ago

zackwhedbee commented 9 years ago

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 9 years ago

Having the same issue.

nemeth-it commented 9 years ago

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)

pyramidsbuilder commented 8 years ago

Any solution for this problem?

asvd commented 8 years ago

Reproduced, will prepare a solution shortly

asvd commented 8 years ago

Released in v0.0.6