Opened 10 years ago

Closed 7 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:1 Changed 9 years ago by nerik

Really obvious when you put an <img> inside the resizable, and add the img as alsoResize option.

Last edited 9 years ago by nerik (previous) (diff)

comment:2 Changed 9 years ago by Scott González

#6784 is a duplicate of this ticket.

comment:3 Changed 7 years ago by Scott González

Milestone: TBD2.0.0

comment:4 Changed 7 years ago by tj.vantoll

Milestone: 2.0.01.8.14
Resolution: fixed
Status: newclosed

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.

Note: See TracTickets for help on using tickets.