problems dragging a pane containing draggables

41 views
Skip to first unread message

nekoflux

unread,
Nov 22, 2009, 11:59:11 PM11/22/09
to threedubmedia
hi there,

I'm trying to create a panel that is movable, and containing a group
of drop targets. It sort of works but has a pretty serious problem.
After I move the pane, I can only drag elements to new slots by
hovering over the first location where the pane was before being
dragged.

Here's a link to a demo of the problem:
http://webgame.dreamingbits.com/test

any help would be greatly appreciated.

thanks!

-Mike

3wme

unread,
Nov 23, 2009, 9:51:22 AM11/23/09
to threedubmedia
Use the "dropManage" utility inside the "dragstart" handler. In the
next version of this plugin, this happens automatically.

http://groups.google.com/group/threedubmedia/browse_thread/thread/b1c6e5cb2138ab53/a67ae03058c76f51

http://blog.threedubmedia.com/2008/08/eventspecialdrop.html

"dropManage" is a global utility function, that takes a single options
argument in the form of an object literal. The options will extend the
$.event.special.drop object, which allows you to use the following
keys for configuration. The function returns a jquery collection of
filtered drop target elements.

* delay - The async timeout delay (default: 100) in milliseconds
between target tolerance checks.
* mode - Key string (default:'intersect') for stored tolerance
modes.
* tolerance - Create a function to make a custom tolerance mode.
* filter - jQuery filter method argument (string expression or
function) to filter the all currently bound drop target elements and
cache the position and size.

The most typical place to use the $.dropManage function, is inside of
a "dragstart" event. In dynamic applications, where the drop target
elements will change size or position, you can re-locate elements
quite easily. It also makes it easy to interact with a restricted
subset of all bound drop target elements and different tolerance
modes.
Reply all
Reply to author
Forward
0 new messages