Ticket #4951 (closed bug: fixed)
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
Change History
comment:1 Changed 4 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:3 Changed 2 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 2 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


