Skip to main content

Search and Top Navigation

#2291 closed bug (fixed)

Opened February 07, 2008 11:15AM UTC

Closed February 11, 2008 02:56AM UTC

Last modified February 26, 2009 11:25AM UTC

resizable: redundant options? (o.aspectRatio / o.ratio)

Reported by: c_t Owned by: eduardo
Priority: major Milestone: 1.5
Component: ui.core Version: 1.2.2
Keywords: Cc:
Blocked by: Blocking:
Description

As far as I understand the code if I want a resizable to preserve its aspect ratio I have to specify o.aspectRatio = true .

If I want to force a specific aspectRatio I have to additionaly specify the option e.g. o.ratio = 0.5 .

I think one option would be enough and suggest the following behaviour:

  • o.aspectRatio = false -> Aspect ratio is not preserved
  • o.aspectRatio = true -> On the first resize the aspect ratio is calculated from the element's dimensions and stored internally. I would not recommend recalculating the aspect ratio on every resize since this will lead to rounding errors after some resizes.
  • o.aspectRatio = float -> If a floating point number is given that aspect ratio is forced upon the first resize.

To summarize I think there should not be an additional o.ratio-option but the o.aspectRatio option should be used to control everything concerning the aspectRatio-preservation.

Attachments (0)
Change History (4)

Changed February 08, 2008 04:21PM UTC by paul comment:1

owner: paulbraeker

Changed February 11, 2008 02:56AM UTC by braeker comment:2

resolution: → fixed
status: newclosed

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

milestone: 1.2.3

Milestone 1.2.3 deleted

Changed February 26, 2009 11:25AM UTC by paul comment:4

milestone: → 1.5