gestures/host#

Interfaces#

Ghost#

Defined in: arranger/src/gestures/host.ts:14

A copy of a held card’s drawing that follows the pointer while the card is reordered.

Properties#

card#

readonly card: PlaceKey

Defined in: arranger/src/gestures/host.ts:16

The card’s place key: its drawing is hidden where the preview drops it.

descriptors#

readonly descriptors: readonly Descriptor[]

Defined in: arranger/src/gestures/host.ts:18

The descriptors of the card and everything drawn on it, as the press found them.

offset#

readonly offset: Point

Defined in: arranger/src/gestures/host.ts:23

Where the copy lies: the pointer’s travel since the press, in the drawing’s units; once the gesture has ended, the travel at the drop.

to#

readonly to: Point | null

Defined in: arranger/src/gestures/host.ts:29

While the copy settles after the gesture has ended, the travel it moves to from offset, its card’s place, and is then removed; null while it follows the pointer.


NodeHost#

Defined in: arranger/src/gestures/host.ts:33

A block node’s side of a gesture inside its drawing.

Properties#

actions#

readonly actions: NodeActions

Defined in: arranger/src/gestures/host.ts:34

Methods#

data()#

data(): BlockNodeData

Defined in: arranger/src/gestures/host.ts:36

The node’s data now: its block as shown, drawing, descriptors, selection and editor.

Returns#

BlockNodeData

ghost()#

ghost(ghost): void

Defined in: arranger/src/gestures/host.ts:40

Show a held card’s copy at the pointer; null removes it.

Parameters#
ghost#

Ghost | null

Returns#

void

slide()#

slide(on): void

Defined in: arranger/src/gestures/host.ts:38

Whether the next redraws slide the drawing’s elements to their new places (a reorder).

Parameters#
on#

boolean

Returns#

void

Functions#

previewCommand()#

previewCommand(actions, block, view, command): void

Defined in: arranger/src/gestures/host.ts:53

Show block block as command would leave view, through core’s preview with a copy of the store’s minter (actions.minter()): the reducer without the schema check and the invariants, so a preview never differs from what the release stores, the IDs of what it creates included. No command (the pointer back where it started) and a command the reducer refuses show the block as view holds it; the release of a refused command shows the refusal.

Parameters#

actions#

NodeActions

block#

string

view#

View

command#

Command | null

Returns#

void


previewed()#

previewed(view, command, minter): View

Defined in: arranger/src/gestures/host.ts:69

view as command would leave it, through core’s preview, what it creates given the IDs minter mints; view itself where the reducer refuses the command.

Parameters#

view#

View

command#

Command

minter#

IdMinter

Returns#

View