ribbons#
Interfaces#
ChunkLights#
Defined in: arranger/src/ribbons.ts:53
What a hovered or selected chunk shows: its ribbons, and the other chunks of its source it lights.
Properties#
lit#
readonlylit: readonlyElementAddress[]
Defined in: arranger/src/ribbons.ts:56
The addresses of the braces lit ({id: W, facet: "regions", part: [j]}), each drawn once at least.
ribbons#
readonlyribbons: readonlyRibbon[]
Defined in: arranger/src/ribbons.ts:54
ChunkRef#
Defined in: arranger/src/ribbons.ts:27
A chunk of a virtual timeline: the virtual timeline’s ID and the chunk’s index in its FlowMap.
Properties#
index#
readonlyindex:number
Defined in: arranger/src/ribbons.ts:29
timeline#
readonlytimeline:string
Defined in: arranger/src/ribbons.ts:28
LitBrace#
Defined in: arranger/src/ribbons.ts:60
A lit brace as a block node draws it: a copy of its descriptor’s shape, its address left out.
Properties#
attributes#
readonlyattributes:Readonly<Record<string,string>>
Defined in: arranger/src/ribbons.ts:64
key#
readonlykey:string
Defined in: arranger/src/ribbons.ts:62
Its descriptor’s key in the node.
tag#
readonlytag:string
Defined in: arranger/src/ribbons.ts:63
Ribbon#
Defined in: arranger/src/ribbons.ts:44
One ribbon: from a stretch of a chunk’s brace on its virtual card’s line
(from) to that stretch as written on a line of the source (to), and its
path, the two ends joined by cubic curves leaving each line upright.
Properties#
d#
readonlyd:string
Defined in: arranger/src/ribbons.ts:49
from#
readonlyfrom:RibbonEnd
Defined in: arranger/src/ribbons.ts:47
key#
readonlykey:string
Defined in: arranger/src/ribbons.ts:46
Unique within a block: the chunk, the card, the stretch and the source line.
to#
readonlyto:RibbonEnd
Defined in: arranger/src/ribbons.ts:48
RibbonEnd#
Defined in: arranger/src/ribbons.ts:33
One end of a ribbon: from x1 to x2 on the line at the ordinate y, in block-local canvas units.
Properties#
x1#
readonlyx1:number
Defined in: arranger/src/ribbons.ts:34
x2#
readonlyx2:number
Defined in: arranger/src/ribbons.ts:35
y#
readonlyy:number
Defined in: arranger/src/ribbons.ts:36
Variables#
NO_LIGHTS#
constNO_LIGHTS:ChunkLights
Defined in: arranger/src/ribbons.ts:96
Nothing shown: no chunk hovered or selected.
Functions#
allLights()#
allLights(
manifest,drawing,chunks):ChunkLights
Defined in: arranger/src/ribbons.ts:72
Every chunk’s lights together: the ribbons of each in turn, each key
prefixed by its chunk’s address key, and the braces they light, each once,
none of them one of chunks.
Parameters#
manifest#
drawing#
chunks#
readonly ChunkRef[]
Returns#
cardHolding()#
cardHolding(
drawing,index):PlaceKey|null
Defined in: arranger/src/ribbons.ts:152
The card drawing the element at index: the innermost card box whose range holds it.
Parameters#
drawing#
index#
number
Returns#
PlaceKey | null
chunkAddress()#
chunkAddress(
chunk):ElementAddress
Defined in: arranger/src/ribbons.ts:108
The address of a chunk’s brace.
Parameters#
chunk#
Returns#
chunkLights()#
chunkLights(
manifest,drawing,chunk):ChunkLights
Defined in: arranger/src/ribbons.ts:247
The ribbons of chunk in drawing, the drawing of manifest, and the
chunks it lights; nothing where its virtual timeline does not resolve
through a FlowMap of its own root (resolveVirtualTimeline), or where the
chunk is a gap.
For every brace of the chunk drawn (one per card drawing its virtual
timeline: a run drawn once draws only its first entry’s, section 8.10)
and every stretch the chunk plays (one, or a virtual timeline’s several),
the ribbon leaves the card’s line of the virtual timeline over the
stretch’s share of the brace, x1 + share × (x2 − x1) at the played
start and end, the chunk’s span from its first stretch’s played start to
its last’s played end; and reaches every line of the source root drawn in
a card that is not switched, over the written stretch clipped to what
that line draws (abscissaOf). Ribbons come in the order of the braces,
then the stretches, then the source’s lines.
It lights the brace of every other chunk, of any virtual timeline drawn, that names the same source.
Parameters#
manifest#
drawing#
chunk#
Returns#
chunkOf()#
chunkOf(
manifest,address):ChunkRef|null
Defined in: arranger/src/ribbons.ts:99
The chunk address names: {id: V, facet: "regions", part: [k, ...]} of a virtual timeline V; else null.
Parameters#
manifest#
address#
Returns#
ChunkRef | null
clippedOn()#
clippedOn(
axis,start,end): readonly [number,number] |null
Defined in: arranger/src/ribbons.ts:191
The abscissas of [start, end] on the line axis, clipped to what it draws
(from its start over its length, or its drawn length where the end is not
known); null where nothing of it is drawn there.
Parameters#
axis#
start#
end#
Returns#
readonly [number, number] | null
ribbonPath()#
ribbonPath(
from,to):string
Defined in: arranger/src/ribbons.ts:215
The path of a ribbon from from to to: along from’s line from x1 to
x2, a cubic curve to to’s x2, along its line back to its x1, and a
cubic curve home, each curve’s control points at the ordinate halfway
between the two lines, straight above or below its ends.
Parameters#
from#
to#
Returns#
string