manifest/arrangement#
Interfaces#
Anchor#
Defined in: manifest/arrangement.ts:34
A group’s anchor on a root: the member, and its stretch on the root’s own axis.
Properties#
end#
readonlyend:Real
Defined in: manifest/arrangement.ts:44
Where the member ends as drawn on the root’s axis (section 3.4).
group#
readonlygroup:string
Defined in: manifest/arrangement.ts:36
The ID of the group hanging on the root.
member#
readonlymember:string
Defined in: manifest/arrangement.ts:40
The ID of the group’s first member in display order lying inside the root.
root#
readonlyroot:string
Defined in: manifest/arrangement.ts:38
The ID of the root.
start#
readonlystart:Real
Defined in: manifest/arrangement.ts:42
Where the member starts on the root’s axis: the offsets from the root down to it, summed.
ArrangementConflict#
Defined in: manifest/arrangement.ts:58
Why a bundle’s items cannot stand side by side.
Properties#
groups#
readonlygroups: readonlystring[]
Defined in: manifest/arrangement.ts:60
The IDs of the groups in conflict.
reason#
readonlyreason:string
Defined in: manifest/arrangement.ts:64
The conflict in words, every group and root by its name, else its ID.
roots#
readonlyroots: readonlystring[]
Defined in: manifest/arrangement.ts:62
The IDs of the roots they are in conflict on.
Row#
Defined in: manifest/arrangement.ts:48
A bundle’s items arranged side by side.
Properties#
anchors#
readonlyanchors: readonlyAnchor[]
Defined in: manifest/arrangement.ts:54
Every anchor, by its group’s place in the row, then in the group’s display order.
roots#
readonlyroots: readonlystring[]
Defined in: manifest/arrangement.ts:52
The IDs of the roots the groups hang on, top to bottom, each drawn once.
row#
readonlyrow: readonlystring[]
Defined in: manifest/arrangement.ts:50
The IDs of every group and ungrouped root, left to right.
Functions#
anchorChange()#
anchorChange(
manifest,group,order):string|null
Defined in: manifest/arrangement.ts:369
Why giving group group the display order order would change one of
its anchors: would anchor "<member>" on "<root>" instead of "<anchor>"
for the first root, in the group’s present display order of its anchors,
whose anchor would change; null when every anchor stays. A drop that
changes an anchor is refused while the bundle is arranged side by side.
Parameters#
manifest#
group#
string
order#
readonly string[]
Returns#
string | null
anchorsOf()#
anchorsOf(
manifest): readonlyAnchor[]
Defined in: manifest/arrangement.ts:123
Every anchor of a bundle, memoised by manifest: per group by ID, per root in the order of the group’s display order. A group has at most one anchor on each root.
Parameters#
manifest#
Returns#
readonly Anchor[]
isArrangementConflict()#
isArrangementConflict(
value):value is ArrangementConflict
Defined in: manifest/arrangement.ts:68
Whether a result of rowOf is a refusal.
Parameters#
value#
Returns#
value is ArrangementConflict
itemOrder()#
itemOrder(
manifest,order): readonlystring[]
Defined in: manifest/arrangement.ts:109
The order of a bundle’s items an arrangement’s stored order gives: the
items it names, each at its first mention, then every item it leaves out
in drawing order. An ID naming no item is passed over.
Parameters#
manifest#
order#
readonly string[]
Returns#
readonly string[]
rowOf()#
rowOf(
manifest,order):Row|ArrangementConflict
Defined in: manifest/arrangement.ts:261
A bundle’s items side by side, starting from the stored order order
(itemOrder): the row, which keeps that order wherever the stretches
leave it free, the roots drawn once, top to bottom, ordered by the groups
and else by their IDs, and the anchors; or the conflict that makes it
impossible, the first found of: two stretches overlapping on a root (the
first root by ID, the first pair in the stored order), the stretches
ordering the groups in a cycle, the groups ordering the roots in a cycle.
Memoised by manifest and order.
Parameters#
manifest#
order#
readonly string[]