commands#

Interfaces#

DeleteQuestion#

Defined in: arranger/src/commands.ts:509

What a deletion asks first: it also deletes virtual timelines made from what it names, and the user chooses between deleting them all and hiding instead, or, where core would refuse to delete them all, learns why and may only hide instead.

Properties#

hide#

readonly hide: SetCommand | StyleCommand | null

Defined in: arranger/src/commands.ts:528

“Hide instead”, which removes nothing: the set hiding the cards of the targets where every one is a virtual timeline whose card its block holds (hideCommand), the style hiding the one target where it is a root timeline (rootDisplayCommand); else null.

question#

readonly question: string

Defined in: arranger/src/commands.ts:516

The question: what is deleted, and every virtual timeline it takes along, each by its kind and its name, else its ID (addressWords); where core refuses “Delete all”, that they cannot all be deleted and core’s reason.

remove#

readonly remove: RemoveCommand | null

Defined in: arranger/src/commands.ts:521

“Delete all”: the remove naming those virtual timelines as well; null where core refuses it, so it is not offered.


Move#

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

A block’s node position after a gesture, before quantization.

Properties#

id#

readonly id: string

Defined in: arranger/src/commands.ts:43

x#

readonly x: number

Defined in: arranger/src/commands.ts:44

y#

readonly y: number

Defined in: arranger/src/commands.ts:45


Visible#

Defined in: arranger/src/commands.ts:128

The visible part of the canvas: Svelte Flow’s transform and the pane’s size in screen pixels.

Properties#

height#

readonly height: number

Defined in: arranger/src/commands.ts:133

width#

readonly width: number

Defined in: arranger/src/commands.ts:132

x#

readonly x: number

Defined in: arranger/src/commands.ts:129

y#

readonly y: number

Defined in: arranger/src/commands.ts:130

zoom#

readonly zoom: number

Defined in: arranger/src/commands.ts:131

Type Aliases#

ZOrderAction#

ZOrderAction = "front" | "back" | "forward" | "backward"

Defined in: arranger/src/commands.ts:220

A change of stacking order: to the front or back, or one step forward or backward.

Functions#

addCommand()#

addCommand(view, id, manifest, visible, metrics, pane?): AddCommand

Defined in: arranger/src/commands.ts:180

One add of a new block id holding manifest, its top-left at the centre of what visible shows, quantized as a move under the view’s grid is, then moved right past every block it would overlap: while its node rectangle (its drawing at the workspace’s block defaults) meets a root block’s grown by the grid size on every side, its node moves to the right edge of the rightmost such block plus the grid size, its x rounded up to the position step. Its y never changes; its other placement members are the workspace’s block defaults.

Parameters#

view#

View

id#

string

manifest#

Manifest

visible#

Visible

metrics#

FontMetrics

pane?#

PaneSource

Returns#

AddCommand


deleteQuestion()#

deleteQuestion(view, command): DeleteQuestion | null

Defined in: arranger/src/commands.ts:577

The question command asks before it is stored, where removing its targets also removes virtual timelines it does not name (core’s removedBy: those made from a removed timeline or virtual timeline, or through a removed FlowMap, at any depth); null where it removes none, and for the virtual timelines of a block removed whole. Core refuses to remove a virtual timeline another one left is made from, so “Delete all” names each of them, after the targets, in each block’s order of its virtual timelines. That remove is previewed with core (preview), never checked by a copy of its rules: where core refuses it (a FlowMap left names one of them as a chunk), the question says so in core’s words and offers only hiding instead, where hiding is possible.

Parameters#

view#

View

command#

RemoveCommand

Returns#

DeleteQuestion | null


hideCommand()#

hideCommand(view, targets): SetCommand

Defined in: arranger/src/commands.ts:358

The set hiding the cards of the virtual timelines targets (each {block, id: V}, its card held by its block): every member of each one’s stated place unstated, the virtual timeline kept. Only a virtual timeline’s card is hidden so: a root’s card is drawn whether its place is stated or not, so a rule hides it (rootDisplayCommand), and a member’s card in its frame has no place of its own.

Parameters#

view#

View

targets#

readonly Address[]

Returns#

SetCommand


moveCommand()#

moveCommand(view, moves, metrics, pane?): SetCommand | null

Defined in: arranger/src/commands.ts:92

One set placing every moved block where its node is dropped, moves holding node positions (the block’s top-left corner, nodePosition): each quantized to GRID_FREE and stored as the position of the block’s place origin, in the order of moves; a block whose stored position does not change is left out, and null is returned when nothing is left. Snapping is snap’s job: the caller passes the dragged node’s snapped position, and the other nodes of the drag moved by the same delta.

Parameters#

view#

View

moves#

readonly Move[]

metrics#

FontMetrics

pane?#

PaneSource

Returns#

SetCommand | null


nudgeCommand()#

nudgeCommand(view, ids, dx, dy, metrics, pane?): SetCommand | null

Defined in: arranger/src/commands.ts:107

One set moving the blocks ids by dx, dy grid steps: each node’s position moved and quantized to the grid when it snaps, otherwise to GRID_FREE, then stored as the position of its place origin. null when nothing moves.

Parameters#

view#

View

ids#

readonly string[]

dx#

number

dy#

number

metrics#

FontMetrics

pane?#

PaneSource

Returns#

SetCommand | null


removeCommand()#

removeCommand(view, selection, editing): SetCommand | RemoveCommand | { refused: string; }

Defined in: arranger/src/commands.ts:443

What Delete stores for the selected addresses: one remove, an element’s part or card standing for the element whose ID it carries, or one set hiding the selected virtual cards. Every element can be removed, timelines and groups included; a selection holding a manifest’s title, which goes only with its block, is refused whole, with a hint naming the block. A band is never removed: its address is left out, and a selection of bands alone is refused with a hint. Nor is a flow-control element, which is rejected through its provenance and never deleted, nor a chunk of a virtual timeline or of a switched card, which is changed in its FlowMap: their addresses, or those of their parts, are left out, and a selection that names nothing else is refused with a hint. A selected virtual card held by its block is hidden: its place is unstated (core’s set of place with every stated member null) and its virtual timeline kept, which only a remove of the virtual timeline’s own address deletes (the Properties tab’s “Delete virtual timeline”); a virtual card in a frame is left out with a hint, and a selection hiding virtual cards and deleting anything else is refused with a hint. Whether a segment may go is core’s to decide: one that would leave a gap in its segment line is refused there (segment_not_removable), and the canvas shows that refusal as it shows every refusal of the store. Inside an editor the edited element is never removed, a part of it standing for it as well: it is left out of the targets, and a selection that names nothing else is refused with a hint to close the editor first. A remove that also takes along virtual timelines made from what it names is asked about before it is stored (deleteQuestion).

Parameters#

view#

View

selection#

Selection

editing#

Editing | null

Returns#

SetCommand | RemoveCommand | { refused: string; }


rootDisplayCommand()#

rootDisplayCommand(block, root, hidden): StyleCommand

Defined in: arranger/src/commands.ts:396

The style hiding the root timeline root of the block block (display: none on rootSelector’s addresses), or, with hidden false, removing that rule, so the root is drawn again. Its card keeps its place while hidden (section 8.4); a member of a group lying inside the root is drawn by its frame and stays, without the root’s ancestor line, and the ancestor cards of the root behind frames are not drawn.

Parameters#

block#

string

root#

string

hidden#

boolean

Returns#

StyleCommand


rootHidden()#

rootHidden(manifest, root): boolean

Defined in: arranger/src/commands.ts:406

Whether manifest’s own rules hide the root root with rootDisplayCommand’s rule.

Parameters#

manifest#

Manifest

root#

string

Returns#

boolean


zOrderCommand()#

zOrderCommand(view, ids, action): SetCommand | null

Defined in: arranger/src/commands.ts:265

One set of index raising or lowering the blocks ids among their siblings: to the front or back, or one step past their unchosen neighbour. Only the chosen blocks get new fractional indices, each run of them between its unchosen neighbours and below every index a chosen block holds there. null when the order is unchanged.

Parameters#

view#

View

ids#

readonly string[]

action#

ZOrderAction

Returns#

SetCommand | null