kutlugsahin / smooth-dnd

drag and drop library for javascript
MIT License
611 stars 148 forks source link

Provide a function to set options #13

Open nevf opened 6 years ago

nevf commented 6 years ago

In a responsive Web app you may want to change the SmoothDND options on the fly to suite landscape vs portrait etc. Could you please add a function to do this - thanks.

kutlugsahin commented 6 years ago

hey @nevf You can dispose and recreate it with the new set of options.

nevf commented 6 years ago

@kutlugsahin true, however if there are hundreds of elements (which in my app there is) then unwrapping and rewrapping etc. is quite a waste of time and resources, when all that is needed is to change the options.

All the more so on low powered devices like smartphones where responsive changes are more prevalent.

kutlugsahin commented 6 years ago

@nevf. This is true indeed in terms of performance. Lets put this in todo list. Cheers!

nevf commented 6 years ago

@kutlugsahin +1 Thanks.

xe4me commented 5 years ago

@nevf did you find an easy way to do this ?

nevf commented 5 years ago

@xe4me No I didn't. From memory this is an issue which can only be addressed by SmoothDnD which unfortunately seems to be abandoned. I've since written my own drag and drop module which I plan to use in future.