Skip to main content

Grid Layout

This layout arranges elements into a grid.

Grid layout

Parameters

Home > @jsplumbtoolkit/browser-ui > GridLayoutParameters

GridLayoutParameters interface

Options for the GridLayout.

Signature:

export interface GridLayoutParameters extends LayoutParameters 

Extends: LayoutParameters

Properties

PropertyModifiersTypeDescription
columns?number(Optional) Optional fixed number of columns. By default this is set to -1 - meaning not fixed - which will result in the layout making its best effort at drawing a grid of equal width and height
horizontalAlignment?GridLayoutHorizontalAlignment(Optional) Optional alignment for horizontal placement in cells. Defaults to center.
orientation?GridLayoutOrientation(Optional) Whether to lay out items row first or column first. Additionally, this setting will determine where any extra items are placed if the dataset does not conform to a grid of equal width and height
rows?number(Optional) Optional fixed number of rows. By default this is set to -1 - meaning not fixed - which will result in the layout making its best effort at drawing a grid of equal width and height.
verticalAlignment?GridLayoutVerticalAlignment(Optional) Optional alignment for vertical placement in cells. Defaults to center.

Example

toolkit.render(someElement, {  
layout:{
type:GridLayout.type
}
});