Skip to content

labelTransform

labelTransform(box): string

Defined in: labels/cull.ts:107

The CSS transform that renders a label in the box labelGeometry culls against, applied to an element whose left/top is the anchor (with transform-origin at that point). Derived from the same extents as the box: the element’s left edge must land at x + lx0, i.e. a translate of lx0/width — 0% / −50% / −100% for start / middle / end, and likewise 0% / −50% vertically. Returns "" for the default top-left box, so a caller’s own transform still applies there (back-compatible).

LabelBox

string