Hey guys. I''m trying to drag between two lists, except one list is really long so I set a height on the <ul> with overflow:auto. Unfortunately when I drag between the lists I can''t drag items outside of the <ul> with the overflow on. Does anyone know how I can make this work? I think I might be able to hack up something with rico''s live tables, but that seems a bit overkill. Any advice appreciated :-) Oh the ul is in a div with a width that is floated right. Dunno if that makes a difference, some people on the intarweb have mentioned it though. Cheers -Rob
See the attached file (I changed the extension to .txt to get past my company''s email security -- it doesn''t like .js files) My dragdrop.js file is quite different from the official released versions.. so beware, you might want to spend some time looking at a side by side diff before trying to deploy it or copy changes over. Basically, what I did to overcome the problem you described, is on drag init, if the draggable has the option "ghosting" and "floating" both set to true, I clone the element and attach it at the document level instead of the container level. Therefore, it can now be dragged throughout the entire document instead of just within the container it was originally created within... My dragdrop.js file also contains general optimizations to the droppales processing (makes dragging MUCH smoother when you have multiple droppables on the page... see my past posts on the same topic). Hopefully, you''ll at least be able to see what I did to solve the problem you are having, and if anything copy that logic to your own application... -----Original Message----- From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Robin Haswell Sent: Wednesday, February 15, 2006 3:16 PM To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Subject: [Rails-spinoffs] Draggables and overflow:auto Hey guys. I''m trying to drag between two lists, except one list is really long so I set a height on the <ul> with overflow:auto. Unfortunately when I drag between the lists I can''t drag items outside of the <ul> with the overflow on. Does anyone know how I can make this work? I think I might be able to hack up something with rico''s live tables, but that seems a bit overkill. Any advice appreciated :-) Oh the ul is in a div with a width that is floated right. Dunno if that makes a difference, some people on the intarweb have mentioned it though. Cheers -Rob _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs The information transmitted in this electronic mail is intended only for the person or entity to which it is addressed and may contain confidential, proprietary, and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from all computers. _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
You may want to change it slighty, for instance, so that ghosting is not required... but all my draggables are ghosted in my application so that''s just how I did it... -----Original Message----- From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Ryan Gahl Sent: Wednesday, February 15, 2006 3:25 PM To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Subject: RE: [Rails-spinoffs] Draggables and overflow:auto See the attached file (I changed the extension to .txt to get past my company''s email security -- it doesn''t like .js files) My dragdrop.js file is quite different from the official released versions.. so beware, you might want to spend some time looking at a side by side diff before trying to deploy it or copy changes over. Basically, what I did to overcome the problem you described, is on drag init, if the draggable has the option "ghosting" and "floating" both set to true, I clone the element and attach it at the document level instead of the container level. Therefore, it can now be dragged throughout the entire document instead of just within the container it was originally created within... My dragdrop.js file also contains general optimizations to the droppales processing (makes dragging MUCH smoother when you have multiple droppables on the page... see my past posts on the same topic). Hopefully, you''ll at least be able to see what I did to solve the problem you are having, and if anything copy that logic to your own application... -----Original Message----- From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Robin Haswell Sent: Wednesday, February 15, 2006 3:16 PM To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Subject: [Rails-spinoffs] Draggables and overflow:auto Hey guys. I''m trying to drag between two lists, except one list is really long so I set a height on the <ul> with overflow:auto. Unfortunately when I drag between the lists I can''t drag items outside of the <ul> with the overflow on. Does anyone know how I can make this work? I think I might be able to hack up something with rico''s live tables, but that seems a bit overkill. Any advice appreciated :-) Oh the ul is in a div with a width that is floated right. Dunno if that makes a difference, some people on the intarweb have mentioned it though. Cheers -Rob _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs The information transmitted in this electronic mail is intended only for the person or entity to which it is addressed and may contain confidential, proprietary, and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from all computers.
Thanks dude. Did you submit a patch over this? Or was it ignored like every patch I submit. I''ll give it a shot, but I''ve just spent some time working around this problem (but I''ve run in to it a couple of times). I realised that my application didn''t really need DnD, and a button to copy the data would be more usable. Thanks anyway though :-) Hm that''s the problem with DnD, If your intended audience is assumed to be competant, there are usually better UIs than dragging elements around the place (if your scope is limited). Cheers -Rob Ryan Gahl wrote:> You may want to change it slighty, for instance, so that ghosting is not > required... but all my draggables are ghosted in my application so > that''s just how I did it... > > -----Original Message----- > From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Ryan > Gahl > Sent: Wednesday, February 15, 2006 3:25 PM > To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > Subject: RE: [Rails-spinoffs] Draggables and overflow:auto > > See the attached file (I changed the extension to .txt to get past my > company''s email security -- it doesn''t like .js files) > > My dragdrop.js file is quite different from the official released > versions.. so beware, you might want to spend some time looking at a > side by side diff before trying to deploy it or copy changes over. > > Basically, what I did to overcome the problem you described, is on drag > init, if the draggable has the option "ghosting" and "floating" both set > to true, I clone the element and attach it at the document level instead > of the container level. Therefore, it can now be dragged throughout the > entire document instead of just within the container it was originally > created within... > > My dragdrop.js file also contains general optimizations to the droppales > processing (makes dragging MUCH smoother when you have multiple > droppables on the page... see my past posts on the same topic). > > Hopefully, you''ll at least be able to see what I did to solve the > problem you are having, and if anything copy that logic to your own > application... > > > > -----Original Message----- > From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Robin > Haswell > Sent: Wednesday, February 15, 2006 3:16 PM > To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > Subject: [Rails-spinoffs] Draggables and overflow:auto > > Hey guys. I''m trying to drag between two lists, except one list is > really long so I set a height on the <ul> with overflow:auto. > Unfortunately when I drag between the lists I can''t drag items outside > of the <ul> with the overflow on. Does anyone know how I can make this > work? I think I might be able to hack up something with rico''s live > tables, but that seems a bit overkill. Any advice appreciated :-) > > Oh the ul is in a div with a width that is floated right. Dunno if that > makes a difference, some people on the intarweb have mentioned it > though. > > Cheers > > -Rob > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > The information transmitted in this electronic mail is intended only for > the > person or entity to which it is addressed and may contain confidential, > proprietary, and/or privileged material. Any review, retransmission, > dissemination or other use of, or taking of any action in reliance upon, > this information by persons or entities other than the intended > recipient > is prohibited. If you received this in error, please contact the sender > and > delete the material from all computers. > > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
Nah, I''ve only ever just submitted my optimizations in isolation to this list (only a couple times so far)... seems like Thomas has his hands full though since he''s not yet responded to any of my suggestions. I don''t even bother with the wiki anymore. DnD has it''s place, but you''re right, always look for the simplest mechanisms possible... -----Original Message----- From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Robin Haswell Sent: Wednesday, February 15, 2006 4:28 PM To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Subject: Re: [Rails-spinoffs] Draggables and overflow:auto Thanks dude. Did you submit a patch over this? Or was it ignored like every patch I submit. I''ll give it a shot, but I''ve just spent some time working around this problem (but I''ve run in to it a couple of times). I realised that my application didn''t really need DnD, and a button to copy the data would be more usable. Thanks anyway though :-) Hm that''s the problem with DnD, If your intended audience is assumed to be competant, there are usually better UIs than dragging elements around the place (if your scope is limited). Cheers -Rob Ryan Gahl wrote:> You may want to change it slighty, for instance, so that ghosting isnot> required... but all my draggables are ghosted in my application so > that''s just how I did it... > > -----Original Message----- > From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf OfRyan> Gahl > Sent: Wednesday, February 15, 2006 3:25 PM > To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > Subject: RE: [Rails-spinoffs] Draggables and overflow:auto > > See the attached file (I changed the extension to .txt to get past my > company''s email security -- it doesn''t like .js files) > > My dragdrop.js file is quite different from the official released > versions.. so beware, you might want to spend some time looking at a > side by side diff before trying to deploy it or copy changes over. > > Basically, what I did to overcome the problem you described, is ondrag> init, if the draggable has the option "ghosting" and "floating" bothset> to true, I clone the element and attach it at the document levelinstead> of the container level. Therefore, it can now be dragged throughoutthe> entire document instead of just within the container it was originally > created within... > > My dragdrop.js file also contains general optimizations to thedroppales> processing (makes dragging MUCH smoother when you have multiple > droppables on the page... see my past posts on the same topic). > > Hopefully, you''ll at least be able to see what I did to solve the > problem you are having, and if anything copy that logic to your own > application... > > > > -----Original Message----- > From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf OfRobin> Haswell > Sent: Wednesday, February 15, 2006 3:16 PM > To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > Subject: [Rails-spinoffs] Draggables and overflow:auto > > Hey guys. I''m trying to drag between two lists, except one list is > really long so I set a height on the <ul> with overflow:auto. > Unfortunately when I drag between the lists I can''t drag items outside> of the <ul> with the overflow on. Does anyone know how I can make this> work? I think I might be able to hack up something with rico''s live > tables, but that seems a bit overkill. Any advice appreciated :-) > > Oh the ul is in a div with a width that is floated right. Dunno ifthat> makes a difference, some people on the intarweb have mentioned it > though. > > Cheers > > -Rob > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > The information transmitted in this electronic mail is intended onlyfor> the > person or entity to which it is addressed and may containconfidential,> proprietary, and/or privileged material. Any review, retransmission, > dissemination or other use of, or taking of any action in relianceupon,> this information by persons or entities other than the intended > recipient > is prohibited. If you received this in error, please contact thesender> and > delete the material from all computers. > > _______________________________________________ > 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 Gahl wrote (15/02/2006 22:32):> Nah, I''ve only ever just submitted my optimizations in isolation to this > list (only a couple times so far)... seems like Thomas has his hands > full though since he''s not yet responded to any of my suggestions.In case you''re feeling unappreciated... I''ve been following the progress of dragdrop.js carefully, and I''ve been incorporating your patches because I''m working on an application using potentially a lot of draggables and droppables. I''ve also been trying to get the recent clever scrolling code to work. Without success so far sadly (the demo works, but my implementation doesn''t), but I can manage without the scrolling for the time being. Chris
I apologize, people, for my comment. I''m not feeling unappreciated. On the contrary, I''m just glad I can contribute anything (even if just in posts to this list), and I sincerely think Thomas and the other devs like Mandy just have their hands full. Yea, I re-read my post after I sent it and kind of thought it might be taken overly negatively... my bad... -----Original Message----- From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Chris Lear Sent: Thursday, February 16, 2006 3:54 AM To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Subject: Re: [Rails-spinoffs] Draggables and overflow:auto * Ryan Gahl wrote (15/02/2006 22:32):> Nah, I''ve only ever just submitted my optimizations in isolation tothis> list (only a couple times so far)... seems like Thomas has his hands > full though since he''s not yet responded to any of my suggestions.In case you''re feeling unappreciated... I''ve been following the progress of dragdrop.js carefully, and I''ve been incorporating your patches because I''m working on an application using potentially a lot of draggables and droppables. I''ve also been trying to get the recent clever scrolling code to work. Without success so far sadly (the demo works, but my implementation doesn''t), but I can manage without the scrolling for the time being. Chris _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs The information transmitted in this electronic mail is intended only for the person or entity to which it is addressed and may contain confidential, proprietary, and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from all computers.