gaps#
Interfaces#
GapChange#
Defined in: arranger/src/gaps.ts:510
A change of a stored elision: a new start, end or width (as widthAs writes it).
Properties#
end?#
readonlyoptionalend?:Rational
Defined in: arranger/src/gaps.ts:512
start?#
readonlyoptionalstart?:Rational
Defined in: arranger/src/gaps.ts:511
width?#
readonlyoptionalwidth?:StoredWidth
Defined in: arranger/src/gaps.ts:513
GapContext#
Defined in: arranger/src/gaps.ts:489
What a pointer or a key moving an edge reads besides the subject: where and how finely it snaps.
Properties#
block#
readonlyblock:string
Defined in: arranger/src/gaps.ts:490
drawing#
readonlydrawing:Drawing
Defined in: arranger/src/gaps.ts:493
The drawing the piece was found in: the one the pointer reads, before any change.
granularity#
readonlygranularity:Granularity
Defined in: arranger/src/gaps.ts:494
manifest#
readonlymanifest:Manifest
Defined in: arranger/src/gaps.ts:491
GapHover#
Defined in: arranger/src/gaps.ts:221
A gap the pointer rests on: its block, its piece, and where the pointer is on the canvas.
Properties#
block#
readonlyblock:string
Defined in: arranger/src/gaps.ts:222
piece#
readonlypiece:GapPiece
Defined in: arranger/src/gaps.ts:223
text#
readonlytext:string
Defined in: arranger/src/gaps.ts:228
What the gap says (gapText).
top#
readonlytop:number
Defined in: arranger/src/gaps.ts:226
x#
readonlyx:number
Defined in: arranger/src/gaps.ts:225
The pointer’s abscissa and the gap’s top, in canvas units.
GapModes#
Defined in: arranger/src/gaps.ts:501
What a drag or a key changes: which of the elided coordinates and the gap’s width (the mode menu’s toggles, never neither).
Properties#
coordinates#
readonlycoordinates:boolean
Defined in: arranger/src/gaps.ts:502
width#
readonlywidth:boolean
Defined in: arranger/src/gaps.ts:503
GapPiece#
Defined in: arranger/src/gaps.ts:73
One piece of an elision a drawing draws: its element, where it lies among the elements, the container that decides it (an ungrouped root’s card, an ancestor card or a frame) and its record there.
Properties#
element#
readonlyelement:ElisionElement
Defined in: arranger/src/gaps.ts:76
exposure#
readonlyexposure:ElisionExposure
Defined in: arranger/src/gaps.ts:77
gap#
readonlygap:ExposedGap
Defined in: arranger/src/gaps.ts:78
index#
readonlyindex:number
Defined in: arranger/src/gaps.ts:75
Its index in drawing.elements.
GapSubject#
Defined in: arranger/src/gaps.ts:291
What the handles and keys of a selected stored elision act on, in one piece.
Properties#
axis#
readonlyaxis:CardAxis
Defined in: arranger/src/gaps.ts:294
The map of the axis of the container drawing it.
edges#
readonlyedges: readonlyGapEdge[]
Defined in: arranger/src/gaps.ts:303
The edges this piece moves: the stored start or end only on the piece reaching it.
end#
readonlyend:Rational
Defined in: arranger/src/gaps.ts:301
kept#
Defined in: arranger/src/gaps.ts:309
The stretches of the timeline’s axis an edge never crosses: an ancestor card’s protected span, a frame’s other gaps; each on the timeline’s own axis.
piece#
readonlypiece:GapPiece
Defined in: arranger/src/gaps.ts:292
start#
readonlystart:Rational
Defined in: arranger/src/gaps.ts:300
Its start and end, on its timeline’s own axis.
stored#
readonlystored:object
Defined in: arranger/src/gaps.ts:298
The stored elision.
timeline#
readonlytimeline:object
Defined in: arranger/src/gaps.ts:296
The timeline the elision lies on.
StoredEntry#
Defined in: arranger/src/gaps.ts:764
An elision given to add, by its timeline and stretch.
Properties#
end#
readonlyend:Real
Defined in: arranger/src/gaps.ts:767
start#
readonlystart:Real
Defined in: arranger/src/gaps.ts:766
timeline#
readonlytimeline:string
Defined in: arranger/src/gaps.ts:765
Variables#
DEFAULT_GAP_MODES#
constDEFAULT_GAP_MODES:GapModes
Defined in: arranger/src/gaps.ts:507
The modes a canvas starts with: the coordinates alone.
Functions#
defaultsRemoval()#
defaultsRemoval(
view,block,root):Command|null
Defined in: arranger/src/gaps.ts:754
The command returning the root root of block block of view to its
defaults (Remove all, back to the derived gaps): one remove of every card
elision of its tree (core’s elisionsUnder; group elisions are the
frames’); null where it stores none.
Parameters#
view#
block#
string
root#
string
Returns#
Command | null
defaultsStored()#
defaultsStored(
view,block,drawing,key):Command| {refused:string; }
Defined in: arranger/src/gaps.ts:717
The command storing the default elisions the card key of drawing
(block block of view) draws, as it draws them (the switch from
Proportional to Custom, which keeps every gap where it is drawn): one
add into the block of every default gap of the card in drawing order,
each with its elided coordinates exactly, width {canvas: g} unless it
is the standard gap, display the card’s elision-display, no name
(core mints the IDs). Refused where the card draws no default gap.
Parameters#
view#
block#
string
drawing#
key#
Returns#
Command | { refused: string; }
gapAt()#
gapAt(
drawing,point,stacking):GapPiece|null
Defined in: arranger/src/gaps.ts:205
The gap under point (block-local canvas units) in drawing: the last
drawn whose rectangle holds it, its left and right edges excluded (an
edge is where a run of a row ends, and what lies exactly there is drawn,
section 6.6; its top and bottom included) and that no frame or card
stacked above its holder covers there (stacking); null for none.
Parameters#
drawing#
point#
stacking#
Returns#
GapPiece | null
gapCommand()#
gapCommand(
view,block,subject,change):Command|null
Defined in: arranger/src/gaps.ts:681
The command storing change of subject in block block of view:
one set on the stored elision of the members that change; null where
nothing changes or a value cannot be written.
Parameters#
view#
block#
string
subject#
change#
Returns#
Command | null
gapDrag()#
gapDrag(
context,subject,edge,dx,modes,tolerance,reach):GapChange|null
Defined in: arranger/src/gaps.ts:588
The change a drag of the edge handle of subject by dx block units
makes under modes (Coordinates, Width, or both: then the drawn width
follows the natural one): the edge’s value moves by dx / k, k the
block units per unit of the timeline on the run beside that edge
(CardAxis.edgeScale), to the snapping value (targetsOf) within tolerance block units of it, else
the simplest value within reach block units, held where the edge may
lie; the width by dx (the start’s handle mirrored), the simplest
within reach. null where nothing changes.
Parameters#
context#
subject#
edge#
dx#
number
modes#
tolerance#
number
reach#
number
Returns#
GapChange | null
gapHoverAt()#
gapHoverAt(
nodes,point):GapHover|null
Defined in: arranger/src/gaps.ts:236
The gap under the canvas point point (canvas units) among nodes, the
last node holding one (gapAt, as each node stacks its drawing for its
editor); null for none.
Parameters#
nodes#
readonly BlockNode[]
point#
Returns#
GapHover | null
gapOf()#
gapOf(
manifest,element):ElementAddress|null
Defined in: arranger/src/gaps.ts:176
The elision element of manifest is the gap of, or a part of that gap:
a stored elision’s {id: E} for itself, its ellipses {id: E, part: [ellipsis]} and its labels [name | id | coordinate], a default one’s
{id: T, part: ["elision"]} for itself, its ellipses and its labels
{id: T, part: ["elision", ellipsis | name | coordinate]}; null for
any other address.
Parameters#
manifest#
element#
Returns#
ElementAddress | null
gapsOf()#
gapsOf(
drawing): readonlyGapPiece[]
Defined in: arranger/src/gaps.ts:104
Every gap drawing draws, in drawing order, each with the container
recording it: the card whose range holds it, else (a group elision’s gap,
written after every item) the frame recording a gap at its address.
Parameters#
drawing#
Returns#
readonly GapPiece[]
gapStep()#
gapStep(
context,subject,edge,direction,step,modes):GapChange|null
Defined in: arranger/src/gaps.ts:631
The change one step of step block units in direction (−1 left, 1
right) makes to the edge of subject under modes: the edge’s value
the simplest within half a step of the value moved step / k, or the
nearest snapping value lying on the way, held where the edge may lie;
the width by step (the start’s edge mirrored). null where nothing
changes.
Parameters#
context#
subject#
edge#
direction#
-1 | 1
step#
number
modes#
Returns#
GapChange | null
gapText()#
gapText(
manifest,piece):string
Defined in: arranger/src/gaps.ts:283
What a gap says when the pointer rests on it (Show coordinates): the name of the timeline it lies on (its ID without one), the stretch its piece elides there, and “elided”: “Score, 0–16 ♩, elided”.
Parameters#
manifest#
piece#
Returns#
string
isDefaultGap()#
isDefaultGap(
address):boolean
Defined in: arranger/src/gaps.ts:149
Whether address is a default elision’s, {id: T, part: ["elision"]}.
Parameters#
address#
Returns#
boolean
isGap()#
isGap(
manifest,element):boolean
Defined in: arranger/src/gaps.ts:193
Whether element of manifest is an elision’s own address, stored or default.
Parameters#
manifest#
element#
Returns#
boolean
piecesOf()#
piecesOf(
drawing,address): readonlyGapPiece[]
Defined in: arranger/src/gaps.ts:143
The pieces of drawing drawing the elision address, in drawing order.
Parameters#
drawing#
address#
Returns#
readonly GapPiece[]
storedAs()#
storedAs(
view,block,entry):Address|null
Defined in: arranger/src/gaps.ts:775
The address of the elision entry was stored as in block block of
view, found by its values: the stored elision lying on its timeline
with its start and end; null where none does.
Parameters#
view#
block#
string
entry#
Returns#
Address | null
storedElision()#
storedElision(
manifest,id): { } |undefined
Defined in: arranger/src/gaps.ts:159
The stored elision id of manifest; undefined where none has that ID.
Parameters#
manifest#
id#
string
Returns#
{ } | undefined
stretchText()#
stretchText(
timeline,start,end):string
Defined in: arranger/src/gaps.ts:273
A stretch of timeline as a gap’s coordinate label writes it (section
5.3): the start without its pretty unit (with it in seconds, where both
are clocks), –, and the end with it: “12–300 ♩”.
Parameters#
timeline#
{ }
start#
end#
Returns#
string
subjectOf()#
subjectOf(
manifest,drawing,piece):GapSubject|null
Defined in: arranger/src/gaps.ts:347
What the handles of piece (in drawing of manifest) act on: a stored
elision’s gap in the container deciding it (a card elision’s in its
card, a group elision’s in its frame); null for a default or carried
gap, or where its timeline or elision is gone.
Parameters#
manifest#
drawing#
piece#
Returns#
GapSubject | null
References#
GapEdge#
Re-exports GapEdge