Chamnap
2007-Dec-14 02:05 UTC
How to make a div draggable within the content area of the body?
Hi, I want to make a div draggable within the content area of the browser. Do you all think it is possible? Can you show me? Thanks Chamnap --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Nicolás Sanguinetti
2007-Dec-14 11:32 UTC
Re: How to make a div draggable within the content area of the body?
Have you read the documentation for Draggables? http://wiki.script.aculo.us/scriptaculous/show/Draggable Best, -Nicolas On Dec 14, 2007 12:05 AM, Chamnap <chamnapchhorn-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > Hi, I want to make a div draggable within the content area of the > browser. Do you all think it is possible? Can you show me? > > Thanks > Chamnap > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Chamnap
2007-Dec-15 04:45 UTC
Re: How to make a div draggable within the content area of the body?
Well, I have go through it, but I didn''t found any information how to achieve that. Can you show me? Thanks Chamnap --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Nicolás Sanguinetti
2007-Dec-15 04:50 UTC
Re: How to make a div draggable within the content area of the body?
On Dec 15, 2007 2:45 AM, Chamnap <chamnapchhorn-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > Well, I have go through it, but I didn''t found any information how to > achieve that. Can you show me?new Draggable(''the_draggable_div_id'');> Thanks > Chamnap > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Chamnap
2007-Dec-15 04:55 UTC
Re: How to make a div draggable within the content area of the body?
Well, maybe you are misunderstanding my post. I mean I want to allow the user drag an element within the content area of browser only if the page of dimension of the browser: 1024 * 692. That''s mean the user cannot extend their dragging over that area. Should I use the change event of draggable instance variables? Thanks Chamnap --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Ken Snyder
2007-Dec-15 13:43 UTC
Re: How to make a div draggable within the content area of the body?
On 12/14/07, Chamnap <chamnapchhorn-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Well, maybe you are misunderstanding my post. I mean I want to allow > the user drag an element within the content area of browser only if > the page of dimension of the browser: 1024 * 692. That''s mean the user > cannot extend their dragging over that area. Should I use the change > event of draggable instance variables?I think you need to use a snap function along with Position.overlap(). It would be pretty complicated I think because you would have to calculate the return x, y without knowing exactly where on the handle the user is dragging. - Ken --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---