I have two fixes in a text file. I created the diff using "diff -u", so I hope you can apply the patch. The file is attached. I never could get my optional ''scroll when the dragged element goes outside the scrolled element'' thing to work. I got it to start scrolling correctly, but then it would start making increasingly big jumps and basically scroll out of control. I removed all the code associated with it. Another issue I ran into is that my particular page has ''position: relative'' on the draggable elements. IE cannot determine size on relative or absolute positioned elements for some reason. So, I just gave up for the time being. Anyone know of a way to get the width and height on positioned elements in IE? Anyway, the patch fixes it so that the dragged element moves with the scroll, even when the mouse cursor leaves the document, and it now passes the scrollSensitivity and scrollSpeed from Sortable to Draggable. Greg _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
Heya, I think something is wrong with the patch-- when moving outside the window on the top, when the window is completely scrolled up, the draggable somehow continues to move (tested on Safari and Firefox). I''ll add the passing through of the scroll options for the time being. -Thomas Am 22.03.2006 um 22:53 schrieb Gregory Hill:> I have two fixes in a text file. I created the diff using "diff - > u", so > I hope you can apply the patch. The file is attached. > > I never could get my optional ''scroll when the dragged element goes > outside the scrolled element'' thing to work. I got it to start > scrolling correctly, but then it would start making increasingly big > jumps and basically scroll out of control. I removed all the code > associated with it. Another issue I ran into is that my particular > page > has ''position: relative'' on the draggable elements. IE cannot > determine > size on relative or absolute positioned elements for some reason. > So, I > just gave up for the time being. Anyone know of a way to get the > width > and height on positioned elements in IE? > > Anyway, the patch fixes it so that the dragged element moves with the > scroll, even when the mouse cursor leaves the document, and it now > passes the scrollSensitivity and scrollSpeed from Sortable to > Draggable. > > Greg > <diff.txt> > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
> Heya, > > I think something is wrong with the patch-- when moving outside the > window > on the top, when the window is completely scrolled up, the draggable > somehow > continues to move (tested on Safari and Firefox).Hmm... I didn''t see that in my testing, but I''ll see if I can figure it out. Greg
Well, I added a manual check to make sure it doesn''t move it above 0 on either axis. I guess I just never let it scroll high enough to notice the behavior before. The first two lines were in the diff, just add the conditionals after. Or if you know a more prototype-ish way to accomplish the same thing, go nuts. Draggables._lastScrollPointer[0] += offset[0]; Draggables._lastScrollPointer[1] += offset[1]; if (Draggables._lastScrollPointer[0] < 0) Draggables._lastScrollPointer[0] = 0; if (Draggables._lastScrollPointer[1] < 0) Draggables._lastScrollPointer[1] = 0; Greg> -----Original Message----- > From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org[mailto:rails-spinoffs-> bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Gregory Hill > Sent: Thursday, March 23, 2006 10:41 AM > To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > Subject: RE: [Rails-spinoffs] [ANN] Support for window scrolling > fordraganddrop > > > Heya, > > > > I think something is wrong with the patch-- when moving outside the > > window > > on the top, when the window is completely scrolled up, the draggable > > somehow > > continues to move (tested on Safari and Firefox). > > Hmm... I didn''t see that in my testing, but I''ll see if I can figureit> out. > > Greg > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
Here''s a diff file (created with ''diff -u'') against the dragdrop.js in 1.6.0 to move the dragged element while scrolling. It fixes the previous problem of continuing to move the item off the top of the page. I''d like to have it included, if possible, so if there are more changes needed, let me know. Thanks, Greg _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
So, it''s in. :) One thing i noticed: Scrolling "beyong" the bottom of the window in Safari causes strange things, plus the draggables sort-of flicker a bit, plus Safari has some artifacts from scrolling (doesn''t render properly). These things aren''t really breaking things, but if anyone has workarounds or fixes, they''ll be welcome! -Thomas Am 31.03.2006 um 00:51 schrieb Gregory Hill:> Here''s a diff file (created with ''diff -u'') against the dragdrop.js in > 1.6.0 to move the dragged element while scrolling. It fixes the > previous problem of continuing to move the item off the top of the > page. > > I''d like to have it included, if possible, so if there are more > changes > needed, let me know. > > Thanks, > Greg > <diff.txt> > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs-- Thomas Fuchs wollzelle http://www.wollzelle.com http://www.fluxiom.com :: online digital asset management http://script.aculo.us :: Web 2.0 JavaScript http://mir.aculo.us :: Where no web developer has gone before
Thanks for including it Thomas. I''ll try to test on my wife''s Mac this weekend and see if I can fix the Safari issues. Didn''t notice any flickering on my machine here, but it could just be my test page was set up a different way that worked better with the code. I''ll try to set up some more test scenarios and see if I can''t figure out what''s what. Greg> -----Original Message----- > From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org[mailto:rails-spinoffs-> bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Thomas Fuchs > Sent: Friday, March 31, 2006 5:00 AM > To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > Subject: Re: [Rails-spinoffs] [ANN] Support for window scrolling > fordraganddrop > > So, it''s in. :) > > One thing i noticed: > Scrolling "beyong" the bottom of the window in Safari > causes strange things, plus the draggables sort-of flicker a bit, > plus Safari has some artifacts from scrolling (doesn''t render > properly). > > These things aren''t really breaking things, but if anyone has > workarounds or fixes, they''ll be welcome! > > -Thomas > > Am 31.03.2006 um 00:51 schrieb Gregory Hill: > > > Here''s a diff file (created with ''diff -u'') against the dragdrop.jsin> > 1.6.0 to move the dragged element while scrolling. It fixes the > > previous problem of continuing to move the item off the top of the > > page. > > > > I''d like to have it included, if possible, so if there are more > > changes > > needed, let me know. > > > > Thanks, > > Greg > > <diff.txt> > > _______________________________________________ > > Rails-spinoffs mailing list > > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > -- > Thomas Fuchs > wollzelle > > http://www.wollzelle.com > > http://www.fluxiom.com :: online digital asset management > http://script.aculo.us :: Web 2.0 JavaScript > http://mir.aculo.us :: Where no web developer has gone before > > > > > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
Possibly Parallel Threads
- scriptaculous & sortables/draggables scrolling?
- RE: Support for window scrolling for drag anddrop
- Autoscrolling for Draggables and Sortables
- sortable scroll in div problem : dragged element doesn't follow the mouse pointer
- Drag''n''Drop out of overflow:auto containers