Opened 14 years ago
Last modified 10 years ago
#3276 open bug
"AlsoResize" should be relative to this.element
Reported by: | anonymous | Owned by: | eduardo |
---|---|---|---|
Priority: | minor | Milestone: | 2.0.0 |
Component: | ui.resizable | Version: | 1.6b |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
The element '.ui-resizable-also' in the example below should be relative to this.element just like the ui-resizable-handle.
$('ui-resizable').resizable({alsoResize: '.ui-resizable-also'});
Using the workaround below doesn't work (get an exception in _start):
$('.ui-resizable').each(function(){ $(this).resizable({alsoResize: $('.ui-resizable-also', this)}); });
My patch is:
--- ui.resizable.orig.js 2008-08-18 11:34:59.673873000 +0100 +++ ui.resizable.js 2008-09-01 20:25:13.702663000 +0100 @@ -730,7 +730,7 @@
if (o.alsoResize.length) { o.alsoResize = o.alsoResize[0]; _store(o.alsoResize); } else { $.each(o.alsoResize, function(exp, c) { _store(exp); }); }
}else{
- _store(o.alsoResize);
+ _store($(o.alsoResize, this.element));
}
},
@@ -758,7 +758,7 @@
if (typeof(o.alsoResize) == 'object') {
$.each(o.alsoResize, function(exp, c) { _alsoResize(exp, c); });
}else{
- _alsoResize(o.alsoResize);
+ _alsoResize($(o.alsoResize, this.element));
}
},
Change History (6)
comment:1 Changed 14 years ago by
Milestone: | TBD → 1.next |
---|
comment:2 Changed 13 years ago by
Milestone: | 1.next → 1.8 |
---|
comment:4 Changed 10 years ago by
Milestone: | 1.9.0 → 2.0.0 |
---|
comment:5 Changed 10 years ago by
@scott.gonzalez Not sure if you remember this from 3 years ago but I'm curious how this is different from #4666. It seems that they're saying the exact same thing, should one be closed as a duplicate?
comment:6 Changed 10 years ago by
Status: | new → open |
---|
This ticket is about the other element being contained inside the resizable, while #4666 is about being able to resize more than just one element. They're only kind of related, I'm not sure why I felt it was important to link the tickets, other than the fact that they affect the same option.
My suggested solution for #4957 would make selectors search within the resizable element, which would give the requested behavior; but it would also make the option accept a function which would allow resizing elements outside of the resizable element. Based on that, I'm inclined to mark this as valid, though I'd like to review all the places where we accept selectors and see how consistent we are.
Depends on #4957.