stacks#
Interfaces#
Carried#
Defined in: layout/src/stacks.ts:56
Where a wedge of rotation degrees carries its stack (section 6.6, Labels
of named timestamps): vx the carry across, by which its labels are
centred off the wedge’s tip, and the distances out from the wedge’s tip
at which each of its lines starts, with the side its baselines lie on.
Properties#
box#
readonlybox: readonly [number,number]
Defined in: layout/src/stacks.ts:63
The distances out of the box’s two sides, nearer the line first.
inwards#
readonlyinwards:boolean
Defined in: layout/src/stacks.ts:61
The baselines lie beyond each start inwards, away from the tip, as on the other side.
starts#
readonlystarts: readonlynumber[]
Defined in: layout/src/stacks.ts:59
The distance out from the line at which each line of the stack starts, from its first.
vx#
readonlyvx:number
Defined in: layout/src/stacks.ts:57
StackItem#
Defined in: layout/src/stacks.ts:15
A stack of labels to tier: its centre’s abscissa unturned, its line count, its widest label.
Properties#
lines#
readonlylines:number
Defined in: layout/src/stacks.ts:17
width#
readonlywidth:number
Defined in: layout/src/stacks.ts:18
x#
readonlyx:number
Defined in: layout/src/stacks.ts:16
Tiers#
Defined in: layout/src/stacks.ts:22
The stacks tiered: the first line n1 of each, from 1, and the line count T of the tiers.
Properties#
first#
readonlyfirst: readonlynumber[]
Defined in: layout/src/stacks.ts:23
lines#
readonlylines:number
Defined in: layout/src/stacks.ts:24
Type Aliases#
Span#
Span = readonly [
number,number]
Defined in: layout/src/stacks.ts:137
An interval of ordinates [y1, y2], y1 ≤ y2.
Functions#
carried()#
carried(
rotation,tip,n1,count,W,h):Carried
Defined in: layout/src/stacks.ts:76
The stack of count labels, the widest W wide, each line h high, whose
first line n1 lies in the tiers of a band whose wedges’ tips lie tip
out from the line (c + w / 2), carried by a wedge turned rotation: at
0 its unturned place, line n starting tip + 13 + 2 + (n − 1) × h out;
else the box H = count × h high whose centre lies on the wedge’s axis at
t = D + W / 2 × |s| + H / 2 × |k| from the tip, D = 13 + 2 + (n1 − 1) × h, tip + t × k out, summed in that order, its lines filling it from its
side nearer the tip.
Parameters#
rotation#
number
tip#
number
n1#
number
count#
number
W#
number
h#
number
Returns#
cut()#
cut(
span,gap):Span[]
Defined in: layout/src/stacks.ts:143
span less the interval gap, as up to two pieces from the top, none
without a length.
Parameters#
span#
gap#
Span | null
Returns#
Span[]
gapOf()#
gapOf(
x,rotation,tip,wedge,stack): readonly [number,number] |null
Defined in: layout/src/stacks.ts:116
The gap of a named timestamp’s cross-section line (section 6.6), as the
smallest and the largest distance out from its line, or null for none:
of its wedge, when it is displayed and the vertical meets its body, the
tip at tip and its corners; of its stack, when it holds a displayed
label and lies across the tip’s abscissa x (X + vx − W / 2 ≤ X ≤ X + vx + W / 2), the box’s two sides.
Parameters#
x#
number
rotation#
number
tip#
number
wedge#
boolean
stack#
{ carried: Carried; width: number; } | null
Returns#
readonly [number, number] | null
tiersOf()#
tiersOf(
items):Tiers
Defined in: layout/src/stacks.ts:33
One first fit of items, in order, into tiers (section 6.3), each stack
one item, as wide as its widest label and centred on its unturned
abscissa: a tier is as many lines high as its highest stack, and the
first line of a stack in tier k is m1 + … + m(k−1) + 1.
Parameters#
items#
readonly StackItem[]
Returns#
verticalMeetsBody()#
verticalMeetsBody(
rotation):boolean
Defined in: layout/src/stacks.ts:105
Whether the vertical through a wedge’s tip runs through its body: |r| ≤ 12 or |r| ≥ 168.
Parameters#
rotation#
number
Returns#
boolean