arrangement#

Interfaces#

PackedOffset#

Defined in: layout/src/arrangement.ts:15

The top left corner of one content.

Properties#

x#

readonly x: number

Defined in: layout/src/arrangement.ts:16

y#

readonly y: number

Defined in: layout/src/arrangement.ts:17


PackedSize#

Defined in: layout/src/arrangement.ts:9

The size of one content, in the coordinates its offset is given in.

Extended by#

Properties#

height#

readonly height: number

Defined in: layout/src/arrangement.ts:11

width#

readonly width: number

Defined in: layout/src/arrangement.ts:10


Packing#

Defined in: layout/src/arrangement.ts:24

How packed places its contents.

Properties#

columns?#

readonly optional columns?: number

Defined in: layout/src/arrangement.ts:31

The number of columns of a matrix, a positive integer; read by matrix alone.

direction#

readonly direction: PackedDirection

Defined in: layout/src/arrangement.ts:25

gap#

readonly gap: number

Defined in: layout/src/arrangement.ts:27

The gap between two contents next to each other, and between two rows or columns.

start#

readonly start: PackedOffset

Defined in: layout/src/arrangement.ts:29

The top left corner of the first content.

Type Aliases#

PackedDirection#

PackedDirection = "vertical" | "horizontal" | "matrix"

Defined in: layout/src/arrangement.ts:21

How contents are packed: one under another, side by side, or in the cells of a matrix.

Functions#

packed()#

packed(sizes, packing): PackedOffset[]

Defined in: layout/src/arrangement.ts:44

The top left corners of contents of the sizes sizes, in their order: vertical left-aligned at start.x, each gap below the previous one’s bottom (its y plus its height, plus gap, summed in that order); horizontal top-aligned at start.y, each gap right of the previous one’s right edge; matrix row by row in columns columns, each column as wide as its widest content and each row as tall as its tallest, the columns and rows gap apart, every content at its cell’s top left. Pure, in binary64.

Parameters#

sizes#

readonly PackedSize[]

packing#

Packing

Returns#

PackedOffset[]