containers#

Interfaces#

Arranged#

Defined in: arranger/src/containers.ts:90

The arrangement the contents of a level stand in: blocks on the arranger (vertical, horizontal or a matrix of columns columns), the items of a block in its bundle editor (vertical or horizontal, columns 1).

Properties#

columns#

readonly columns: number

Defined in: arranger/src/containers.ts:93

The number of columns of a matrix; 1 otherwise.

direction#

readonly direction: "vertical" | "horizontal" | "matrix"

Defined in: arranger/src/containers.ts:91


LevelRules#

Defined in: arranger/src/containers.ts:47

What a level of the canvas permits.

Properties#

arranged?#

readonly optional arranged?: Arranged

Defined in: arranger/src/containers.ts:82

How the contents the level moves are arranged (arrangedOf): absent where they lie at their places. While present, the level moves and nudges nothing freely: a drag and the arrows move a content to another place of the arrangement.

bands#

readonly bands: boolean

Defined in: arranger/src/containers.ts:55

Drag a band of the edited timeline elsewhere in its band order, or step it there by key.

frameWidthPinned#

readonly frameWidthPinned: boolean

Defined in: arranger/src/containers.ts:65

Whether a frame keeps its drawn width while its content, stretched along time, fits in it.

itemsFree#

readonly itemsFree: boolean

Defined in: arranger/src/containers.ts:63

Whether items lie freely in their box, so an edit of one item’s place also states the drawn position of every other item that states none and nothing else moves; otherwise an item below follows the edited one down.

lock#

readonly lock: boolean

Defined in: arranger/src/containers.ts:73

Toggle the canvas’s lock.

marquee#

readonly marquee: "blocks" | "elements"

Defined in: arranger/src/containers.ts:57

What a marquee selects: whole blocks, or the elements inside the edited element.

move#

readonly move: boolean

Defined in: arranger/src/containers.ts:49

Drag what the level places freely: blocks on the arranger, items in the bundle editor.

nudge#

readonly nudge: boolean

Defined in: arranger/src/containers.ts:51

Step the selected blocks by key, by a pixel or by a large step.

open#

readonly open: boolean

Defined in: arranger/src/containers.ts:71

Open an editor.

order#

readonly order: boolean

Defined in: arranger/src/containers.ts:69

Raise and lower blocks among their siblings.

remove#

readonly remove: boolean

Defined in: arranger/src/containers.ts:67

Delete the selection.

reorder#

readonly reorder: boolean

Defined in: arranger/src/containers.ts:53

Drag a group’s member cards into another display order.

resize#

readonly resize: boolean

Defined in: arranger/src/containers.ts:75

Resize the selected container: choose a mode and drag its handles.


PlaceField#

Defined in: arranger/src/containers.ts:282

A place member of one container as a level edits it.

Properties#

offered#

readonly offered: boolean

Defined in: arranger/src/containers.ts:285

Whether the level edits it; a member it does not edit is shown, never changed.

property#

readonly property: "length" | "width" | "height" | "x" | "y" | "scale" | "spacing" | "margin"

Defined in: arranger/src/containers.ts:283

written#

readonly written: Written

Defined in: arranger/src/containers.ts:287

Whose value it is: the block’s, the item’s holding the container, or the container’s own.


Resizing#

Defined in: arranger/src/containers.ts:196

How a container resizes: the levels where it does, and what each mode writes.

Properties#

levels#

readonly levels: object

Defined in: arranger/src/containers.ts:201

Which containers resize at a level: every one inside the level’s edited element (on the arranger, every one), or only the edited element’s own.

arranger?#

optional arranger?: "inside" | "edited"

bundle?#

optional bundle?: "inside" | "edited"

flow?#

optional flow?: "inside" | "edited"

group?#

optional group?: "inside" | "edited"

timeline?#

optional timeline?: "inside" | "edited"

writes#

readonly writes: object

Defined in: arranger/src/containers.ts:207

By resize mode (ResizeMode of resize.ts), a stretch by its axis: length along time, spacing vertically, which writes spacing or margin (verticalStretchOf).

box#

readonly box: Written

length#

readonly length: Written

scale#

readonly scale: Written

spacing#

readonly spacing: Written


Subject#

Defined in: arranger/src/containers.ts:326

One selected address resolved to its block, the container it names and its drawn box.

Properties#

address#

readonly address: Address

Defined in: arranger/src/containers.ts:327

block#

readonly block: string

Defined in: arranger/src/containers.ts:328

box#

readonly box: DrawnBox | null

Defined in: arranger/src/containers.ts:339

The drawn container the address names: the block, a frame, a card, a band (its first record); for a timeline, or a part of a timeline or a group, the card or frame drawn for it, a virtual timeline’s as a timeline’s. Of the cards of a member of several groups, the one in the frame worked in (workedBox); null where no frame is, and otherwise (a chunk of a virtual card among them).

kind#

readonly kind: "block" | "frame" | "card" | "band" | "element"

Defined in: arranger/src/containers.ts:330

The container the address names directly, or "element" for anything else.

resolved#

readonly resolved: ResolvedAddress

Defined in: arranger/src/containers.ts:340

Type Aliases#

Level#

Level = "arranger" | EditorKind

Defined in: arranger/src/containers.ts:39

A level of the canvas: the arranger, or an editor of one kind.


PlaceProperty#

PlaceProperty = typeof ITEM_PLACE_MEMBERS[number]

Defined in: arranger/src/containers.ts:261

A member of a place, as the inspector and placeEdit edit it, in core’s order of a place.


Written#

Written = "block" | "item" | "own"

Defined in: arranger/src/containers.ts:193

The storage owner of a resize value: the block’s own placement, the place of the item holding the container (a held card’s frame), or the container’s own place (a held card’s).

Variables#

LEVELS#

const LEVELS: { readonly [level in Level]: LevelRules }

Defined in: arranger/src/containers.ts:138

What the arranger and each editor level permit.


RESIZED_BY#

const RESIZED_BY: { readonly [property in PlaceProperty]: keyof Resizing[“writes”] | null }

Defined in: arranger/src/containers.ts:268

What changes each place member: its entry of Resizing.writes (a stretch by its axis, a width or height the box mode); null for a position, which moving changes.

Functions#

arrangedOf()#

arrangedOf(view, editing): Arranged | null

Defined in: arranger/src/containers.ts:105

How the contents of the level under editing are arranged, as drawn: on the arranger the workspace’s arrangement of its blocks (a matrix’s columns columnsOf the number of blocks); in the bundle editor of a block its items’ arrangement, vertical where horizontal is stated but the rules refuse it (the block is then drawn one item under another, core’s rowOf); null where the contents lie at their places, and in a group or timeline editor, whose cards keep their own order.

Parameters#

view#

View

editing#

Editing | null

Returns#

Arranged | null


fieldsOf()#

fieldsOf(box, level): readonly PlaceField[]

Defined in: arranger/src/containers.ts:301

The place members of box at level, in core’s order of a place, each with whether the level edits it and whose value it is (RESIZING). A member a resize changes is edited where the container resizes (resizingOf), and the block’s own size wherever its block is edited, since every editor adapts the block’s own box. A position is the block’s or an item’s: the block’s is edited at every level, an item’s in an editor whose level moves what it places (LEVELS, the bundle editor); a card a frame holds has none, its frame placing it. A band and an ancestor card have no place: none.

Parameters#

box#

DrawnBox

level#

Level

Returns#

readonly PlaceField[]


levelOf()#

levelOf(editing): Level

Defined in: arranger/src/containers.ts:42

The level of the canvas under editing, the innermost open editor: its kind, else the arranger.

Parameters#

editing#

Editing | null

Returns#

Level


resizeModes()#

resizeModes(box, level): readonly ResizeMode[]

Defined in: arranger/src/containers.ts:321

The resize modes the toolbar offers for box at level, in the toolbar’s order: all three wherever it resizes, none elsewhere.

Parameters#

box#

DrawnBox

level#

Level

Returns#

readonly ResizeMode[]


resizes()#

resizes(box, level, own): boolean

Defined in: arranger/src/containers.ts:253

Whether box, lying inside the edited element, resizes at level; own says whether it is the edited element’s own container (the block in its bundle editor, the frame in its group editor, the card in its timeline editor).

Parameters#

box#

DrawnBox

level#

Level

own#

boolean

Returns#

boolean


resizingOf()#

resizingOf(box): Resizing

Defined in: arranger/src/containers.ts:243

How box resizes: by its kind, and for a card by whether a frame holds it; an ancestor card, like a band, never.

Parameters#

box#

DrawnBox

Returns#

Resizing


resolveSelection()#

resolveSelection(view, selection, editing, metrics, pane?): Subject[]

Defined in: arranger/src/containers.ts:402

The selection resolved through core’s resolveAddress, one subject per address that names something in view, in selection order; an address that names nothing (or the workspace) is left out. Each subject’s box is read from its block’s drawing (drawingOf with metrics and pane) where editing, the innermost open editor, works.

Parameters#

view#

View

selection#

Selection

editing#

Editing | null

metrics#

FontMetrics

pane?#

PaneSource

Returns#

Subject[]


rulesOf()#

rulesOf(editing, mode): LevelRules

Defined in: arranger/src/containers.ts:157

What the canvas permits under editing, the innermost open editor (the arranger’s rules without one): a locked canvas changes no placement, so it moves and nudges nothing, moves no band and resizes nothing; a read-only canvas writes nothing, so it also reorders, removes, raises or lowers nothing, opens no editor (an opened editor is journalled) and offers no lock. Selecting, the marquee, panning and zooming stay. Where the level moves its contents and they are arranged (arrangedOf), it moves and nudges none freely and carries the arrangement instead, which the lock and the read-only mode turn off as they turn off moving. The one answer to “may this run”.

Parameters#

editing#

Editing | null

mode#
arranged?#

Arranged | null

locked#

boolean

readonly#

boolean

Returns#

LevelRules