Ticket #4951 (closed bug: fixed)

Opened 5 years ago

Last modified 3 years ago

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:
Blocking: Blocked by:

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

jquery_resizable_aspect_and_maxwidth.html Download (1.2 KB) - added by DEfusion 5 years ago.

Change History

Changed 5 years ago by DEfusion

comment:1 Changed 5 years ago by DEfusion

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

comment:2 Changed 5 years ago by joern.zaefferer

  • Milestone changed from TBD to 1.8

comment:3 Changed 3 years ago by Jeff Remy

  • Status changed from new to closed
  • Resolution set to fixed

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

comment:4 Changed 3 years ago by Jeff Remy

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

comment:5 Changed 3 years ago by scott.gonzalez

  • Milestone changed from 1.9 to 1.8.14
Note: See TracTickets for help on using tickets.