Skip to main content

Search and Top Navigation

#2431 closed bug (fixed)

Opened February 28, 2008 04:25PM UTC

Closed March 31, 2008 03:58AM UTC

Last modified February 26, 2009 11:58AM UTC

Touch tolerance breaks when the draggable is taller than the droppable.

Reported by: jeffkretz Owned by: eduardo
Priority: blocker Milestone: 1.5
Component: ui.core Version: 1.2.3
Keywords: tolerance Cc:
Blocked by: Blocking:
Description

See demo page at:

http://cobalt.scorpiontechnology.com/Test/HTMLPage.htm

Only the top and bottom edges of the draggable activate the droppable. When the draggable is centered over the droppable, it cannot be dropped.

JK

Attachments (0)
Change History (7)

Changed February 28, 2008 05:40PM UTC by jeffkretz comment:1

In stepping through the code, I see that the logic only detects for the presence of one corner inside another. So when the draggable is larger, it can overlap yet have no corner inside. This change solved the problem for me:

case 'touch':
	return ( (y1 >= t && y1 <= b) ||	// Top edge touching	
		 (y2 >= t && y2 <= b) ||	// Bottom edge touching	
		 (y1 < t && y2 > b)		// Surrounded vertically	
		) && (
		 (x1 >= l && x1 <= r) ||	// Left edge touching	
		 (x2 >= l && x2 <= r) ||	// Right edge touching	
		 (x1 < l && x2 > r)		// Surrounded horizontally
		);

You can see this working at:

http://cobalt.scorpiontechnology.com/Test/HTMLPage2.htm

JK

Changed March 05, 2008 01:18PM UTC by paul comment:2

need: ReviewPatch
owner: paulrworth

Changed March 14, 2008 06:52PM UTC by paul comment:3

owner: rworthpaul

Changed March 25, 2008 03:11PM UTC by paul comment:4

owner: paulbraeker

Changed March 31, 2008 03:58AM UTC by braeker comment:5

resolution: → fixed
status: newclosed

Changed May 24, 2008 03:39AM UTC by comment:6

milestone: 1.2.4

Milestone 1.2.4 deleted

Changed February 26, 2009 11:58AM UTC by paul comment:7

milestone: → 1.5