Side navigation
#3121 closed enhancement (invalid)
Opened July 02, 2008 04:31PM UTC
Closed July 07, 2008 11:40PM UTC
Need an option for an "exclusive" draggable
Reported by: | jeffkretz | Owned by: | stefan |
---|---|---|---|
Priority: | critical | Milestone: | 1.3 |
Component: | interface | Version: | 1.2.6 |
Keywords: | draggable | Cc: | |
Blocked by: | Blocking: |
Description
I'm building a page manager for a CMS using 1.2.6 and the latest UI draggable/droppable.
I have a problem whereby the draggable element sometimes overlaps two drop zones at the same time, thus firing the drop event twice.
My thought was to have a property on the draggable called "exclusive". If the draggable was found to be validly over one drop zone, then it would return false for intersecting any other drop zones.
I've spent the last day trying modifications to the droppable script so I could propose a complete solution but as yet I haven't been able to come up with anything workable.
Any help on this would be greatly appreciated.
JK
Attachments (1)
Change History (3)
Changed July 02, 2008 07:09PM UTC by comment:1
Changed July 02, 2008 11:08PM UTC by comment:2
For what it's worth, this problem is only with the "touch" tolerance. Exclusivity is already built into the pointer and intersection tolerances.
I'd still like to solve the problem for exclusive on the "touch" tolerance, but perhaps this isn't the best way to do it.
What do you think?
JK
Changed July 07, 2008 11:40PM UTC by comment:3
resolution: | → invalid |
---|---|
status: | new → closed |
I just found a possible solution. When the draggable fires the "over" event, record which draggable it is over in the draggable.options.isover property (and remove it on the "out" event).
When testing for intersection both for the drag and the drop event, check to see if it is a non-exclusive, the isover is null, or if the isover matches the current droppable. Otherwise return false for intersection.
I've uploaded a patch for review.
JK