Hi, I just set up a page using the script.aculo.us Sortable object. I''m using this on 1:n related records. So on one page, there are some container elements with several items that are "sortable". Example: * Hotel 1 * Offer 1 * Ofer 2 * Hotel 2 * Offer 3 * Offer 4 * Offer 5 The sorting of the items (in the example "Offer"), should only be possible within the parent object ("Hotel" in the example). But on using the Sortable object of script.aculo.us allows to drag and move around an item elsewhere. So is there a function/option to define a boundary for dragging/moving an item. It should only be possible within one of the parent containers (withing a "Hotel" object in the example). Thanks in advance! olly --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
You''re looking for the ''snap'' callback. There''s a good example of this in the repository: scriptaculous/test/ functional/dragdrop6_test.html And ... this question has been answered several times in the last month. Please take a moment to search the archives next time. =) TAG On Nov 1, 2006, at 6:10 AM, olly wrote:> > Hi, > > I just set up a page using the script.aculo.us Sortable object. I''m > using this on 1:n related records. So on one page, there are some > container elements with several items that are "sortable". > > Example: > * Hotel 1 > * Offer 1 > * Ofer 2 > * Hotel 2 > * Offer 3 > * Offer 4 > * Offer 5 > > The sorting of the items (in the example "Offer"), should only be > possible within the parent object ("Hotel" in the example). But on > using the Sortable object of script.aculo.us allows to drag and move > around an item elsewhere. > > So is there a function/option to define a boundary for dragging/moving > an item. It should only be possible within one of the parent > containers > (withing a "Hotel" object in the example). > > Thanks in advance! > > > olly > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Hi Tom, thank you very much for the hint. I don''t have much experience with script.aculo.us yet, but I''m comming from the Java/Java3D corner - and so I was looking for "boundary", "bounding" (like "BoundingSphere" does for 3D objects in Java) - well I just missed the right name of that function =) The file you told me, was exactly the topic I was looking for. Thanks again! olly --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---