Opened 13 years ago
Closed 10 years ago
#5208 closed bug (duplicate)
cannot set the aspectRatio to or from false after init
Reported by: | daninmanchester | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 2.0.0 |
Component: | ui.resizable | Version: | 1.7.2 |
Keywords: | init, aspectRatio | Cc: | |
Blocked by: | Blocking: |
Description
If the aspectRatio is false at init it cannot be set after init.
If the aspectRation is set to a value at init it cannot be set to false after init.
If I use this : $("#Selected").resizable({containment: 'parent', aspectRatio:1}); this does not work : $('#Selected').resizable('option', 'aspectRatio', false) and vice versa
Change History (5)
comment:1 Changed 13 years ago by
Milestone: | TBD → 1.next |
---|
comment:2 Changed 13 years ago by
comment:3 Changed 13 years ago by
One more time. Wiki messed up the brackets around _mouseStart
$(function() {
$.extend($.ui.resizable.prototype, (function (orig) {
return {
_mouseStart: function (event) {
this._aspectRatio = !!(this.options.aspectRatio);
return(orig.call(this, event));
}
};
})($.ui.resizable.prototype["_mouseStart"]));
});
comment:4 Changed 10 years ago by
Milestone: | 1.next → 2.0.0 |
---|
I used the following code to fix this in 1.8rc3: $(function() {
});
I mostly copied the method of the fix from somewhere else, so not sure if its the proper way.