What oversights have you encountered? I've looked at the doughnut technique, and while effective for limited application, may I suggest two problems:
1. Under certain CSS conditions (I think it involved padding--I don't recall the specifics) IE doesn't map the onenter/onexit events to the right area. (It's been a while since I played with it, and it was testing for a different purpose, so I could be mistaken here.) 2. Creating the doughnut is extremely difficult for an arbitrary div with unknown contents, especially text. (What if the Draggable is a table?) A workaround for problem #2 is offsetting the Draggable from the cursor by 1px on mousedown, but that doesn't have the natural feel of an intuitive draggable. TAG On Jan 24, 2007, at 8:02 PM, Clifford Heath wrote: > > 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 -~----------~----~----~----~------~----~------~--~---
