View Full Version : Ext.Resizable aspect ratio

21 Jan 2011, 6:52 AM
How can I set the aspect ratio in Ext.Resizable? I see an option called preserveRatio, but that appears to be boolean (as opposed to numeric/string). I was hoping to be able to specify 1 for square, 1.333 for 4:3, etc.


- Joe

21 Jan 2011, 7:01 AM
From the docs (http://dev.sencha.com/deploy/dev/docs/?class=Ext.Resizable&member=preserveRatio):

...preserve the original ratio between height and width...

So it will be 1 for a square, 1.333 for 4:3 if that is the original height/width ratio.

21 Jan 2011, 7:19 AM
Thanks, I saw that, but I'm not looking to PRESERVE the aspect ratio of the original image I want to SET the aspect ratio of the resize handles (to say, force the resized image to be square for example).\