Skip to main content

Bug Tracker

Side navigation

#1708 closed enhancement (invalid)

Opened September 21, 2007 04:05PM UTC

Closed September 24, 2007 04:19PM UTC

ratio-option for resizables

Reported by: c_t Owned by:
Priority: major Milestone: 1.2.2
Component: ui Version: 1.2.1
Keywords: Cc:
Blocked by: Blocking:

Hi Guys!

It would be great to have a ratio-option for resizables like interface had. One common usecase for resizables is for example an image-cropper. In that case defining a ratio of width and height can be necessary. I would love to see such an option in the next release! I just don't have any idea which changes are necessary in ui.resizable.js ...

Thanks, Christoph

Attachments (0)
Change History (3)

Changed September 21, 2007 04:24PM UTC by c_t comment:1

Oh well, the solution seems a lot easier than I thought! I just realized that the feature I requested basically is already integrated! It's exactly the behaviour that the resizables has while the shift-key is pressed. So what do you think about introducing a boolean option such as ''constraint'' and then just doing

if(e.shiftKey || o.constraint)

instead of


I think this would be very useful and very easy to integrate though. By the way: The behaviour of the shift-key should be mentioned in the docs!

And the behaviour of the N, S, NE and NW handles is still buggy when the shift-key is pressed. I will try to figure out what the problem is...

Changed September 22, 2007 08:38AM UTC by c_t comment:2

OK, I figured out what was going wrong with the calculations when the shift-key was pressed. However, since this issue has not much to do with what I described in this ticket, I created a new bug-ticket:

I will add a constraint option now and create a new ticket for that. You can mark this ticket as invalid or wontfix.

Changed September 24, 2007 04:19PM UTC by paul comment:3

resolution: → invalid
status: newclosed