On Jan 24, 7:42 am, Tom Gregory <[EMAIL PROTECTED]> wrote:
> The delay while dragging (which you didn't complain about, but will  
> in the future, I'm sure) is caused because the position of all of the  
> elements are checked on each mousemove.  I've been thinking about  
> ways of caching position to speed up processing (a la JQuery?), but  
> haven't put the pen to paper, so to speak.

I don't think that's the right answer. If the pointer must overlap
the drag visual, the "donut drag" is the right approach. This creates
four clones of the drag visual and crops each one to leave a hole
of 3x3 (or so) pixels in the middle, around the pointer hot spot.
That way the browser does the hit testing for you (lightening fast)
and the drag target is in the event object. This of course means
that the actual draggable isn't the drag visual; you need four of
those.

The scriptaculous D&D module is pretty simple but a bit too primitive
really, and there is a number of small errors and oversights in the
code, things that look like they should work but don't. I started
making fixes, but I'm certain that proper fixes will create some
incompatibilities... how attached are people to backward compatibility
issues?

Clifford Heath.


--~--~---------~--~----~------------~-------~--~----~
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?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to