Module compute

Source
Expand description

The layout algorithms themselves

Functionsยง

compute_block_layout
Computes the layout of PartialLayoutTree according to the block layout algorithm
compute_cached_layout
Updates the stored layout of the provided node and its children
compute_flexbox_layout
Computes the layout of PartialLayoutTree according to the flexbox algorithm
compute_grid_layout
Grid layout algorithm This consists of a few phases:
compute_hidden_layout
Creates a layout for this node and its children, recursively. Each hidden node has zero size and is placed at the origin
compute_layout
Updates the stored layout of the provided node and its children
compute_leaf_layout
Compute the size of a leaf node (node with no children)
round_layout
Rounds the calculated Layout to exact pixel values