Class: TiledRowsLayout

TiledRowsLayout

TiledRowsLayout

new GOWN.layout.TiledRowsLayout()

Tiled rows Layout (roughly based on starling TiledRowsLayout)

Extends

Members

gapNumber

Quickly sets both horizontalGap and verticalGap to the same value. The gap getter always returns the value of horizontalGap, but the value of verticalGap may be different.
Default Value:
  • 0
See:

readonlyneedUpdate

Indicates if the layout needs to be rearranged.

paddingNumber

Shortcut to set all paddings (left, right, top, bottom)
Default Value:
  • 0

paddingBottomNumber

The minimum space, in pixels, below the items.
Default Value:
  • 0

paddingLeftNumber

The space, in pixels, that appears to the left, before the first item.
Default Value:
  • 0

paddingTopNumber

The minimum space, in pixels, above the items.
Default Value:
  • 0

useSquareTilesbool

Use the same width and height for tiles (calculated by biggest square)
Default Value:
  • false

Methods

inherited layout(items, maxWidth, maxHeight)

Position (and possibly resize) the supplied items.
Name Type Description
items Array The items that will be layouted
maxWidth Number The maximum width for the items
maxHeight Number The maximum height for the items
Returns:
Number[] The width and height

inherited layoutContainer(container)

Calculate the layout for a container (and its children)
Name Type Description
container The container to calculate the layout for
Returns:
Number[] The width and height