Skip to main content

Search and Top Navigation

#5594 closed bug (fixed)

Opened May 07, 2010 03:05PM UTC

Closed October 28, 2012 02:17AM UTC

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.

Attachments (0)
Change History (4)

Changed January 03, 2011 12:27PM UTC by nerik comment:1

_comment0: Really obvious when you put an <img> inside the resizable.1294057702043812

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

Changed January 03, 2011 01:58PM UTC by scottgonzalez comment:2

#6784 is a duplicate of this ticket.

Changed October 11, 2012 09:07PM UTC by scottgonzalez comment:3

milestone: TBD2.0.0

Changed October 28, 2012 02:17AM UTC by tj.vantoll comment:4

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.