Skip to main content

Search and Top Navigation

#4951 closed bug (fixed)

Opened November 11, 2009 02:38PM UTC

Closed May 26, 2011 11:10PM UTC

Last modified May 26, 2011 11:11PM UTC

Resizable with aspectRatio true & a maxWidth doesn't obey ratio once hit max width

Reported by: DEfusion Owned by:
Priority: minor Milestone: 1.8.14
Component: ui.resizable Version: 1.7.2
Keywords: Cc:
Blocked by: Blocking:
Description

If you create a resizable and provide it with the following options:

$("#test").resizable({
    aspectRatio: true,
    maxWidth: 500
});

Then once the resizable gets to the maxWidth the height continues to resize ignoring the aspectRatio.

However providing the maxHeight option (instead of maxWidth) does obey the aspect and stops resizing both axes when hitting the maxHeight.

See the attached example which demonstrates the bug.

Attachments (1)
Change History (5)

Changed November 11, 2009 02:50PM UTC by DEfusion comment:1

A few more details:

When setup with aspectRatio true & maxWidth

  • Dragging south-east handle causes issue (after hitting max width)
  • Dragging south handle causes issue (after hitting max width) and seems to break the original aspect ratio (e.g. drag so out of proportion and then drag another handle and uses new aspect ratio)
  • Dragging east handle ''does not cause issue''

When setup with aspectRatio true & maxHeight

  • Dragging east handle causes issue (after hitting max height) and produces same secondary bug as dragging south handle above.
  • Dragging south handle ''does not cause issue''
  • Dragging south-east handle ''does not cause issue''

Changed November 17, 2009 02:26PM UTC by jzaefferer comment:2

milestone: TBD1.8

Changed May 26, 2011 11:10PM UTC by Jeff Remy comment:3

resolution: → fixed
status: newclosed

Resizable: correct aspectRatio handling with min/max dimensions. Fixed #4951 - Resizable with aspectRatio true & a maxWidth doesn't obey ratio once hit max width.

Changeset: 981e96948f45e5c5c32d005e379a5030c98c3d8d

Changed May 26, 2011 11:11PM UTC by Jeff Remy comment:4

Resizable: correct aspectRatio handling with min/max dimensions. Fixed #4951 - Resizable with aspectRatio true & a maxWidth doesn't obey ratio once hit max width.

(cherry picked from commit 981e96948f45e5c5c32d005e379a5030c98c3d8d)

Changeset: b196d1fb611a4fa627a29e3ff973148ccbe00dfe

Changed May 26, 2011 11:11PM UTC by scottgonzalez comment:5

milestone: 1.91.8.14