yup I tracked it down to there too. I cant find the "onHover function when dropOnEmpty" is false though, so im unable to compare.
ps. I find it interesting that this demo works completely fine: http://wiki.script.aculo.us/scriptaculous/page/print/SortableFloatsDemo On Jun 13, 12:05 am, "Gareth Evans" <[EMAIL PROTECTED]> wrote: > Yeah looks like the same bug to me, though much more accentuated on yours. > In dragdrop.js these lines appear to be responsible > > You can see i've added some debug insertions. > What appears to happen is that as i move the item up, one pixel at at time, > it sometimes goes into the top branch, and occasionally into the middle > branch. > > This code reads *completely* differently to the onHover function used when > dropOnEmpty:false. > > if(children) { > var offset = Element.offsetSize(dropon, droponOptions.overlap) * ( > 1.0 - overlap); > > for (index = 0; index < children.length; index += 1) { > if (offset - Element.offsetSize (children[index], > droponOptions.overlap) >= 0) { > offset -= Element.offsetSize (children[index], > droponOptions.overlap); > new Insertion.Top('debug','topbranch<br/>') > } else if (offset - (Element.offsetSize (children[index], > droponOptions.overlap) / 2) >= 0) { > child = index + 1 < children.length ? children[index + 1] : > null; > new Insertion.Top('debug','midbranch<br/>') > break; > } else { > child = children[index]; > new Insertion.Top('debug','bottombranch<br/>') > break; > } > } > } > > I confess i'm not even sure what it's doing... at this point. > > Gareth > > On 6/13/07, junkmate <[EMAIL PROTECTED]> wrote: > > > > > Heres my test page:http://www.oldsushi.com/testing.php > > > Going there make your browser small enough so the images are on two > > lines, and you will see the problem when dragging around the second > > line and below. > > > On Jun 12, 11:10 pm, "Gareth Evans" <[EMAIL PROTECTED]> wrote: > > > My problem, while related to dropOnEmpty as well seems to only occur > > when my > > > sortables are nested, which is why I can't replicate it on my test page. > > > I've been meaning to update my test page to prove it so I have a clean > > page > > > to debug from within, that I can post up (it's really hard to post up an > > > internal [read:burried] page of a web application. > > > I think there might be issues in the dropOnEmpty code. > > > > Perhaps we should team up to debug the solution at some point, > > > What Instant Messaging tools do you use? > > > > On 6/13/07, junkmate <[EMAIL PROTECTED]> wrote: > > > > > any update on this? I am having exactly the same problem. > > > > > I have two Div containers, one on top of the other, where you can drag > > > > from on to the other. > > > > Each div is large enough for 5 images to fit on one line. > > > > > With less than 5 images, dragging and dropping is a pleasure, with > > > > everything looking great. However above 5 images in one container > > > > forces the images on to two rows, and then dragging problems start. > > > > The top row is still perfectly fine, but the second row and below it > > > > is very difficult to drag your image where you want it to land, due to > > > > constantly alternating drop positions every pixel you move... > > > > > This problem only occurs with dropOnEmpty set to true, yet I must have > > > > the ability to empty these lists. > > > > > help :D --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
