Positioner Class
Initially layouts all interface elements
Item Index
Methods
- generateHitArea static
- positionItems static
Methods
generateHitArea
(
Object
static
-
hitArea
-
scale=1
Create the polygon hit area for interface elements
Parameters:
-
hitArea
Object | ArrayOne of the following:
An array of points for a polygon, e.g.
[{x:0, y:0}, {x:0, y:20}, {x:20, y:0}]
An object describing a rectangle, e.g.
{type:"rect", x:0, y:0, w:10, h:30}
An object describing an ellipse, where x and y are the center, e.g.
{type:"ellipse", x:0, y:0, w:10, h:30}
An object describing a circle, where x and y are the center, e.g.
{type:"circle", x:0, y:0, r:20}
-
scale=1
NumberThe size to scale hitArea by
Returns:
Object:
A geometric shape object for hit testing, either a Polygon, Rectangle, Ellipse, or Circle, depending on the hitArea object. The shape will have a contains() function for hit testing.
positionItems
(
static
-
parent
-
itemSettings
Initial position of all layout items
Parameters:
-
parent
createjs.DisplayObject | PIXI.DisplayObject -
itemSettings
ObjectJSON format with position information