drag and drop target strategies

D

David Mark

jeff said:
I've had no need for drag and drop on an item, but I have done
something very much like option 3 for other uses.

On another note, Scriptaculous has resortable lists,

Most libraries use similar examples. The Prototripe/Craptaculous
example has always been a laughingstock due to performance issues.

Right. That dog don't hunt (never did).
you can drag an item of the list around and it then snaps to the nearest
list position. I have no idea how they do that and never had enough
desire to look through the code, which is no joy.

They are likely using something along the lines of option #3. But then
you never know with those guys. :)
Under no circumstance do I recommend using Scripataculous. But I do
find that bit clever.

Not really, but it depends on your perspective.
When the mousemove event is


I suppose you could always recalculate element positions if the page
changes (potentially hard to know), or just periodically re-poll (which
I've done), but perhaps it is only necessary to know which target you
are closest to?

Context is key as usual. Your app should be in control of when (and if)
the document changes.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,079
Messages
2,570,575
Members
47,207
Latest member
HelenaCani

Latest Threads

Top