Skip to main content

Bug Tracker

Side navigation

#2431 closed bug (fixed)

Opened February 28, 2008 04:25PM UTC

Closed March 31, 2008 03:58AM UTC

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

Reported by: jeffkretz Owned by: braeker
Priority: undecided Milestone: 1.2.4
Component: ui 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 (5)

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