block/places#

Interfaces#

Arranged#

Defined in: layout/src/block/places.ts:147

How placeItems places the items of an arranged block (section 8.6, Arrangements): order, the IDs of every item, the order to take them in, each at its default x and y in that order, its stated x and y kept and not used; padding, by a member card’s place key text, how much lower that card lies than section 8.4 lays it, the gap above it grown so (section 8.8, Drawn once).

Properties#

order?#

readonly optional order?: readonly string[]

Defined in: layout/src/block/places.ts:148

padding?#

readonly optional padding?: ReadonlyMap<string, number>

Defined in: layout/src/block/places.ts:149


Card#

Defined in: layout/src/block/places.ts:80

A card and the member drawing it holds, laid out in its item, its top and height known.

Properties#

address#

readonly address: ElementAddress

Defined in: layout/src/block/places.ts:85

{id: T, part: ["card"]}, every card of T alike.

height#

readonly height: number

Defined in: layout/src/block/places.ts:101

layout#

readonly layout: MemberLayout

Defined in: layout/src/block/places.ts:102

margin#

readonly margin: number

Defined in: layout/src/block/places.ts:98

Its margin V, empty space above its first row or band and below its last: a member’s card’s own margin, a block-held card’s its item’s, else 0.

member#

readonly member: MemberDrawing

Defined in: layout/src/block/places.ts:81

mode#

readonly mode: DrawnMode | null

Defined in: layout/src/block/places.ts:104

A block-held card’s elision mode, auto resolved (section 8.9); null for a member’s card.

ref#

readonly ref: ContainerRef

Defined in: layout/src/block/places.ts:83

Its container as core lists it.

spacing#

readonly spacing: number

Defined in: layout/src/block/places.ts:93

Its spacing S, the gap between its rows and between its bands: a member’s card’s own spacing, a block-held card’s its item’s, else 4.

stated#

readonly stated: CardPlace

Defined in: layout/src/block/places.ts:88

What places states for a member’s card; {} for a block-held card, whose item states it.

style#

readonly style: Style

Defined in: layout/src/block/places.ts:86

top#

readonly top: number

Defined in: layout/src/block/places.ts:100

Its top and height in item coordinates.


Frame#

Defined in: layout/src/block/places.ts:72

A group’s frame: its container as core lists it and its address, its key and style as its cards’ holder, and its drawn title.

Properties#

address#

readonly address: ElementAddress

Defined in: layout/src/block/places.ts:74

holder#

readonly holder: Holder

Defined in: layout/src/block/places.ts:75

ref#

readonly ref: ContainerRef

Defined in: layout/src/block/places.ts:73

title#

readonly title: Title | undefined

Defined in: layout/src/block/places.ts:76


Item#

Defined in: layout/src/block/places.ts:112

One item of the block (section 8.6), a frame or a block-held card: its place key, its frame (none for a block-held card), its place with the defaults applied, its height in item coordinates, and its cards.

Properties#

cards#

readonly cards: readonly Card[]

Defined in: layout/src/block/places.ts:123

content#

readonly content: number

Defined in: layout/src/block/places.ts:125

The height of its content before its request, which a later layout of it reuses.

DG#

readonly DG: number

Defined in: layout/src/block/places.ts:129

DG, the sum of the shrinks of a frame’s gaps, which shortens its members (section 8.2); 0 otherwise.

elisions#

readonly elisions: FrameElisions | undefined

Defined in: layout/src/block/places.ts:127

A frame’s group elisions (section 8.9): its elided axis; none where it draws no gap.

frame#

readonly frame: Frame | null

Defined in: layout/src/block/places.ts:114

height#

readonly height: number

Defined in: layout/src/block/places.ts:122

key#

readonly key: PlaceKey

Defined in: layout/src/block/places.ts:113

length#

readonly length: number

Defined in: layout/src/block/places.ts:118

margin#

readonly margin: number

Defined in: layout/src/block/places.ts:121

scale#

readonly scale: number

Defined in: layout/src/block/places.ts:119

spacing#

readonly spacing: number

Defined in: layout/src/block/places.ts:120

stated#

readonly stated: ItemPlace

Defined in: layout/src/block/places.ts:115

x#

readonly x: number

Defined in: layout/src/block/places.ts:116

y#

readonly y: number

Defined in: layout/src/block/places.ts:117


Reach#

Defined in: layout/src/block/places.ts:158

How far the displayed ancestor cards behind a frame reach beyond it (section 8.8, No room), in its item coordinates: top, the least top of its cards and the frame (0 or less), and bottom, the largest bottom edge of its cards and the frame, shadows not counted. Keyed by the frame’s place key text.

Properties#

bottom#

readonly bottom: number

Defined in: layout/src/block/places.ts:160

top#

readonly top: number

Defined in: layout/src/block/places.ts:159


Title#

Defined in: layout/src/block/places.ts:61

A title (section 8.1): its address, style and font size, and its text cut to its max-width.

Properties#

address#

readonly address: ElementAddress

Defined in: layout/src/block/places.ts:62

size#

readonly size: number

Defined in: layout/src/block/places.ts:64

style#

readonly style: Style

Defined in: layout/src/block/places.ts:63

text#

readonly text: string

Defined in: layout/src/block/places.ts:65

Type Aliases#

AlignedRows#

AlignedRows = ReadonlyMap<string, ReadonlyMap<string, number>>

Defined in: layout/src/block/places.ts:137

The ordinates of the lines of a root’s timelines in its drawing alone (section 8.8, step 1), by timeline ID, for each member card on whose root’s side the ancestor card behind its frame is drawn, by the card’s place key text (section 8.3).

Functions#

placeItems()#

placeItems(context, block, top, aligned?, previous?, arranged?, reaches?): Item[]

Defined in: layout/src/block/places.ts:325

Every item of the block in drawing order, the frames then the block-held cards (section 8.6), block the holder of the frames and the block-held cards and top the default top of the first item, below the title’s slot and the block’s margin. An item’s length L, scale, spacing and margin are what its place states, else the placement’s length, 1, 8 for a frame and 4 for a block-held card, and 0; its member drawings are laid out at L, a block-held card’s at its item’s spacing and margin, a member’s at its own card’s (else 4 and 0), and a frame’s cards lie its spacing apart, its margin above the first and below the last. No spacing or margin multiplies another. Its height, in item coordinates, is the larger of its content’s and the requested one; its place x and y what is stated, else P and, for y, the first item at top, each further one the placement’s spacing below the largest drawn bottom edge, after the scale, of the items before it.

A frame’s member drawings are traversed first and laid out on its elided axis where its group elisions draw gaps (section 8.9), a block-held card’s on its own where its mode draws its stored card elisions. Each member card of aligned places its ancestor rows on its root’s side at the distances its ordinates give (section 8.3); an item none of whose cards it names and none of whose cards arranged pads is taken from previous where that holds it, its content kept. An arranged block’s items are taken in the order arranged gives instead of drawing order, each at its default place.

An item behind whose frame ancestor cards are drawn reaches as far as reaches gives under its place key text (section 8.8, No room): its default y lies so far lower that its cards’ top lies the placement’s spacing below the largest bottom edge of the items before it (the first item keeps its default y), and its bottom edge for the items after it is its cards’ where they reach lower than its frame, so no card overlaps another item’s.

Parameters#

context#

Context

block#

Holder

top#

number

aligned?#

AlignedRows = ...

previous?#

readonly Item[] = []

arranged?#

Arranged = {}

reaches?#

ReadonlyMap<string, Reach> = ...

Returns#

Item[]


titleOf()#

titleOf(context, address, id, name, holder): Title | undefined

Defined in: layout/src/block/places.ts:169

The title at address of a group or the manifest named name, held by holder (section 8.1): its name, else its whole ID, unless its style’s content replaces it; undefined when it is not displayed. Its text is measured either way, so its unmapped characters are reported.

Parameters#

context#

Context

address#

ElementAddress

id#

string

name#

string | null

holder#

Holder

Returns#

Title | undefined