Skip to main content

Search and Top Navigation

#1708 closed enhancement (notabug)

Opened September 21, 2007 04:05PM UTC

Closed September 24, 2007 04:19PM UTC

Last modified May 24, 2008 03:39AM UTC

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:
Description

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 (4)

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

if(e.shiftKey)

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: http://dev.jquery.com/ticket/1711

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

Changed May 24, 2008 03:39AM UTC by comment:4

milestone: 1.2.2

Milestone 1.2.2 deleted