gestures/gap#

Interfaces#

GapHost#

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

The handles’ side of a drag.

Properties#

actions#

readonly actions: NodeActions

Defined in: arranger/src/gestures/gap.ts:37

Methods#

granularity()#

granularity(): Granularity

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

Returns#

Granularity

live()#

live(live): void

Defined in: arranger/src/gestures/gap.ts:45

Hears the dragged handle’s place and value while it moves; null once the drag ends.

Parameters#
live#

GapLive | null

Returns#

void

modes()#

modes(): GapModes

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

What a drag changes: the coordinates, the width or both.

Returns#

GapModes

target()#

target(): { node: BlockNode; piece: GapPiece; } | undefined

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

The node the gap lies in, as stored, and the piece whose handle is pressed.

Returns#

{ node: BlockNode; piece: GapPiece; } | undefined

viewport()#

viewport(): Viewport

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

Returns#

Viewport


GapLive#

Defined in: arranger/src/gestures/gap.ts:25

What a dragged handle shows while the pointer holds it: where it lies and what it sets.

Properties#

at#

readonly at: Point

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

The handle’s place on the canvas as the preview draws the gap, in canvas units.

edge#

readonly edge: GapEdge

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

text#

readonly text: string

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

What the flag says: the timeline, the stretch and the width set.

top#

readonly top: number

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

The top of the gap there, in canvas units: the flag’s pole rises above it.


GapPress#

Defined in: arranger/src/gestures/gap.ts:49

What a press on a handle holds.

Extends#

Properties#

context#

readonly context: GapContext

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

modes#

readonly modes: GapModes

Defined in: arranger/src/gestures/gap.ts:54

node#

readonly node: BlockNode

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

Inherited from#

HandlePress.node

pan#

readonly pan: Point

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

Inherited from#

HandlePress.pan

screen#

readonly screen: Point

Defined in: arranger/src/gestures/travel.ts:15

Inherited from#

HandlePress.screen

subject#

readonly subject: GapSubject

Defined in: arranger/src/gestures/gap.ts:52

view#

readonly view: View

Defined in: arranger/src/gestures/gap.ts:51

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

Functions#

gapGesture()#

gapGesture(host, edge): GestureStrategy<GapPress, GapChange>

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

The drag of the edge handle of a selected stored elision’s gap: the pointer’s travel in the block’s drawing units (its screen travel less the viewport’s pan since the press, over the zoom and the block’s scale) moves the edge under the modes pressed at the press (gapDrag: a snapping value within HIT_TOLERANCE screen pixels, else the simplest value within half a pixel). Each value is previewed as its set leaves the block, the flag following the handle on the previewed gap; the release stores it.

Parameters#

host#

GapHost

edge#

GapEdge

Returns#

GestureStrategy<GapPress, GapChange>


handleOrdinate()#

handleOrdinate(drawing, piece, timeline): number

Defined in: arranger/src/gestures/gap.ts:81

The ordinate of a handle of piece in drawing (block-local units): the line of the elision’s timeline in the card drawing it, in a frame in its member’s card; the gap’s middle where that line is not drawn.

Parameters#

drawing#

Drawing

piece#

GapPiece

timeline#

string

Returns#

number


liveText()#

liveText(subject, change): string

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

What the flag of a drag says: the timeline’s name, the stretch, then the width set.

Parameters#

subject#

GapSubject

change#

GapChange

Returns#

string