Class: Layout

Layout

Layout

new GOWN.layout.Layout()

Basic layout stub - see GOWN.LayoutAlignment

Members

static,readonlyGOWN.layout.Layout.ALIGN_JUSTIFYString

Alignment justified

static,readonlyGOWN.layout.Layout.HORIZONTAL_ALIGN_CENTERString

If the total item width is smaller than the width of the bounds, the items will be aligned to the center.

static,readonlyGOWN.layout.Layout.HORIZONTAL_ALIGN_LEFTString

If the total item width is smaller than the width of the bounds, the items will be aligned to the left.

static,readonlyGOWN.layout.Layout.HORIZONTAL_ALIGN_RIGHTString

If the total item width is smaller than the width of the bounds, the items will be aligned to the right.

static,readonlyGOWN.layout.Layout.VERTICAL_ALIGN_BOTTOMString

If the total item height is smaller than the height of the bounds, the items will be aligned to the bottom.

static,readonlyGOWN.layout.Layout.VERTICAL_ALIGN_MIDDLEString

If the total item height is smaller than the height of the bounds, the items will be aligned to the middle.

static,readonlyGOWN.layout.Layout.VERTICAL_ALIGN_TOPString

If the total item height is smaller than the height of the bounds, the items will be aligned to the top.

gapNumber

The space, in pixels, between items.
Default Value:
  • 0

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

paddingLeftNumber

The space, in pixels, that appears to the right, after the last item.
Default Value:
  • 0

paddingTopNumber

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

Methods

layout(items, viewPortBounds)

Position (and possibly resize) the supplied items.
Name Type Description
items Array items that will be layouted
viewPortBounds ViewPortBounds