Opened 13 years ago
Closed 10 years ago
#5594 closed bug (fixed)
aspect ratio is not preserved
Reported by: | nanmeng | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 1.8.14 |
Component: | ui.resizable | Version: | 1.7.2 |
Keywords: | aspect ratio | Cc: | |
Blocked by: | Blocking: |
Description
The aspect ratio of the target is not really preserved when {aspectRatio:true} is set. I'm using FF 3.5.9, but I don't think it's a browser-specific issue.
For example, with aspectRatio set to true, if you resize a square target, you'll notice the slight change in the target's aspect ratio; if you resize the target back and forth quickly for a few times, the target's aspect ratio can be changed dramatically.
Change History (4)
comment:3 Changed 10 years ago by
Milestone: | TBD → 2.0.0 |
---|
comment:4 Changed 10 years ago by
Milestone: | 2.0.0 → 1.8.14 |
---|---|
Resolution: | → fixed |
Status: | new → closed |
This was fixed in jQuery UI 1.8.14. You can verify this by playing with the version #'s in this test case - http://jsfiddle.net/tj_vantoll/cE9rJ/. Pre 1.8.14 the resize event will log different values for the height and width but after 1.8.14 they will be consistent. This is no longer an issue in the latest version of jQuery UI (1.9.1) either.
I believe that this was the issue (http://bugs.jqueryui.com/ticket/4951) and commit (https://github.com/jquery/jquery-ui/commit/b196d1fb611a4fa627a29e3ff973148ccbe00dfe) responsible.
Really obvious when you put an <img> inside the resizable, and add the img as alsoResize option.