Ticket #4199 (closed bug: fixed)

Opened 7 years ago

Last modified 7 years ago

resizable with containment boundary - aspectRatio breaks.

Reported by: tcarnell Owned by:
Priority: critical Milestone: 1.7.1
Component: ui.resizable Version: 1.6rc6
Keywords: resizable containment aspectRatio Cc:
Blocking: Blocked by:


I have a resizable div with the following options set:

  • handles:'n,ne,nw,s,se,sw,e,w'
  • autoHide:true,[[BR]]
  • aspectRatio:widgetState.maintainAspectRatio,[[BR]]
  • grid:[10px,10px],
  • containment:"#container",
  • start: function(e, ui) {...},
  • stop: function(e, ui) {...}

However as I enlarge the div in both x & y axis, if one of the axis reaches the boundary of the container the div should stop expanding (to maintain aspect ratio), but the div continues to expand along the other axes, thus breaking the aspect ratio.

Change History

comment:1 Changed 7 years ago by scott.gonzalez

  • Priority changed from major to critical
  • Milestone changed from TBD to 1.7

comment:2 Changed 7 years ago by tcarnell

sorry, to make it clearer:

  • aspectRatio:true

comment:3 Changed 7 years ago by raziel057

Could you look at JCrop source ->  http://deepliquid.com/projects/Jcrop/demos.php?demo=thumbnail ?

Resizing with ratio seems to be very efficient.

comment:4 Changed 7 years ago by rdworth

  • Milestone changed from 1.7 to 1.8

comment:6 Changed 7 years ago by rdworth

Duplicate ticket #4349 contains patch.

comment:7 Changed 7 years ago by rdworth

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

Fixed in r2299

comment:8 Changed 7 years ago by rdworth

  • Milestone changed from 1.8 to 1.7.1

Merged to 1.7.1 in r2324 and r2325

Note: See TracTickets for help on using tickets.