Hi Richard, Could you explain a little bit about these lines (esp. the appendTo and distance)
$.extend($.ui.boxer, { defaults: $.extend({}, $.ui.mouse.defaults, { appendTo: 'body', distance: 0 }) }); I put the code to my page and the after I released the mouse, the orange box is not at the position I started drawing. Moreover, the x and y are undefined, but the width and height seem correct. Thank you very much. On Aug 21, 4:08 pm, "Richard D. Worth" <rdwo...@gmail.com> wrote: > Here's a slightly improved version. Thanks @cioa <http://twitter.com/cioa> > demo:http://jsbin.com/azare > > code:http://jsbin.com/azare/edit > > - Richard > > On Fri, Aug 21, 2009 at 3:59 PM, Richard D. Worth <rdwo...@gmail.com> wrote: > > > Here's how you can do that with a quick plugin built on top of ui.mouse, > > which is part of jQuery UI core: > >http://jsbin.com/aqowa > > > This is based on the jQuery UI > > Selectable<http://jqueryui.com/demos/selectable/> interaction > > plugin, which draws a rectangle lasso as you drag to select elements. > > > - Richard > > > On Fri, Aug 21, 2009 at 3:00 PM, juanefren <juanef...@gmail.com> wrote: > > >> Is there any plugin to let the user draw rectangles (probabbly with > >> mouse clicks or key-arrows) and store the coordinates in a hidden > >> variable ?