About the coupling: That shouldn't be a problem as the javascripts are shipped with the application, so I am in control of what libraries the user uses, and I will thoroughly test new js libraries before using them in the application.
About the performance: I don't think it will be minor; creating a sortable with 80 items already makes the browser hang for a while so anything that prevents that from happening more than once is welcome (especially since my lists may have hundreds of items). Regards, Andrei Christophe Porteneuve wrote: > Hey Andrei, > > Andrei a écrit : > > Is there a way to make a sortable aware of new items, without > > destroying and recreating the sortable ? > > Not that I know of, and the source code, er... concurs :-) > > Actually, manually going into the details of registering stuff with > sortable would: > > - create a coupling to undocumented, mostly internal, workings. This > could very well mean code break down the road, as spinoffs code is a bit > volatile > > - end up with such a minor improvement in performance, if any, that it > would prove pretty useless. > > BESIDES, you DO need to unregister all internal droppables when you're > about to replace the list. It's a mandatory requirement when using > draggables/droppables: if you remove such elements from the DOM, > unregister them first. Sortable.destroy takes proper care of that for you. > > -- > Christophe Porteneuve a.k.a. TDD > "[They] did not know it was impossible, so they did it." --Mark Twain > Email: [EMAIL PROTECTED] --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs -~----------~----~----~----~------~----~------~--~---
