new MosaicForEachLayout(width, height, childrenWidth, minSpaceX, spaceBeforeX, spaceAfterX, childrenHeight [, minSpaceY] [, spaceBeforeY] [, spaceAfterY] [, centered] [, dynamicSpacing])
Layout to stack DockableElements in mosaic
WARNING! For the scrollable behavior to work correctly, undefined has to be used for the height parameter!
Parameters:
Name | Type | Argument | Default | Description |
---|---|---|---|---|
width |
olympe.df.PONumber | number | Width of the layout |
||
height |
olympe.df.PONumber | number | undefined | Height of the layout |
||
childrenWidth |
olympe.df.PONumber | number | |||
minSpaceX |
olympe.df.PONumber | number | undefined | minSpace between children in x axis |
||
spaceBeforeX |
olympe.df.PONumber | number | undefined | space before first child in x axis |
||
spaceAfterX |
olympe.df.PONumber | number | undefined | space after last child in x axis |
||
childrenHeight |
olympe.df.PONumber | number | |||
minSpaceY |
olympe.df.PONumber | number |
<optional> |
0 | minSpace between children in y axis |
spaceBeforeY |
olympe.df.PONumber | number |
<optional> |
0 | space before first child in y axis |
spaceAfterY |
olympe.df.PONumber | number |
<optional> |
0 | space after last child in y axis |
centered |
boolean |
<optional> |
true | If there are not enough elements to fill in the available width, center them |
dynamicSpacing |
boolean |
<optional> |
true | Whether to assign extra space between the elements if there are not enough elements to fill in the available width. Best used when with centered = true |
- Implements:
Methods
-
addItem(container, renderer, value, index, map, forEach, itemThemeClass)
-
Parameters:
Name Type Description container
olympe.ui.std.AbsoluteLayout renderer
olympe.ui.std.ForEach.ForEachRenderer value
T index
string map
olympe.df.SortedEnumerable forEach
olympe.ui.std.ForEach itemThemeClass
olympe.df.POString - Implements:
Returns:
element
-
getDimension()
-
- Implements:
Returns:
dimension of the layout
- Type
- olympe.df.PVector2
-
getEndIndex()
-
- Implements:
Returns:
last index of visible element (for lazy loading). If lazy is not supported by the layout, this method should return Number.MAX_SAFE_INTEGER
- Type
- olympe.df.PONumber
-
getStartIndex()
-
- Implements:
Returns:
number of visible elements (for lazy loading). If lazy loading is not supported by the layout, this method should return 0
- Type
- olympe.df.PONumber