gestures/arranged#

Interfaces#

ArrangedPress#

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

What a press on an arranged item holds.

Properties#

at#

readonly at: Point

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

The pointer’s drawing point at the press.

drawing#

readonly drawing: Drawing

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

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/arranged.ts:28

The item’s drawing, which the copy shows.

offset#

offset: Point | null

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

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

shown#

shown: readonly string[] | null

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

The order last previewed; null before the first.

view#

readonly view: View

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

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


ArrangedValue#

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

Where an arranged item drops, how far the pointer has travelled, and why the drop is refused.

Properties#

offset#

readonly offset: Point

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

order#

readonly order: readonly string[]

Defined in: arranger/src/gestures/arranged.ts:39

refused#

readonly refused: string | null

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

Functions#

arrangedGesture()#

arrangedGesture(host, key): GestureStrategy<ArrangedPress, ArrangedValue>

Defined in: arranger/src/gestures/arranged.ts:70

The drag of the item key of an arranged block. A press is taken while the level’s contents are arranged (rulesOf(...).arranged); the press that becomes a drag selects the item. A copy of the item’s drawing follows the pointer while the others slide to the places the order at the pointer’s drawing point gives (orderAt along the drawn direction, through the drawing at the press), the item itself hidden where it would drop. Side by side, an order the stretches refuse (rowRefusal) previews the stored order. The release stores the order in one set of the block’s arrangement (itemArrangementCommand), nothing for a release in place, and shows a refusal’s reason (NodeActions.refuse); the copy then moves to where its item is drawn (endReorder).

Parameters#

host#

NodeHost

key#

PlaceKey

Returns#

GestureStrategy<ArrangedPress, ArrangedValue>


itemEntries()#

itemEntries(drawing, order): OrderEntry[]

Defined in: arranger/src/gestures/arranged.ts:48

The items of drawing in order, each where the drawing draws its box: the entries orderAt reads.

Parameters#

drawing#

Drawing

order#

readonly string[]

Returns#

OrderEntry[]