maintainAspectRatio

When scaleImage is enabled, maintainAspectRatio specifies that the overall proportions of the image are maintained during scaling. When disabled, the image will scale to the dimensions of the component boundary using the 9-cell method (see scale9).

Type

Boolean

true: keep proportions constant
false: allow image to fill component boundary

Example

Image1.maintainAspectRatio = false;

Either syntax below can be used in component script:

maintainAspectRatio           // unqualified
Image1.maintainAspectRatio    // qualified

For onInit/onRefresh scripts, and for component and property scripts on other components, the second (qualified) form is required.