Skip to content

layoutFingerprint

layoutFingerprint(input): FingerprintLayout

Defined in: packages/fingerprint/src/layout.ts:68

Lays the items out along fingerprint ridges.

encoding says which dimension arranges the marks and which drive colour, shape and lightness (see FingerprintEncoding); left out, the first dimension does all but lightness. Items are sorted by the arranging dimension’s category order, then by each other encoded dimension’s, then by id, and laid along the ridges from the core outwards, so categories form runs. Mark area is proportional to weight; positions only arrange.

A pure function of its input: the same items, dimensions, encoding and options give the same layout whatever order the items arrive in and whatever size it is drawn at. The ridges come from form (see formFromItems). The items array is treated as immutable: work is cached against it.

Above maxMarks items, consecutive items that agree on every encoded dimension share a mark (itemsPerMark > 1), so a mark never misrepresents any item in it. Nothing is sampled away.

LayoutInput

FingerprintLayout