On 7/23/06, Em Te <[EMAIL PROTECTED]> wrote:
Good day,
I am using Scriptaculous' drag and drop library in my project and I find
that if I have more than 4 Droppables on a page that contains many nested 
elements, the motion of any draggable seem to be bumpy instead of smooth.

There has been a lot of talk about this lately on the Yahoo! UI
mailing list. The Yahoo! solution was to cache the positions at the
start of the drag. This could still cause trouble when scrolling
elements are involved and they automatically scroll during the drag.

No matter what, a scheme that uses coordinates to determine whether or
not the cursor is over a droppable during a drag will always get
slower as the number of droppables grows.

I discovered a novel solution that doesn't get slower regardless of
the number of droppables because it uses native browser events to
determine when a draggable is over a droppable. I have an article
about it and a proof of prinicple demo on my blog

http://peter.michaux.ca/articles/2006/06/16/donut-dragdrop

By using native browser events, you also get the expected behavior for
activating the appropriate droppable when nested and overlapping
droppables exisit. This is something I haven't seen handled well in
any dragdrop implementation i've tried.

Peter
_______________________________________________
Rails-spinoffs mailing list
Rails-spinoffs@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs

Reply via email to