springroll.ScaleItem Class

Module: UI

A single UI item that needs to be resized, this is an internal class that you would not need to interact with.

destroy

()

Defined in destroy:373

Destroy this item, don't use after this

resize

(
  • displayWidth
  • displayHeight
)

Defined in resize:224

Adjust the item scale and position, to reflect new screen

Parameters:

  • displayWidth Number

    The current screen width

  • displayHeight Number

    The current screen height

_adapter

Object private

Defined in _adapter:88

The adapter for universal scale, rotation size access

_display

PIXI.DisplayObject | createjs.DisplayObject private

Defined in _display:74

The reference to the interface item we're scaling

_size

Object private

Defined in _size:81

The original screen the item was designed for

centeredHorizontally

Boolean

If the UI element is centered horizontally

Default: false

display

PIXI.DisplayObject | createjs.DisplayObject

Defined in display:211

Get the current display item

horiAlign

String

Defined in horiAlign:38

What horizontal screen location the item should be aligned to: "left", "center", "right"

maxScale

Number

Defined in maxScale:53

Maximum scale allowed in physical size

Default: 1

minScale

Number

Defined in minScale:60

Minimum scale allowed in physical size

Default: 1

origBounds

Object

Defined in origBounds:112

The original bounds of the item with x, y, right, bottom, width, height properties. This is converted from local bounds to scaled bounds.

origMarginHori

Number

Defined in origMarginHori:147

Original horizontal margin in pixels

Default: 0

origMarginVert

Number

Defined in origMarginVert:154

Original vertical margin in pixels

Default: 0

origScaleX

Number

Defined in origScaleX:98

Original X scale of the item

Default: 0

origScaleY

Number

Defined in origScaleY:105

The original Y scale of the item

Default: 0

titleSafe

Boolean | String

Defined in titleSafe:44

If this element should be aligned to the title safe area, not the actual screen. Values of "horizontal" and "vertical" make the title safe calculations take place only for one direction.

Default: false

vertAlign

String

Defined in vertAlign:32

What vertical screen location the item should be aligned to: "top", "center", "bottom"