smooth-dnd icon indicating copy to clipboard operation
smooth-dnd copied to clipboard

Provide a function to set options

Open nevf opened this issue 6 years ago • 6 comments

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.

nevf avatar Jul 27 '18 07:07 nevf

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

kutlugsahin avatar Jul 27 '18 09:07 kutlugsahin

@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.

nevf avatar Jul 28 '18 01:07 nevf

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

kutlugsahin avatar Jul 28 '18 18:07 kutlugsahin

@kutlugsahin +1 Thanks.

nevf avatar Jul 28 '18 21:07 nevf

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

xe4me avatar Jan 14 '19 04:01 xe4me

@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.

nevf avatar Jan 16 '19 20:01 nevf