-
Notifications
You must be signed in to change notification settings - Fork 53
wcLayout
Handles the contents of a panel.
You should not be constructing these by hand, every panel should construct their own.
$container
Type: JQuery collection object
The container element for the layout.
parent
Type: wcPanel object
The panel that contains this layout.
Adds a new DOM element into the layout.
item
Type: DOM Element, JQuery collection object, or JQuery selector string
An element to insert into the layout.
x, y
Type: Number
An optional X and Y position to place the item in the layout's table grid. If the parameters are not supplied, (0, 0) is used.
w, h
An optional width and height value that determine the number of table grid cells to merge together for this item. If the parameters are not supplied, only one cell is used.
Version: Beta
Retrieves the table data <td> element at a given grid position.
x, y
The X and Y position of the table data element to retrieve.
Clears the contents of the layout.
Version: Beta
During large operations where many grid elements are created into the
layout, each addItem() call causes a reflow to happen, which could cause a
large pause in your application. startBatch() will flag the layout to not
generate, the table anymore, once you are finished adding all your grid
items, you may then use finishBatch() to generate the finished table with
only a single reflow.
Version: Beta
See startBatch().
Generally for debugging purposes, this will render dotted lines around
each layout grid cell to help visuallize the current configuration of cells.
enabled
Type: Boolean
Whether the cell grid should be visible.
Version: Beta
Gets, or Sets the spacing size between layout grid cells.
size
Type: Integer
If supplied, will assign a new spacing size.
Version: Beta
Alternates the color of each row in the grid.
enabled
Type: Boolean
If supplied, sets whether each row in the grid should alternate their color.
Retrieves the main scene DOM element used to contain the layout.