springroll.ScaleItem Class
A single UI item that needs to be resized,
this is an internal class that you would not need to interact with.
destroy
()
Destroy this item, don't use after this
resize
(
-
displayWidth
-
displayHeight
)
Adjust the item scale and position, to reflect new screen
Parameters:
-
displayWidth
Number
-
displayHeight
Number
The current screen height
_adapter
Object
private
The adapter for universal scale, rotation size access
_display
PIXI.DisplayObject | createjs.DisplayObject
private
The reference to the interface item we're scaling
_size
Object
private
The original screen the item was designed for
centeredHorizontally
Boolean
If the UI element is centered horizontally
Default: false
display
PIXI.DisplayObject | createjs.DisplayObject
Get the current display item
horiAlign
String
What horizontal screen location the item should be aligned to: "left", "center", "right"
maxScale
Number
Maximum scale allowed in physical size
Default: 1
minScale
Number
Minimum scale allowed in physical size
Default: 1
origBounds
Object
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
Original horizontal margin in pixels
Default: 0
origMarginVert
Number
Original vertical margin in pixels
Default: 0
origScaleX
Number
Original X scale of the item
Default: 0
origScaleY
Number
The original Y scale of the item
Default: 0
titleSafe
Boolean | String
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
What vertical screen location the item should be aligned to: "top", "center", "bottom"