names#
Interfaces#
CutText#
Defined in: layout/src/names.ts:26
A text as drawn: cut to its max-width or whole, with its width.
Properties#
text#
readonlytext:string
Defined in: layout/src/names.ts:27
width#
readonlywidth:number
Defined in: layout/src/names.ts:28
NameItem#
Defined in: layout/src/names.ts:12
A name and its text: what one line or ancestor line gives its row of the name column.
Properties#
name#
readonlyname:Styled
Defined in: layout/src/names.ts:13
text#
readonlytext:string
Defined in: layout/src/names.ts:14
RowName#
Defined in: layout/src/names.ts:18
The one text of a row of the name column (section 6.6), before its row’s ordinate is known.
Properties#
first#
readonlyfirst:Styled
Defined in: layout/src/names.ts:20
The first displayed name of the row, whose address, style and font size the text takes.
text#
readonlytext:string
Defined in: layout/src/names.ts:21
width#
readonlywidth:number
Defined in: layout/src/names.ts:22
Functions#
centredLabel()#
centredLabel(
owner,centre,baseline,item,coordinate?):TextElement
Defined in: layout/src/names.ts:124
A label centred on centre.
Parameters#
owner#
centre#
number
baseline#
number
item#
coordinate?#
Returns#
cutText()#
cutText(
measure,text,size,maximum):CutText
Defined in: layout/src/names.ts:38
A name text cut to its max-width with … (section 6.6): the longest prefix
that fits with the ellipsis, found by binary search over the text’s advance sums.
Parameters#
measure#
text#
string
size#
number
maximum#
number | "none"
Returns#
lineNames()#
lineNames(
lines):NameItem[]
Defined in: layout/src/names.ts:74
The names a row’s lines give it, in their order: a segment’s line gives none (section 6.6), and a timeline drawn in several pieces of a switched card names its row once (section 8.10).
Parameters#
lines#
readonly Entry[]
Returns#
NameItem[]
nameElement()#
nameElement(
scope,name,n,y):TextElement
Defined in: layout/src/names.ts:109
A row’s text drawn at the name column n, vertically centred on the
row’s ordinate y: its baseline at y + (a(s) − d(s)) / 2, s its font
size (section 6.6).
Parameters#
scope#
name#
n#
number
y#
number
Returns#
nameOf()#
nameOf(
timeline):string
Defined in: layout/src/names.ts:32
The name of a timeline (section 5.3): its name, or its whole ID, never parsed.
Parameters#
timeline#
{ }
Returns#
string
rowName()#
rowName(
scope,items):RowName|undefined
Defined in: layout/src/names.ts:89
The text of a row of the name column (section 6.6): the displayed names
of items, in order, joined by , , or the content of the first of
them when it is not none, cut to that name’s max-width; undefined
when no name is displayed, so the row has no text.
Parameters#
scope#
items#
readonly NameItem[]
Returns#
RowName | undefined