Hi *, I''m not able to make a correct "Sortable.create" whith a scrolling containers. Please see @ http://blog.amicoimmaginario.it/demo/s5generator/ and try to drag''n''drop int the TOC (left sidebar) when the scrollbar is scrolled. The "ghost" marker create space beetween object in the wrong position. see http://blog.amicoimmaginario.it/images/sortable.create.jpeg for a screenshot could someone help me? Thanks in advance --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
You''re not using the ''scroll'' option, which does two things: it allows the container to autoscroll when dragging, and lets the Sortable know to allow for scroll offsets when calculating relative mouse position. Add scroll: ''s5_toc_content'' to your Sortable options. http://wiki.script.aculo.us/scriptaculous/show/Sortable.create TAG On Mar 14, 2007, at 4:08 AM, apaella wrote:> > Hi *, > I''m not able to make a correct "Sortable.create" whith a scrolling > containers. > > Please see @ http://blog.amicoimmaginario.it/demo/s5generator/ and try > to drag''n''drop int the TOC (left sidebar) when the scrollbar is > scrolled. The "ghost" marker create space beetween object in the wrong > position. > > see http://blog.amicoimmaginario.it/images/sortable.create.jpeg for a > screenshot > > could someone help me? > > Thanks in advance > > > >--~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
I was wondering if anyone might be able to shed some light on a problem I''ve encountered. Perhaps scroll could be used to help, but I''m not quite sure. I''m using two sortables, say "List A" which lists all dog breeds, and "List B" which lists the breeds that like to play fetch. These are common sortables, something like overflow-y:scroll with ul, li, no handles. For example, List A is quite long and has a scroll bar. List B has only one item and doesn''t need to scroll.>From List A, I scroll down and want to drag Weimaraner to List B. Thedrag is successful, but once the mouse has left List A and hovers over List B, all I can see is the cursor, cursor:move style. The dragged item is outside the viewable area of List B and can''t be seen. If I drag over to List B as described, and release the mouse, ''Weimaraner'' is dropped succesfully, but during the drag process I can''t see the text, and the position of the cursor related to the item being dragged are way out of whack. Any insight would be much appreciated. Thanks. On Mar 14, 8:22 am, Tom Gregory <t...-PGZyUNKar/Q@public.gmane.org> wrote:> You''re not using the ''scroll'' option, which does two things: it > allows the container to autoscroll when dragging, and lets the > Sortable know to allow forscrolloffsets when calculating relative > mouse position. > > Addscroll: ''s5_toc_content'' to your Sortable options. > > http://wiki.script.aculo.us/scriptaculous/show/Sortable.create > > TAG > > On Mar 14, 2007, at 4:08 AM, apaella wrote: > > > > > > > Hi *, > > I''m not able to make a correct "Sortable.create" whith a scrolling > > containers. > > > Please see @http://blog.amicoimmaginario.it/demo/s5generator/and try > > to drag''n''drop int the TOC (left sidebar) when the scrollbar is > > scrolled. The "ghost" marker create space beetween object in the wrong > > position. > > > seehttp://blog.amicoimmaginario.it/images/sortable.create.jpegfor a > > screenshot > > > could someone help me? > > > Thanks in advance- Hide quoted text - > > - Show quoted text ---~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Hey Matt, Have you tried leaving your <ul> styled normally, and putting it in a scrollable <div>? I know this approach usually works for my own Sortables. -- Christophe Porteneuve a.k.a. TDD "[They] did not know it was impossible, so they did it." --Mark Twain Email: tdd-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Thanks, I do have the ul''s in the scrollable div. I have published an example of the problem I''m seeing: http://mrigali.googlepages.com/draggage.html On page load, using the left scrollable div, scroll to the bottom, choose an item and start to drag it over. Once you have drug over to the div on the right, you can no longer see what you are dragging. If you don''t scroll the left div, the drag is perfect. Any help would be awesome. On Apr 21, 3:59 am, Christophe Porteneuve <t...-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org> wrote:> Hey Matt, > > Have you tried leaving your <ul> styled normally, and putting it in a > scrollable <div>? I know this approach usually works for my own Sortables. > > -- > Christophe Porteneuve a.k.a. TDD > "[They] did not know it was impossible, so they did it." --Mark Twain > Email: t...-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org--~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Thanks Christope, but I do have both of the lists in a scrollable div. So basically I have two scrollable divs to drag stuff between. If you have to scroll one list to find what you want to drag, you can''t see what you''re dragging. I have an example of the problem I''m seeing: http://mrigali.googlepages.com/draggage.html To replicate, use the left div and scroll to the bottom. Choose an item and start to drag it to the right. Once you have moved over the div on the right, you can no longer see what you are dragging. If you don''t scroll the left div, the drag is perfect. Any help would be awesome. On Apr 21, 3:59 am, Christophe Porteneuve <t...-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org> wrote:> Hey Matt, > > Have you tried leaving your <ul> styled normally, and putting it in a > scrollable <div>? I know this approach usually works for my own Sortables. > > -- > Christophe Porteneuve a.k.a. TDD > "[They] did not know it was impossible, so they did it." --Mark Twain > Email: t...-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org--~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
This issue comes up every month or so. What you''re experiencing is a "feature" with Sortables implementation, caused by the CSS spec. The draggable is a child of the list, which is scrollable. Thus, the drabble must necessarily be bound to the same scroll region as its parent. When you drag over to the new list, you''re altering it parent to be the new list. If you want to try and hack scriptaculous to get around this, the you''ll need to make the draggable a child of some element higher in the hierarchy than the list. There are some better ways to get the functionality you want w/o drag/ drop anyway. The simplest is to just use select boxes, with directional arrows in the middle (you can also have the list items respond to double-click events). If you''re wanting something more fancy, do a styled list with arrows to the right of each list item. Then all the user has to do is click to move the item over, rather than drag. It''s significantly more efficient if order doesn''t matter, especially when moving multiple items back and forth. TAG On May 1, 2007, at 3:07 PM, Matt wrote:> > Thanks Christope, but I do have both of the lists in a scrollable div. > So basically I have two scrollable divs to drag stuff between. If you > have to scroll one list to find what you want to drag, you can''t see > what you''re dragging. > > I have an example of the problem I''m seeing: > http://mrigali.googlepages.com/draggage.html > > To replicate, use the left div and scroll to the bottom. Choose an > item and start to drag it to the right. Once you have moved over the > div on the right, you can no longer see what you are dragging. > > If you don''t scroll the left div, the drag is perfect. > > Any help would be awesome. > > > On Apr 21, 3:59 am, Christophe Porteneuve <t...-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org> wrote: >> Hey Matt, >> >> Have you tried leaving your <ul> styled normally, and putting it in a >> scrollable <div>? I know this approach usually works for my own >> Sortables. >> >> -- >> Christophe Porteneuve a.k.a. TDD >> "[They] did not know it was impossible, so they did it." --Mark Twain >> Email: t...-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org > > > >--~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Thanks TAG, I appreciate the response. I did search around before posting, apologies to all for regurgitating a known feature. Also thanks for the work around suggestions, but we tried to push those options during the design phase. So they''ll get what they asked for! On May 1, 2:20 pm, Tom Gregory <t...-PGZyUNKar/Q@public.gmane.org> wrote:> This issue comes up every month or so. > > What you''re experiencing is a "feature" with Sortables > implementation, caused by the CSS spec. The draggable is a child of > the list, which is scrollable. Thus, the drabble must necessarily be > bound to the same scroll region as its parent. When you drag over to > the new list, you''re altering it parent to be the new list. If you > want to try and hack scriptaculous to get around this, the you''ll > need to make the draggable a child of some element higher in the > hierarchy than the list. > > There are some better ways to get the functionality you want w/o drag/ > drop anyway. The simplest is to just use select boxes, with > directional arrows in the middle (you can also have the list items > respond to double-click events). If you''re wanting something more > fancy, do a styled list with arrows to the right of each list item. > Then all the user has to do is click to move the item over, rather > than drag. It''s significantly more efficient if order doesn''t > matter, especially when moving multiple items back and forth. > > TAG > > On May 1, 2007, at 3:07 PM, Matt wrote: > > > > > > > Thanks Christope, but I do have both of the lists in a scrollable div. > > So basically I have two scrollable divs to drag stuff between. If you > > have to scroll one list to find what you want to drag, you can''t see > > what you''re dragging. > > > I have an example of the problem I''m seeing: > >http://mrigali.googlepages.com/draggage.html > > > To replicate, use the left div and scroll to the bottom. Choose an > > item and start to drag it to the right. Once you have moved over the > > div on the right, you can no longer see what you are dragging. > > > If you don''t scroll the left div, the drag is perfect. > > > Any help would be awesome. > > > On Apr 21, 3:59 am, Christophe Porteneuve <t...-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org> wrote: > >> Hey Matt, > > >> Have you tried leaving your <ul> styled normally, and putting it in a > >> scrollable <div>? I know this approach usually works for my own > >> Sortables. > > >> -- > >> Christophe Porteneuve a.k.a. TDD > >> "[They] did not know it was impossible, so they did it." --Mark Twain > >> Email: t...-x+CfDp/qHesRuZII/U6RgQ@public.gmane.org Hide quoted text - > > - Show quoted text ---~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
If you end up altering Sortables, I expect Thomas Fuchs would be interested in your patch. As you''re married to the drag/dop, may I suggest the following: If order in the list doesn''t matter, don''t use Sortables at all; make each li spawn a root-level Draggable on click, and make the two list (ul) tags Droppable. This will get around the scroll problems, and the script will be faster as there are fewer Droppables to iterate through. (The slowdown for Sortables is more pronounced as the lists get longer, because each list item is also a droppable.) Best of luck. TAG On May 2, 2007, at 9:48 AM, Matt wrote:> Thanks TAG, I appreciate the response. I did search around before > posting, apologies to all for regurgitating a known feature. > > Also thanks for the work around suggestions, but we tried to push > those options during the design phase. So they''ll get what they asked > for! > > On May 1, 2:20 pm, Tom Gregory <t...-PGZyUNKar/Q@public.gmane.org> wrote: >> This issue comes up every month or so. >> >> What you''re experiencing is a "feature" with Sortables >> implementation, caused by the CSS spec. The draggable is a child of >> the list, which is scrollable. Thus, the drabble must necessarily be >> bound to the same scroll region as its parent. When you drag over to >> the new list, you''re altering it parent to be the new list. If you >> want to try and hack scriptaculous to get around this, the you''ll >> need to make the draggable a child of some element higher in the >> hierarchy than the list. >> >> There are some better ways to get the functionality you want w/o >> drag/ >> drop anyway. The simplest is to just use select boxes, with >> directional arrows in the middle (you can also have the list items >> respond to double-click events). If you''re wanting something more >> fancy, do a styled list with arrows to the right of each list item. >> Then all the user has to do is click to move the item over, rather >> than drag. It''s significantly more efficient if order doesn''t >> matter, especially when moving multiple items back and forth. >> >> TAG--~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---