Hi, I''m trying to make a draggable resizable. <div id=''main_window''> <div id=''resizer''> </div> </div> <script type="text/javascript"> <%= draggable_element_js ''main_window'' %> <%= draggable_element_js ''resizer'' %> </script> Basically I want to bind the dragging movement of resizer to make the style.width and sytle.heigh properties of main_window change. Does anybody know how to do this? Should i use bind, bindAsEventListener, or should i override one of the properties of one of the draggables? Thanks for your suggestions and help. David :) --~--~---------~--~----~------------~-------~--~----~ 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 made such a beast a few years ago when I was teaching myself how to use Prototype/Scriptaculous. It''s a little kludgy but you can probably scoop a snippit of code that you''ll find useful. http://jameslab.moveable.com/ajaxio/ On Apr 11, 6:35 am, David Beckwith <dbitsoluti...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi, > > I''m trying to make a draggable resizable. > > <div id=''main_window''> > <div id=''resizer''> > </div> > </div> > > <script type="text/javascript"> > <%= draggable_element_js ''main_window'' %> > <%= draggable_element_js ''resizer'' %> > </script> > > Basically I want to bind the dragging movement of resizer to make the > style.width and sytle.heigh properties of main_window change. > > Does anybody know how to do this? Should i use bind, > bindAsEventListener, or should i override one of the properties of one > of the draggables? > > Thanks for your suggestions and help. > David :)--~--~---------~--~----~------------~-------~--~----~ 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 found that there is an option called "change" that allows you to set it to a function that will be called during the dragging state. For my resizer div, I override this function then change the ''main_window'' div''s width and height properties. It works nicely and only requires a few lines of code. On Apr 11, 6:30 am, Diodeus <diod...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I made such a beast a few years ago when I was teaching myself how to > use Prototype/Scriptaculous. It''s a little kludgy but you can probably > scoop a snippit of code that you''ll find useful. > > http://jameslab.moveable.com/ajaxio/ > > On Apr 11, 6:35 am, David Beckwith <dbitsoluti...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > Hi, > > > I''m trying to make a draggable resizable. > > > <div id=''main_window''> > > <div id=''resizer''> > > </div> > > </div> > > > <script type="text/javascript"> > > <%= draggable_element_js ''main_window'' %> > > <%= draggable_element_js ''resizer'' %> > > </script> > > > Basically I want to bind the dragging movement of resizer to make the > > style.width and sytle.heigh properties of main_window change. > > > Does anybody know how to do this? Should i use bind, > > bindAsEventListener, or should i override one of the properties of one > > of the draggables? > > > Thanks for your suggestions and help. > > David :)--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---