Search and Top Navigation
#2837 closed bug (fixed)
Opened May 09, 2008 06:42PM UTC
Closed May 26, 2008 07:28PM UTC
Last modified September 23, 2009 09:26PM UTC
jQuery.Sortable Tolerance: "pointer" problem
Reported by: | LeoLeal | Owned by: | paul |
---|---|---|---|
Priority: | major | Milestone: | 1.5 |
Component: | ui.sortable | Version: | 1.5b4 |
Keywords: | Sortable | Cc: | |
Blocked by: | Blocking: |
Description
Hi friends,
I have this sortable list with Items contaning different data, making them different from eachother in height. So a bigger Item can only be properly sorted using tolerance:"pointer" as I read in another ticket.
The problem is that when you move a smaller item over a bigger item when trying to change It's position to below or above the bigger Item, when the Pointer reaches close to the bigger Item's height, the Placeholder stays undecided where to appear, so the destination spot of the smaller Item starts to flicker.
I take It's because the code uses the item's top coordinate to calculate wheter the Item beign sorted goes above or below the current Item you're hovering, and the Placeholder changed It's top coord., screwing up the formula.
Fast way to reproduce It:
Create 3 divs in a sortable div container (using tolerance:"pointer" so U can sort the Bigger DIV above the Smaller one), two with 2 line of text and one with 20 Lines of Test.
Try to slowly sort one of the Smaller DIVs against the bigger one and U'll see the Placeholder Flickering once the Smaller div touches the middle of the bigger one.
Attachments (0)
Change History (4)
Changed May 09, 2008 07:07PM UTC by comment:1
Changed May 24, 2008 03:39AM UTC by comment:2
milestone: | 1.2.4 |
---|
Milestone 1.2.4 deleted
Changed May 24, 2008 03:48AM UTC by comment:3
component: | ui.core → ui.sortable |
---|---|
milestone: | → 1.5 |
version: | 1.2.3 → 1.5b4 |
Changed May 26, 2008 07:28PM UTC by comment:4
resolution: | → fixed |
---|---|
status: | new → closed |
Tolerance pointer still works as expected, but to resolve these issues, I implemented a dynamic tolerance mode called "guess", which uses the "pointer" mode if the items are smaller than the helper, and defaults back to "intersect" if items are bigger than the helper.
Code Example:
Markup (Dont forget to import jQuery Files) :)