This jQuery plugin, which lets users draw rectangles in a div, works with jQueryUI 1.7.2.
I need to get it working with jQueryUI 1.8.4. From reading the widget upgra
The $.widget
signature changed to do the extend internally, so change this:
$.widget("ui.boxer", $.extend({}, $.ui.mouse, {
To this:
$.widget("ui.boxer", $.ui.mouse, {
And at the bottom, remove the extra )
as well, changing }));
to });
Also, to get the default options, it's best to move them right inside, like this:
$.widget("ui.boxer", $.ui.mouse, {
options: {
appendTo: 'body',
distance: 0
},
///rest of widget, unchanged...
});
Here's a sample of the updated version with only the changes above, working.