Re, Would anyone happen to know how to make sortable/draggable scroll down the page while moving the object if the page happens to be larger than the screen size? These functions seem to work only within the visible working space. Right now I have workaround whereby I have an omnipresent DIV on the screen to which I drop an element, then scroll down in the browser to a certain point, and then drop it in that location from that DIV of mine. Pretty complicated :) Thanks, Mark L.
If you are using the latest build, the following should work... (maybe just use document instead of documentElement) var myDraggable = new Draggable($(''someElement''), {scroll: document.documentElement}); On 6/12/06, ML <mypublicmail-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > Re, > > Would anyone happen to know how to make sortable/draggable scroll down > the page while moving the object if the page happens to be larger than > the screen size? These functions seem to work only within the visible > working space. > > Right now I have workaround whereby I have an omnipresent DIV on the > screen to which I drop an element, then scroll down in the browser to > a certain point, and then drop it in that location from that DIV of > mine. Pretty complicated :) > > Thanks, > > Mark L. > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >_______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
Ryan, It "kind of" works now, although the whole scrolling behavior is totally erratic -- as soon as I start dragging an element, it jumps to the buttom of the screen and then starts scrolling the browser down. Here is what I use Sortable.create(''ordered_list_''+gal,{tag:''li'', scroll: document.documentElement, dropOnEmpty: true, containment: galleries, onUpdate: domea,overlap:''horizontal'', constraint:false}); 1. "galleries" variable contains a list of DIV ids. 2. doesn''t work with just "document" Latest version + Firefox 1.5.0.4 On 6/12/06, Ryan Gahl <ryan.gahl-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > If you are using the latest build, the following should work... (maybe > just use document instead of documentElement) > > var myDraggable = new Draggable($(''someElement''), {scroll: > document.documentElement}); > > > > On 6/12/06, ML <mypublicmail-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > Re, > > Would anyone happen to know how to make sortable/draggable scroll down > the page while moving the object if the page happens to be larger than > the screen size? These functions seem to work only within the visible > working space. > > Right now I have workaround whereby I have an omnipresent DIV on the > screen to which I drop an element, then scroll down in the browser to > a certain point, and then drop it in that location from that DIV of > mine. Pretty complicated :) > > Thanks, > > Mark L. > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > >_______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
-----Original Message----- Would anyone happen to know how to make sortable/draggable scroll down the page while moving the object if the page happens to be larger than the screen size? _______________________________________________ Hi, I use Sortable.create(table,{handle:''handle'',constraint:false,ghosting:false,scrol l:window,scrollSensitivity: 20,scrollSpeed: 25}) And every element of my sortable can then be dragged down the page.
Leon, "scroll: window" did the job. Thanks a lot! On 6/13/06, Leon Chevalier <leon-/gNFX0pVsuRWk0Htik3J/w@public.gmane.org> wrote:> > > -----Original Message----- > Would anyone happen to know how to make sortable/draggable scroll down > the page while moving the object if the page happens to be larger than > the screen size? > _______________________________________________ > > Hi, > > I use > > Sortable.create > (table,{handle:''handle'',constraint:false,ghosting:false,scrol > l:window,scrollSensitivity: 20,scrollSpeed: 25}) > > And every element of my sortable can then be dragged down the page. > > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >_______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
Ahh, yes, good thinking. I''ll bet the document.documentElement wasn''t working how you wanted because your content wasn''t pushing that element down far enough on the page (it must only make itself tall enough to envelope the bottom-most element). On 6/13/06, ML <mypublicmail-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > Leon, > > "scroll: window" did the job. Thanks a lot! > > > On 6/13/06, Leon Chevalier <leon-/gNFX0pVsuRWk0Htik3J/w@public.gmane.org > wrote: > > > > > > -----Original Message----- > > Would anyone happen to know how to make sortable/draggable scroll down > > the page while moving the object if the page happens to be larger than > > the screen size? > > _______________________________________________ > > > > Hi, > > > > I use > > > > Sortable.create(table,{handle:''handle'',constraint:false,ghosting:false,scrol > > > > l:window,scrollSensitivity: 20,scrollSpeed: 25}) > > > > And every element of my sortable can then be dragged down the page. > > > > _______________________________________________ > > Rails-spinoffs mailing list > > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > > > > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > >_______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs