line#
Interfaces#
LevelZero#
Defined in: layout/src/line.ts:31
A timeline’s line and its segments’ boundaries and labels, before any distance is known.
Properties#
centred#
readonlycentred: readonlyCentred[]
Defined in: layout/src/line.ts:40
Its drawn segment labels, each centred on its segment’s midpoint (section 6.7).
extents#
readonlyextents: readonlyExtent[]
Defined in: layout/src/line.ts:38
What level 0 adds to its timeline’s extent (section 6.4, Children), measured from the root’s
start: the line’s own extent, from L × u of its start to L × u of its end, or for an open
end to L × u + 9.5w (summed as written, w its stroke width); and the extent of each drawn
segment label (section 6.3).
Methods#
draw()#
draw(
at,against):Partial<LineElements>
Defined in: layout/src/line.ts:60
Its elements at at (section 6.6), against as for reach above: its line, when displayed
(a timeline element for the root of the member drawing, ending as section 6.6 says for a
top-level timeline or a child, else a child ending in its diamond, either running on into
three chevrons where its end is open); its segments’ boundaries, k to either side of the
line at x of each segment’s start but the first’s; its segments’ labels, tier n with its
baseline at y − (m + 2 + (n − 1) × h(9)) − d(9), each distance summed whole first (section
3.3).
Parameters#
at#
against#
number
Returns#
Partial<LineElements>
reach()#
reach(
side,against):number
Defined in: layout/src/line.ts:50
How far the line reaches on side (section 6.4, Level 0 and Segment lines), against the
width of the band lying against the line on that side and sharing its room: the conversion
maps band at level 1 or −1 (the line’s map stack, reaching e), or above the markers band at
level 1, else 0. Above, m (the larger of against and, with a drawn boundary, k) plus `2
T × h(9)
when its segment labels fillT ≥ 1tiers (9 standing for their largest font size, section 6.2), andmwhen they fill none; below, the larger ofagainstand, with a drawn boundary,k`. A line that is not displayed draws no boundary and no segment label.
Parameters#
side#
against#
number
Returns#
number
SegmentTiers#
Defined in: layout/src/line.ts:70
The segment-label tiers of a line (section 6.4, Segment lines): the tier of
each of its segment labels, from 1, the number of tiers, whether the
distance m counts k, and the largest font size of the labels. Its own
first fit alone, or for the segment lines of a row of one band order one
first fit over all of them, with one m and one count.
Properties#
bounded#
readonlybounded:boolean
Defined in: layout/src/line.ts:73
count#
readonlycount:number
Defined in: layout/src/line.ts:72
size#
readonlysize:number
Defined in: layout/src/line.ts:74
tier#
readonlytier: readonlynumber[]
Defined in: layout/src/line.ts:71
StagedZero#
Defined in: layout/src/line.ts:83
Level 0 of a timeline before its segment labels are tiered: its line’s
extent, each label’s centre and width, in canonical order; whether its line draws a boundary;
the largest font size of its labels; whether it is a displayed segment
line; and level 0 once its labels lie in tiers.
Properties#
bounded#
readonlybounded:boolean
Defined in: layout/src/line.ts:90
labels#
readonlylabels: readonlyobject[]
Defined in: layout/src/line.ts:89
lineExtent#
readonlylineExtent:Extent
Defined in: layout/src/line.ts:88
The line’s own extent (section 6.4, Children), from L × u of its start to L × u of its
end, or for an open end to L × u + 9.5w, summed as written, w its stroke width.
segmentLine#
readonlysegmentLine:boolean
Defined in: layout/src/line.ts:92
size#
readonlysize:number
Defined in: layout/src/line.ts:91
Methods#
zero()#
zero(
tiers):LevelZero
Defined in: layout/src/line.ts:93
Parameters#
tiers#
Returns#
Functions#
drawnEntries()#
drawnEntries(
scope,line): readonlyEntry[]
Defined in: layout/src/line.ts:156
The entries whose lines the line line draws, one element each: line
itself; on a card of a switched frame whose root is not the switched one,
the root’s pieces, its line drawn once in each (section 8.10).
Parameters#
scope#
line#
Returns#
readonly Entry[]
levelZero()#
levelZero(
scope,line):StagedZero
Defined in: layout/src/line.ts:169
Level 0 of the timeline drawn with the line line (sections 6.1, 6.4 and
6.6): its segments are its children when it is a segment line, every one
of them, with a line of its own or not; their labels are placed by one
first fit, in canonical order, into the segment-label tiers above the
line. A segment’s boundary and label are held by its segment line,
directly and in no band (section 2.1), and drawn only with that line.
Parameters#
scope#
line#
Returns#
ownTiers()#
ownTiers(
staged):SegmentTiers
Defined in: layout/src/line.ts:140
The segment-label tiers of staged by its own first fit alone (labelTiers).