Opened 16 years ago

Closed 16 years ago

Last modified 15 years ago

#1708 closed enhancement (notabug)

ratio-option for resizables

Reported by: c_t Owned by:
Priority: major Milestone:
Component: ui.core 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

Change History (4)

comment:1 Changed 16 years ago by c_t

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...

comment:2 Changed 16 years ago by c_t

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.

comment:3 Changed 16 years ago by paul

Resolution: invalid
Status: newclosed

comment:4 Changed 15 years ago by (none)

Milestone: 1.2.2

Milestone 1.2.2 deleted

Note: See TracTickets for help on using tickets.