gestures/region#

Interfaces#

Held#

Defined in: arranger/src/gestures/region.ts:56

A region of a manifest and the timeline holding it.

Extended by#

Properties#

region#

readonly region: object

Defined in: arranger/src/gestures/region.ts:58

timeline#

readonly timeline: object

Defined in: arranger/src/gestures/region.ts:57


RegionContext#

Defined in: arranger/src/gestures/region.ts:158

Where a drag reads its snapping: the block and how finely a value is picked.

Properties#

block#

readonly block: string

Defined in: arranger/src/gestures/region.ts:159

granularity#

readonly granularity: Granularity

Defined in: arranger/src/gestures/region.ts:160


RegionHost#

Defined in: arranger/src/gestures/region.ts:274

The handles’ side of a drag.

Properties#

actions#

readonly actions: NodeActions

Defined in: arranger/src/gestures/region.ts:275

Methods#

granularity()#

granularity(): Granularity

Defined in: arranger/src/gestures/region.ts:279

Returns#

Granularity

live()#

live(live): void

Defined in: arranger/src/gestures/region.ts:281

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

Parameters#
live#

RegionLive | null

Returns#

void

target()#

target(): { node: BlockNode; subject: RegionSubject; } | undefined

Defined in: arranger/src/gestures/region.ts:277

The node the region lies in, as stored, and the brace whose handle is pressed.

Returns#

{ node: BlockNode; subject: RegionSubject; } | undefined

viewport()#

viewport(): Viewport

Defined in: arranger/src/gestures/region.ts:278

Returns#

Viewport


RegionLive#

Defined in: arranger/src/gestures/region.ts:252

Where a dragged handle lies on the canvas as the preview draws its brace, in canvas units.

Properties#

at#

readonly at: Point

Defined in: arranger/src/gestures/region.ts:254

edge#

readonly edge: GapEdge

Defined in: arranger/src/gestures/region.ts:253

text#

readonly text: string

Defined in: arranger/src/gestures/region.ts:258

What the flag says: the region and its stretch with the dragged end at value.

top#

readonly top: number

Defined in: arranger/src/gestures/region.ts:256

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


RegionPiece#

Defined in: arranger/src/gestures/region.ts:76

One brace of a region drawn, with the card drawing it and the map of that card’s axis.

Properties#

axis#

readonly axis: CardAxis

Defined in: arranger/src/gestures/region.ts:84

card#

readonly card: PlaceKey

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

The place key of the card drawing it.

element#

readonly element: RegionElement

Defined in: arranger/src/gestures/region.ts:79

index#

readonly index: number

Defined in: arranger/src/gestures/region.ts:78

Its index in drawing.elements.

nth#

readonly nth: number

Defined in: arranger/src/gestures/region.ts:83

How many braces of the same region the same card draws before it.


RegionPress#

Defined in: arranger/src/gestures/region.ts:285

What a press on a handle holds.

Extends#

Properties#

context#

readonly context: RegionContext

Defined in: arranger/src/gestures/region.ts:289

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: RegionSubject

Defined in: arranger/src/gestures/region.ts:288

view#

readonly view: View

Defined in: arranger/src/gestures/region.ts:287

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


RegionSubject#

Defined in: arranger/src/gestures/region.ts:88

What the handles of one brace act on.

Extends#

Properties#

edges#

readonly edges: readonly GapEdge[]

Defined in: arranger/src/gestures/region.ts:94

The ends of the brace its card’s axis reads back as the region’s own: those taking a handle.

end#

readonly end: Rational

Defined in: arranger/src/gestures/region.ts:92

piece#

readonly piece: RegionPiece

Defined in: arranger/src/gestures/region.ts:89

region#

readonly region: object

Defined in: arranger/src/gestures/region.ts:58

Inherited from#

Held.region

start#

readonly start: Rational

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

The region’s start and end on its timeline’s own axis, exact.

timeline#

readonly timeline: object

Defined in: arranger/src/gestures/region.ts:57

Inherited from#

Held.timeline

Type Aliases#

RegionEdge#

RegionEdge = GapEdge

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

An end of a region: its start (the brace’s left end) or its end (its right one).

Functions#

handlePoint()#

handlePoint(element, edge): Point

Defined in: arranger/src/gestures/region.ts:293

The handle’s place on a brace: its end, at the ordinate of its arms.

Parameters#

element#

RegionElement

edge#

GapEdge

Returns#

Point


regionCommand()#

regionCommand(view, block, subject, edge, value): Command | null

Defined in: arranger/src/gestures/region.ts:236

The command storing value as the edge of subject’s region in block block of view: one set of that end on {block, id: R}, written in the timeline’s number type; null where it is the stored value, the block is gone or the number type cannot hold it.

Parameters#

view#

View

block#

string

subject#

RegionSubject

edge#

GapEdge

value#

Rational

Returns#

Command | null


regionDrag()#

regionDrag(context, subject, edge, dx, tolerance, reach): Rational | null

Defined in: arranger/src/gestures/region.ts:201

The value the edge of subject takes when its handle is dragged dx block units: the value of the region’s timeline the card’s axis reads at the end’s abscissa moved by dx (beyond the axis or inside a gap, the end moved by dx / k, k the block units per unit of the timeline on the run the end lies on), snapped to a value of targetsOf within tolerance block units, else to the simplest value of its number type within reach block units (core’s snapOnRow), held where the end may lie: never past the region’s other end, nor before its timeline’s start or after its known end. null where the axis has no scale there.

Parameters#

context#

RegionContext

subject#

RegionSubject

edge#

GapEdge

dx#

number

tolerance#

number

reach#

number

Returns#

Rational | null


regionGesture()#

regionGesture(host, edge): GestureStrategy<RegionPress, Rational>

Defined in: arranger/src/gestures/region.ts:305

The drag of the edge handle of a selected region’s brace: the pointer’s travel in the block’s drawing units moves that end (regionDrag: 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 handle following its brace there; the release stores it, one set.

Parameters#

host#

RegionHost

edge#

GapEdge

Returns#

GestureStrategy<RegionPress, Rational>


regionOf()#

regionOf(manifest, id): Held | undefined

Defined in: arranger/src/gestures/region.ts:62

The region id of manifest and its timeline; undefined where no timeline holds one.

Parameters#

manifest#

Manifest

id#

string

Returns#

Held | undefined


regionSubjectsOf()#

regionSubjectsOf(manifest, drawing, address): readonly RegionSubject[]

Defined in: arranger/src/gestures/region.ts:126

What the handles of the region address of manifest act on in drawing: one subject per brace drawn of it, in drawing order, with the ends taking a handle; none for an atomic section (read only), an address naming no region, or a brace in no recorded card.

Parameters#

manifest#

Manifest

drawing#

Drawing

address#

ElementAddress

Returns#

readonly RegionSubject[]


regionText()#

regionText(subject, edge, value): string

Defined in: arranger/src/gestures/region.ts:266

What the flag of a dragged region handle says: the region’s name (its ID without one) and its stretch with the edge at value, written as a gap’s flag writes a stretch: “B, 12–18 ♩”.

Parameters#

subject#

RegionSubject

edge#

GapEdge

value#

Rational

Returns#

string