Sebastian, Colin, There's a floating window class built on top of Prototype here
http://prototype-window.xilinus.com/samples.html That can be resized by drag and drop. I've only looked at this as a gormless end user and thought "wow, that's really neat", so I can't comment on how they've done it, but you might like to point Firebug at it and get a few tips. HTH Dave On Wednesday 14 February 2007 19:05, Colin Mollenhour wrote: > It seems the simplest (nay, most oft used, perhaps it isn't the > simplest) solution is to create the border out of separate elements > altogether and observe those for mousedown, but I suppose you could do > some boundary checking on mousedown for the entire element and if the > mouse is a certain distance from the edges you could then create a > mousemove event which would track the mouse and do the resizing. You'd > have to figure out which edge was clicked, and then make sure you do the > resizing in the correct direction (i.e. the opposing edges wouldn't > move). Also, one disadvantage to this single-element method would be > that you couldn't simply set the CSS cursor property for the draggable > edges to cue the user that it is resizable, but you could observe > mousemove on the mouseover and change it dynamically... Sounds slow.. > So if you are looking for a solution that is as simple as making the > element draggable was, the short answer is I don't think there is one > currently, but I'd love to see a class that adds this functionality in > the same style Draggable does, perhaps using the border-width property > to automatically set the bounds checking variables.. Anyone know why > this wouldn't work? > > Colin > > Sebastian Kurt wrote: > > Hi, > > yesterday i build up some boxes(DIVs) an meke them draggable. It was > > so easy an fast implemented, great choice to use script.aculo.us! > > but now i tried to figure out if it ist poosible to resize a draggable > > div with the mouse by clicking on the border an dragging with > > keypressed to the new size. is it possible to do so on a not draggable- > > element? > > > > http://hoodrich.skurt.de/ > > > > thx, sebastian > > > > > -- > This email has been verified as Virus free > Virus Protection and more available at http://www.plus.net -- ---------------------- Author Ajax in Action http://manning.com/crane Ajax in Practice http://manning.com/crane2 Prototype & Scriptaculous Quickly http://manning.com/crane3 --~--~---------~--~----~------------~-------~--~----~ 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 [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
