Opened 10 years ago

Closed 10 years ago

Last modified 7 years ago

#6108 closed enhancement (wontfix)

Need droppable to be able to accept itself

Reported by: cmathis430 Owned by:
Priority: minor Milestone:
Component: ui.droppable Version: 1.8.5
Keywords: Cc:
Blocked by: Blocking:

Description

I need droppable to be able to accept itself. The reason I need this is because my drop method is more complicated that the normal scenario. I am building a layout manager, so when you hover over a droppable, it pops up custom UI to give the user further flexibility and control over where to drop the draggable.

Can you please include a way for me to allow a droppable to accept itself? Thanks.

These lines, if commented out, seem to be a workaround for me:

jquery.ui.droppable.js: line 88, 100, 112

if (!draggable 
    || (draggable.currentItem 
    || draggable.element)[0] == this.element[0]) return; 
    // Bail if draggable and droppable are same element

jquery.ui.droppable.js: line 212

for (var j=0; j < list.length; j++) { 
  if(list[j] == m[i].element[0]) { 
    m[i].proportions.height = 0; 
    continue droppablesLoop;
  }
};
//Filter out elements in the current dragged item

Attachments (2)

hovering over yourself with a clone.JPG (60.7 KB) - added by cmathis430 10 years ago.
This screenshot demonstrates how you can hover over yourself when you are using a cloning what is to be dragged.
jquery.ui.droppable.js (10.3 KB) - added by cmathis430 10 years ago.
This file is a patched version of droppable to enable a droppable to accept itself

Download all attachments as: .zip

Change History (5)

comment:1 Changed 10 years ago by Scott González

Resolution: wontfix
Status: newclosed

I don't understand how you can hover over yourself in a logical way. This seems like way too much of an edge case.

Changed 10 years ago by cmathis430

This screenshot demonstrates how you can hover over yourself when you are using a cloning what is to be dragged.

comment:2 in reply to:  1 Changed 10 years ago by cmathis430

Replying to scott.gonzalez:

I don't understand how you can hover over yourself in a logical way. This seems like way too much of an edge case.

Sorry, meant to say: This screenshot demonstrates how you can hover over yourself when you are cloning what is to be dragged.

Changed 10 years ago by cmathis430

Attachment: jquery.ui.droppable.js added

This file is a patched version of droppable to enable a droppable to accept itself

comment:3 Changed 7 years ago by Scott González

Milestone: TBD

Milestone TBD deleted

Note: See TracTickets for help on using tickets.