Bug Tracker

Modify

Ticket #1712 (closed enhancement: fixed)

Opened 7 years ago

Last modified 7 years ago

aspectRatio option for resizables

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

Description

Hi All!

I have written a small enhancement for the resizables (see attachment).

Now there is one additional configuration option aspectRatio. You can either set this to 'preserve' or to any floating point number defining an aspect ratio between width/height .

If set to preserve the aspect ratio is calculated from the initial width and height of the resizable element.

Pressing the shift-key now simply enables the aspectRatio: preserve option temporarily.

I'd love to see this enhancement in the next release!

Cheers, Christoph

Attachments

resizable_aspectRatio.diff Download (2.7 KB) - added by c_t 7 years ago.
aspectRatio option for resizables.

Change History

Changed 7 years ago by c_t

aspectRatio option for resizables.

comment:1 Changed 7 years ago by paul

  • Owner set to paul
  • Status changed from new to assigned

comment:2 Changed 7 years ago by paul

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

It's strange...somehow I was able to remove all checks in the switch block, and it still works. Only the ons with left/top modified, too don't work correctly, I don't know yet how to easily fix it.

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.