gestures/held#

Interfaces#

Dropped#

Defined in: arranger/src/gestures/held.ts:132

What a reorder’s copy needs once its gesture has ended.

Properties#

drawing#

readonly drawing: Drawing

Defined in: arranger/src/gestures/held.ts:136

The drawing at the press.

ghost#

readonly ghost: readonly Descriptor[]

Defined in: arranger/src/gestures/held.ts:138

The copy’s descriptors.

offset#

readonly offset: Point | null

Defined in: arranger/src/gestures/held.ts:140

The copy’s travel at the drop; null where it never moved.

view#

readonly view: View

Defined in: arranger/src/gestures/held.ts:134

The view as stored at the press.


HeldPress#

Defined in: arranger/src/gestures/held.ts:20

What a press on a held card holds.

Properties#

at#

readonly at: Point

Defined in: arranger/src/gestures/held.ts:28

The pointer’s drawing point at the press.

drawing#

readonly drawing: Drawing

Defined in: arranger/src/gestures/held.ts:24

The drawing at the press, which every drop is read against, never a preview’s.

ghost#

readonly ghost: readonly Descriptor[]

Defined in: arranger/src/gestures/held.ts:26

The card’s drawing, which the ghost copies.

offset#

offset: Point | null

Defined in: arranger/src/gestures/held.ts:32

The pointer’s travel last shown, where the copy of the card lies; null before the first.

shown#

shown: readonly string[] | null

Defined in: arranger/src/gestures/held.ts:30

The order last previewed; null before the first.

view#

readonly view: View

Defined in: arranger/src/gestures/held.ts:22

The view as stored at the press, which the command is built on.


HeldValue#

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

Where a held card drops (the display order of its group), how far the pointer has travelled, and why the drop is refused (heldRefusal), else null.

Properties#

offset#

readonly offset: Point

Defined in: arranger/src/gestures/held.ts:42

order#

readonly order: readonly string[]

Defined in: arranger/src/gestures/held.ts:41

refused#

readonly refused: string | null

Defined in: arranger/src/gestures/held.ts:43


ReleaseMotion#

Defined in: arranger/src/gestures/held.ts:103

The motion of a released card’s copy, in the drawing’s units: from its travel at the drop to its card’s place.

Properties#

from#

readonly from: Point

Defined in: arranger/src/gestures/held.ts:105

Where the copy lies when the gesture ends: the pointer’s travel since the press.

to#

readonly to: Point

Defined in: arranger/src/gestures/held.ts:107

Where its card is drawn once the gesture has ended, as a travel from the card’s place at the press.

Functions#

cardDrawing()#

cardDrawing(drawing, descriptors, card): readonly Descriptor[]

Defined in: arranger/src/gestures/held.ts:91

The descriptors drawing a card and everything drawn on it: those whose source element lies in the card’s range of the drawing, its shadow (a second descriptor of the card’s own rectangle) included.

Parameters#

drawing#

Drawing

descriptors#

readonly Descriptor[]

card#

PlaceKey

Returns#

readonly Descriptor[]


endReorder()#

endReorder(host, key, dropped): void

Defined in: arranger/src/gestures/held.ts:149

The end of a reorder of the content key (a held card, an arranged item) of the node host: the preview withdrawn, and the copy moving from where it was dropped to where the drawing stored after the gesture draws its content (releaseMotion), at once under reduced motion; the slide ends.

Parameters#

host#

NodeHost

key#

PlaceKey

dropped#

Dropped

Returns#

void


heldGesture()#

heldGesture(host, group, member): GestureStrategy<HeldPress, HeldValue>

Defined in: arranger/src/gestures/held.ts:187

The drag of the card of member held by the frame of group. A press is taken while the canvas reorders cards (rulesOf(...).reorder), except on a pinned card (isPinned); the press that becomes a drag selects the card. A drop the arrangement refuses (heldRefusal) previews the stored order, stores nothing and shows its reason (NodeActions.refuse). The order follows the pointer’s drawing point through the drawing as stored at the press (memberOrderAt); the other cards slide apart in the preview while a copy of the dragged card’s drawing follows the pointer, the card itself left hidden where it would drop. The release stores the order in one set (reorderCommand), nothing for a release in place. However the gesture ends, the copy then moves from where it was dropped to where its card is drawn (releaseMotion), the card hidden until it arrives; at once under reduced motion.

Parameters#

host#

NodeHost

group#

string

member#

string

Returns#

GestureStrategy<HeldPress, HeldValue>


heldRefusal()#

heldRefusal(manifest, drawing, group, order): string | null

Defined in: arranger/src/gestures/held.ts:77

Why group may not take the display order order where drawing draws the block’s items side by side: the order would change one of its anchors (core’s anchorChange); null where it may, and wherever the items are not side by side.

Parameters#

manifest#

Manifest

drawing#

Drawing

group#

string

order#

readonly string[]

Returns#

string | null


isPinned()#

isPinned(manifest, drawing, group, member): boolean

Defined in: arranger/src/gestures/held.ts:59

Whether the card of member in group’s frame is pinned where drawing draws the block’s items side by side: the member anchors its group on a root drawn once behind the row (core’s anchorsOf), so the roots’ order stays the groups’ (the drawing specification’s “Drawn once”). A press on it is not taken.

Parameters#

manifest#

Manifest

drawing#

Drawing

group#

string

member#

string

Returns#

boolean


releaseMotion()#

releaseMotion(pressed, shown, card, offset): ReleaseMotion | null

Defined in: arranger/src/gestures/held.ts:118

How the copy of card, dragged by offset from where pressed (the drawing at the press) draws it, moves once the gesture ends: from that travel to the card’s place in shown, the drawing shown after it (its new place after a reorder stored, its old one after Escape, a release in place or a refusal). null where shown draws no such card, or the copy already lies there.

Parameters#

pressed#

Drawing

shown#

Drawing

card#

PlaceKey

offset#

Point

Returns#

ReleaseMotion | null