Skip to main content

Search and Top Navigation

#6108 closed enhancement (wontfix)

Opened September 24, 2010 02:16PM UTC

Closed September 24, 2010 02:45PM UTC

Last modified October 11, 2012 09:15PM UTC

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 September 24, 2010 05:54PM UTC.

    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 September 24, 2010 05:59PM UTC.

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

Change History (3)

Changed September 24, 2010 02:45PM UTC by scottgonzalez comment:1

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 September 24, 2010 05:56PM UTC by cmathis430 comment:2

Replying to [comment:1 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 October 11, 2012 09:15PM UTC by scottgonzalez comment:3

milestone: TBD

Milestone TBD deleted