hi, This is kind of mainly a scriptacolous q so if ther is a more appropriate place to ask this question then let me know. I''m working with sortables. I''ve set constraint to be flase as i want my list to be sortable in both directions. Problem is when i try to drag an element vertically it doesn''t go where it''s supposed to. Some times the element goes one left of where it was dragged to, sometimes it messes the order up completely. See http://play.boudaki.com. The example at the bottom of this page with the images illustrates the problem. Can i improve this? --~--~---------~--~----~------------~-------~--~----~ 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 don''t think Sortable was designed with floats and a grid in mind (at least not your application of it). On May 19, 6:08 pm, elduderino <jamesfiltn...-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote:> hi, > > This is kind of mainly a scriptacolous q so if ther is a more > appropriate place to ask this question then let me know. > > I''m working with sortables. I''ve set constraint to be flase as i want > my list to be sortable in both directions. Problem is when i try to > drag an element vertically it doesn''t go where it''s supposed to. Some > times the element goes one left of where it was dragged to, sometimes > it messes the order up completely. Seehttp://play.boudaki.com. The > example at the bottom of this page with the images illustrates the > problem. > > Can i improve this?--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Why not? There is a scripty demo that does something similar. http://github.com/madrobby/scriptaculous/wikis/puzzle-demo TAG On May 20, 2008, at 2:15 PM, Diodeus wrote:> > I don''t think Sortable was designed with floats and a grid in mind (at > least not your application of it). > > On May 19, 6:08 pm, elduderino <jamesfiltn...-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote: >> hi, >> >> This is kind of mainly a scriptacolous q so if ther is a more >> appropriate place to ask this question then let me know. >> >> I''m working with sortables. I''ve set constraint to be flase as i want >> my list to be sortable in both directions. Problem is when i try to >> drag an element vertically it doesn''t go where it''s supposed to. Some >> times the element goes one left of where it was dragged to, sometimes >> it messes the order up completely. Seehttp://play.boudaki.com. The >> example at the bottom of this page with the images illustrates the >> problem. >> >> Can i improve this? > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On Mon, May 19, 2008 at 5:08 PM, elduderino <jamesfiltness-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote:> I''m working with sortables. I''ve set constraint to be flase as i want > my list to be sortable in both directions.Is that code in your sortable.js file? I don''t see the constraint option being passed in. Try it like this: Sortable.create(''sortableImages'', {tag:''img'', constraint:false, overlap:''horizontal''}) On Tue, May 20, 2008 at 3:15 PM, Diodeus <diodeus-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I don''t think Sortable was designed with floats and a grid in mind (at > least not your application of it).I use sortables with floats quite often, that''s the ideal usage imo. -justin --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Haha, have you ever tried doing that puzzle? It does exactly what i mentioned. It''s fine horizontally but as soon as you order vertically the other pieces, other than the one you''re dragging move. Might have to develop my own solution using the native drag and drop....unless anyones got any bright ideas On May 20, 10:09 pm, "Justin Perkins" <justinperk...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On Mon, May 19, 2008 at 5:08 PM, elduderino > > <jamesfiltn...-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote: > > I''m working with sortables. I''ve set constraint to be flase as i want > > my list to be sortable in both directions. > > Is that code in your sortable.js file? I don''t see the constraint > option being passed in. Try it like this: > > Sortable.create(''sortableImages'', {tag:''img'', constraint:false, > overlap:''horizontal''}) > > On Tue, May 20, 2008 at 3:15 PM, Diodeus <diod...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > I don''t think Sortable was designed with floats and a grid in mind (at > > least not your application of it). > > I use sortables with floats quite often, that''s the ideal usage imo. > > -justin--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---