Search and Top Navigation
#2057 closed enhancement (fixed)
Opened December 15, 2007 08:15AM UTC
Closed March 25, 2008 03:17PM UTC
Last modified February 26, 2009 11:21AM UTC
Droppable tolerance for draggable that completely overlaps
Reported by: | indirect | Owned by: | rdworth |
---|---|---|---|
Priority: | major | Milestone: | 1.5 |
Component: | ui.core | Version: | 1.2.1 |
Keywords: | Cc: | website@arko.net | |
Blocked by: | Blocking: |
Description
When a draggable item completely overlaps a droppable item, there is no tolerance that will register the draggable as "over". By adding a droppable tolerance, it is possible to make this happen.
For an example of why I would want this, see http://arko.net/files/jquery_overlap/. The pieces should only be able to be dropped when they are on top of one of the marked hexes.
Here is the case which I added to the
switch (toleranceMode)case statement:
case 'overlap': dao = $(oDrag.helper).offset(); dpo = oDrop.offset; return ( dao.top == dpo.top && dao.left == dpo.left );
I have attached the case statement as a patch against ui.droppable.js, but since I am a jQuery newbie, there's probably a better way to do it. Thanks!
Attachments (0)
Change History (4)
Changed December 15, 2007 07:03PM UTC by comment:1
owner: | → rworth |
---|---|
status: | new → assigned |
Changed March 25, 2008 03:17PM UTC by comment:2
resolution: | → fixed |
---|---|
status: | assigned → closed |
check out the tolerance "fit": this should be exactly what you need!
Changed May 24, 2008 03:39AM UTC by comment:3
milestone: | 1.2.2 |
---|
Milestone 1.2.2 deleted
Changed February 26, 2009 11:21AM UTC by comment:4
milestone: | → 1.5 |
---|